Cars Werden nicht erstellet

Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!

Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
  • Hir mein CreateCar:


    Spoiler anzeigen
    stock CreateAccount(playerid, pass[])
    {
    new query[256],Name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, Name, MAX_PLAYER_NAME);
    mysql_real_escape_string(Name,Name);
    mysql_real_escape_string(pass,pass);
    format(query, sizeof(query), "INSERT INTO `accounts` (`Name`, `Passwort`) VALUES ('%s', '%s')", Name, pass);
    mysql_query(query);
    return true;
    }


    hir mein SaveCar:


    Spoiler anzeigen
    stock SavePark(playerid)
    {
    if(IsPlayerConnected(playerid) && !IsPlayerNPC(playerid))
    {
    if(GetPVarInt(playerid,"Eingeloggt") == 1)
    {
    new Float:X,Float:Y,Float:Y,Float:A;
    GetPlayerName(playerid,PrivatCar[playerid][PrivatNAme], MAX_PLAYER_NAME);
    GetPlayerPos(playerid,X,Y,Z)
    GetPlayerFacingAngle(playerid,A)
    mysql_SetFloat("privatcars","CarPosX",PrivatCar[playerid][ParkX],"Name", PrivatCar[playerid][PrivatNAme]);
    mysql_SetFloat("privatcars","CarPosY",PrivatCar[playerid][ParkY],"Name", PrivatCar[playerid][PrivatNAme]);
    mysql_SetFloat("privatcars","CarPosZ",PrivatCar[playerid][ParkZ],"Name", PrivatCar[playerid][PrivatNAme]);
    mysql_SetFloat("privatcars","CarPosA",PrivatCar[playerid][ParkA],"Name", PrivatCar[playerid][PrivatNAme]);
    }
    }
    return 1;
    }
    stock SaveCar(playerid)
    {
    if(IsPlayerConnected(playerid) && !IsPlayerNPC(playerid))
    {
    GetPlayerName(playerid,PrivatCar[playerid][PrivatNAme], MAX_PLAYER_NAME);
    mysql_SetInt("privatcars","Color1",PrivatCar[playerid][privatColor1],"Name", PrivatCar[playerid][PrivatNAme]);
    mysql_SetInt("privatcars","Color2",PrivatCar[playerid][privatColor2],"Name", PrivatCar[playerid][PrivatNAme]);
    mysql_SetString("privatcars","CarName",PrivatCar[playerid][PrivatCarName],"Name", PrivatCar[playerid][PrivatNAme]);
    }
    }


    hir mein LoadCar:


    Spoiler anzeigen
    stock LoadCar(playerid)
    {
    if(IsPlayerConnected(playerid) && !IsPlayerNPC(playerid))
    {
    GetPlayerName(playerid,PrivatCar[playerid][PrivatNAme], MAX_PLAYER_NAME);
    PrivatCar[playerid][privatColor1] = mysql_GetInt("privatcars", "Color1", "Name",PrivatCar[playerid][PrivatNAme]);
    PrivatCar[playerid][privatColor2] = mysql_GetInt("privatcars", "Color2", "Name",PrivatCar[playerid][PrivatNAme]);
    PrivatCar[playerid][PrivatCarName] = mysql_GetInt("privatcars", "CarName", "Name",PrivatCar[playerid][PrivatNAme]);
    }
    return 1;
    }

    Mit freundlichen Grüßen,


    Fabi.StaR :love::saint:


  • stock CreateAccount(playerid, pass[]



    Irgendwie nicht so das richtige.


    hir der richtige:

    Spoiler anzeigen
    stock CreateCar(playerid, car[])
    {
    new query[1024],Name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, Name, MAX_PLAYER_NAME);
    mysql_real_escape_string(Name,Name);
    mysql_real_escape_string(car,car);
    format(query, sizeof(query), "INSERT INTO `PrivatCars` (`Name`, `CarName`) VALUES ('%s', '%s')", Name, car);
    mysql_query(query);
    return true;
    }

    Mit freundlichen Grüßen,


    Fabi.StaR :love::saint: