Need Help about auto car respawn
#3

Put this at the top
Код:
new timer;
new seconds;
Under wherever you want to sart the car respawn coutdown
Код:
new veh=GetPlayerVehicleID(playerid);
seconds=5;
SetTimerEx("carrespawn",1000,1,"d",veh);
Then we define the function:
Код:
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;
}
That's just the basic way of doing it.
Reply


Messages In This Thread
Need Help about auto car respawn - by xinix000 - 16.06.2010, 02:49
Re: Need Help about auto car respawn - by abhinavdabral - 16.06.2010, 06:57
Re: Need Help about auto car respawn - by DJDhan - 16.06.2010, 07:19

Forum Jump:


Users browsing this thread: 2 Guest(s)