Toggleplayercontrollable question? - 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)
+--- Thread: Toggleplayercontrollable question? (
/showthread.php?tid=453465)
Toggleplayercontrollable question? -
burnuk - 25.07.2013
is there any way to get the player's state if he is freeze or set to toggleplayercontrollable(playerid, 0)?
Re: Toggleplayercontrollable question? -
DobbysGamertag - 25.07.2013
Variables.
pawn Код:
new IsFrozen[MAX_PLAYERS];
//freeze command here.
//AFTER the TogglePlayerControllable:
IsFrozen[playerid] = 1; //sets it to one. So they're frozen
You can pretty much use the above:
pawn Код:
if(IsFrozen[playerid] == 1) //something
if(IsFrozen[playerid] == 0) //something
Reset them OnPlayerDisconnect too.