Enabling player to move after MoveObject
#16

oops, my bad. Here it is:

pawn Код:
new bool:PlayerMovedObject[MAX_PLAYERS] = false;

public OnObjectMoved(objectid)
{
    if(objectid == plantfour)
    {
        for(new i = 0; i < MAX_PLAYERS; i++)
    {
            if(IsPlayerConnected(i) && PlayerMovedObject[i])
            {
                TogglePlayerControllable(i,1);
                SendClientMessage(i, 0x99FF00AA, "***You have been unfrozen :D");
                PlayerMovedObject[i] = false;
            }
        }
    }
    return 1;
}
When the player moves the object set their variable to:
pawn Код:
PlayerMovedObject[playerid] = true;
but i still wuoldn't recommend that compared to the timer.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 17 Guest(s)