Sobald ich ein Auto kaufen stürzt der Server ab, kann das an der PVarInt Abfrage liegen?
if(dialogid==DIALOG_CHEETAH)
{
if(response==0)
{
}
if(response==1)
{
if(GetPlayerMoney(playerid) >= 215000)
{
if(GetPVarInt(playerid,"Auto")==1)return SendClientMessage(playerid,Gelb,"Du hast schon ein Auto. Benutze /sellcar um dein Fahrzeug zu verkaufen.");
new string[128], name[128], sts[128];
GivePlayerMoney(playerid,-215000);
format(string, sizeof(string),"769.4449, -1327.1703, 13.3326, 268.7346, 0, 0, %d, %d",GetVehicleModel(GetPlayerVehicleID(playerid)));
SaveVehicles(string, playerid);
SetPVarInt(playerid,"Auto",1);
PlayerInfo[playerid][pKey] = CreateVehicle(415,740.2703,-1336.5906,13.5358,273.9800,1,1,-1);
GetPlayerName(playerid, name, sizeof(name));
format(sts, sizeof(sts),"%s",name);
SetVehicleNumberPlate(PlayerInfo[playerid][pKey], sts);
SetVehicleToRespawn(PlayerInfo[playerid][pKey]);
SetCameraBehindPlayer(playerid);
SendClientMessage(playerid,Gelb,"Erfolgreich einen Cheetah für 215.000$ gekauft.");
}
}
}