SA-MP Forums Archive
Freeze players till a game is started? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Freeze players till a game is started? (/showthread.php?tid=151966)



Freeze players till a game is started? - -Rebel Son- - 01.06.2010

Ok, so i got my team deathmatch, and i want it to freeze the players before a round is started, and it starts the round 5 minutes after the GMX.

im lost trying to figure this out.


Re: Freeze players till a game is started? - Naxix - 01.06.2010

Код:
for(new i=0;i<MAX_PLAYERS;i++)
{
   TogglePlayerControllable(i,0);
}



Re: Freeze players till a game is started? - -Rebel Son- - 01.06.2010

That's not completely it, your understanding it rong, i want everyone to freeze for five minutes after the server has started. after the 5 minutes, the game starts.


Re: Freeze players till a game is started? - Naxix - 01.06.2010

Freeze em on spawn, and OnGameModeInnit make a timer on 5 mins and then just the look i made to unfreeze them (change 0 to 1) and maybe when that timer runs out start at new timer on like a couple secs which unfreezes all so if new players join after the 5 mins they wont be freezed.


Re: Freeze players till a game is started? - -Rebel Son- - 01.06.2010

Tryed that, failed horribly.



Re: Freeze players till a game is started? - aircombat - 01.06.2010

Код:
public OnGameModeInit() //after the GMX
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
TogglePlayerControllable(i,0);
}
SetTimer("Unfreeze",300000,0);
return 1;
}
Код:
forward Unfreeze();
public Unfreeze()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
TogglePlayerControllable(i,1);
}
return 1;
}