Timer before spawn
#2

You can return 0 in your OnPlayerRequestClass callback and initiate a timer to call SpawnPlayer() in '6 seconds'. An example of how to do this would be (as a snippet in your OnPlayerRequestClass callback):

pawn Код:
SetTimerEx("_timer_SpawnPlayer", 6000, false, "dd", playerid, classid);
return 0;
And as an external function (for the timer):

pawn Код:
forward _timer_SpawnPlayer(playerid, classid);
public _timer_SpawnPlayer(playerid, classid) {
   SetSpawnInfo() // You'll have to update this code yourself, to reflect the classes you've scripted. You can use the classid variable as a reference to which class the player chose
   return SpawnPlayer(playerid);
}
Reply


Messages In This Thread
Timer before spawn - by cloudysky - 12.07.2011, 23:06
Re: Timer before spawn - by Calgon - 13.07.2011, 00:36

Forum Jump:


Users browsing this thread: 2 Guest(s)