26.02.2011, 10:18
(
Последний раз редактировалось Rolyy; 27.02.2011 в 08:47.
)
I need help to create a Car respawn timer under the line of
I already tryed 3 different kind of scripts, for example:
So what i practicly want in the script is:
pawn Код:
public OnPlayerExitVehicle(playerid, vehicleid)
pawn Код:
for(new i; i < MAX_VEHICLES; i++)
{
if(!IsVehicleInUse(vehicleid))
{
SetTimer("SetVehicleToRespawn",500,1);
}
}
printf("Cars Cleaned!");
}
IsVehicleInUse(vehicleid){
new temp;
for(new i=0;i<200;i++){
if(IsPlayerConnected(i) && IsPlayerInVehicle(i, vehicleid) && GetPlayerState(i)==PLAYER_STATE_DRIVER){
temp++;
}
}
if(temp > 0){ return true; } else return false;
}
So what i practicly want in the script is:
- After player exits the vehicleid, vehicle will respawn within 3 minutes
- After player enters vehicle, respawn_timer will be cancelled