17.10.2009, 05:55
Recently, we have added a 'Car Jacker' Class to our server. The point of this class is to hotwire, and drive a player owned car to a checkpoint where the car is sold. This all works great, except for when we need the car to respawn...it never comes. The code is below, please let me know if there is any error, or if you need more information, thank you.
pawn Код:
if(IsPlayerInStolenCar[playerid] == 1) {
stolencar[playerid] = GetPlayerVehicleID(playerid);
SendClientMessage(playerid, 0xA9A9A9AA, "|_Car Sold_|");
SendClientMessage(playerid,0x00C7FFAA,"You have sold a stolen car for $75000");
GivePlayerMoney(playerid,75000);
RemovePlayerFromVehicle(playerid);
new playerScore = GetPlayerScore(playerid);
SetPlayerScore(playerid, playerScore+ 1);
DestroyVehicle(stolencar[playerid]);
SetVehicleToRespawn(stolencar[playerid]);