Controllable
#1

How does TogglePlayerControllable work? Which functions and stuff?
Reply
#2

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

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

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
Reply
#5

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

Thank you, it works.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)