12.05.2009, 14:48
If you made a random spawn function, in the form: RandomSpawn(playerid);
Then using 2 timers (if you teleport a player OnPlayerSpawn it won't work I don't think there has to be a timer there aswell ) you could:
Alternatively you could make the AddPlayerClass default location the safe place, and then OnPlayerSpawn you'd only have to toggle them uncontrollable..
Then using 2 timers (if you teleport a player OnPlayerSpawn it won't work I don't think there has to be a timer there aswell ) you could:
pawn Код:
forward SafePlace(playerid);
forward RandomSpawn(playerid);
public OnPlayerSpawn(playerid)
{
SetTimerEx("SafePlace", 1000, 0, "d", playerid);
}
stock SafePlace(playerid)
{
//put player in safe place, toggle uncontrollable
SetTimerEx("RandomSpawn", 3000, 0, "d", playerid);
}
public RandomSpawn(playerid)
{
//Put player in the battle, toggle controllable
}