Hey Leute,
und zwar, wenn man sein Auto verkauft bekommt man kein Geld zurück.
Wieso ?
if(strcmp("/carsell", cmdtext, true, 10) == 0)
{
new preis = PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarPreis];
if(Dtc_PlayerHaveCar[playerid][Dtc_PlayerKey[playerid]])
{
GivePlayerMoney(playerid, preis);
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 leider kein Geld zurück !");
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Du besitzt Kein Fahrzeug!");
return 1;
}
return 1;
}
LG