ZU freddy
ich denke mal das sollte das richtige sein
stock sellcar(playerid)
{
new string[256];
if(passenger[playerid] == 1) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "You must be in the drivers' seat of your vehicle to sell it!");
return 1;
}
if(IsPlayerInAnyVehicle(playerid) == 0) {
SendClientMessage(playerid, COLOR_BRIGHTRED, "You must be inside your vehicle in order to sell it");
return 1;
}
new vehicleID = GetPlayerVehicleID(playerid);
if (strcmp(VehicleInfo[vehicleID][owner],PlInfo[playerid][name],false) == 0) {
SetVehicleToRespawn(vehicleID);
SetVehicleVirtualWorld(vehicleID,10);
SetTimerEx("RestartVehicle",5000,0,"i",vehicleID);
PlInfo[playerid][vowned] = 0;
PlInfo[playerid][vowner] = 0;
strmid(VehicleInfo[vehicleID][owner], DEFAULT_OWNER, 0, strlen(DEFAULT_OWNER), 255);
VehicleInfo[vehicleID][bought] = 0;
VehicleInfo[vehicleID][secure] = 0;
GivePlayerMoney(playerid, VehicleInfo[vehicleID][vehiclecost]);
format(string, sizeof(string), "You just sold your %s for $%d, enjoy the walk!!", VehicleInfo[vehicleID][name], VehicleInfo[vehicleID][vehiclecost]);
SendClientMessage(playerid, COLOR_BRIGHTRED, string);
SavePlayer(playerid);
return 1;
}
else {
SendClientMessage(playerid, COLOR_BRIGHTRED, "What are you trying to pull here, you don't own the vehicle!!!");
return 1;
}
achja und ich habe reallife und benutze soweit ich weiß Godfather