SA-MP Forums Archive
Controllable - 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: Controllable (/showthread.php?tid=345644)



Controllable - HighPitchedVoice - 25.05.2012

How does TogglePlayerControllable work? Which functions and stuff?


Re: Controllable - ViniBorn - 25.05.2012

With TogglePlayerControllable you can freeze the player. He can't move...


Re: Controllable - HighPitchedVoice - 25.05.2012

I meant the functions but I got it now, thanks anyhow.


Re: Controllable - HighPitchedVoice - 25.05.2012

Whoops, need help anyhow.
pawn Код:
if (strcmp("/startevent", cmdtext, true, 10) ==0)
    {
        new pName[MAX_PLAYER_NAME], str[100];
        GetPlayerName(playerid,pName,sizeof(pName));
        Event[playerid] = 1;
        SetPlayerPos(playerid, 1798.2366,-1303.9529,120.2656);
        format(str,sizeof(str),"{FF7F00}%s has just started the event.",pName);
        SendClientMessageToAll(-1,str);
        TogglePlayerControllable(playerid,true);
        return 1;
    }
How does this work to unfreeze ALL in the event? :S


Re: Controllable - ViniBorn - 25.05.2012

pawn Код:
for(new v, b = GetMaxPlayers(); v != b; v++)
    if(Event[v])
        TogglePlayerControllable(v,true);



Re: Controllable - HighPitchedVoice - 25.05.2012

Thank you, it works.