probleme withe TogglePlayerControllable - 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: probleme withe TogglePlayerControllable (
/showthread.php?tid=470339)
probleme withe TogglePlayerControllable -
omidi - 17.10.2013
hi
i want to if statment Detect if player is not freezed and then do all things but this code will freeze the player :/
Код HTML:
dcmd_anim(playerid,params[])
{
#pragma unused params
if (TogglePlayerControllable(playerid,0)) return 1;
ApplyAnimation(playerid,"Freeweights","gym_free_celebrate", 4.0, 0, 0, 0, 0, 0, 1);
}
Re: probleme withe TogglePlayerControllable -
]Rafaellos[ - 17.10.2013
You can't use TogglePlayerControllable to check if player is freezed because it doesn't return any value. You can add something like freezed[playerid] = 1; when you freeze a player, so you can if(freezed[playerid] == 0) return 1;