16.06.2010, 07:19
Put this at the top
Under wherever you want to sart the car respawn coutdown
Then we define the function:
That's just the basic way of doing it.
Код:
new timer; new seconds;
Код:
new veh=GetPlayerVehicleID(playerid); seconds=5; SetTimerEx("carrespawn",1000,1,"d",veh);
Код:
forward carrespawn(vehicleid); public carrespawn(vehicleid) { if(seconds==5) { seconds--; return SendClientMessageToAll(0xffffffaa,"Car Respawning in 5 Seconds"); } if(seconds==4) { seconds--; return SendClientMessageToAll(0xffffffaa,"Car Respawning in 4 Seconds"); } if(seconds==3) { seconds--; return SendClientMessageToAll(0xffffffaa,"Car Respawning in 3 Seconds"); } if(seconds==2) { seconds--; return SendClientMessageToAll(0xffffffaa,"Car Respawning in 2 Seconds"); } if(seconds==1) { seconds--; return SendClientMessageToAll(0xffffffaa,"Car Respawning in 1 Second"); } if(seconds==0) { SetVehicleToRespawn(veh); return SendClientMessageToAll(0xffffffaa,"Car Respawned"); } return 1; }