Hir mein CreateCar:
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;
}
{
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:
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]);
}
}
{
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:
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;
}
{
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;
}