Hallo Leute
Ich habe dieses Carsell system.
if(strcmp("/carsell", cmdtext, true, 10) == 0)
{
if(Dtc_PlayerHaveCar[playerid][Dtc_PlayerKey[playerid]])
{
GivePlayerMoney(playerid, floatround(PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarPreis] / 2));
//new preis = PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarPreis];
Dtc_Carlock[PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId]] = 0;
Dtc_UnLockCar(PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId]);
//DestroyObject(sirene[PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId]]);
DestroyVehicle(PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId]);
new string3[32];
new playername3[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername3, sizeof(playername3));
format(string3, sizeof(string3), "/Autos/%s%d.dtcar", playername3,Dtc_PlayerKey[playerid]);
fremove(string3);
Dtc_PlayerHaveCar[playerid][Dtc_PlayerKey[playerid]] = 0;
SendClientMessage(playerid, COLOR_YELLOW, " Fahrzeug erfolgreich verkauft, Du bekommst die hälfte des Preises wieder!");
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Du besitzt Kein Fahrzeug!");
return 1;
}
return 1;
}
Das Problem ist dass wenn man reloggt und das Fahrzeug verkauft bekommt man kein Geld.