Disable player keys
#2

Add TogglePlayerControllable to your script. It would be like this:

Код:
if (strcmp("/goafk", cmdtext, true, 10) == 0)
    {
        currentvw = GetPlayerVirtualWorld(playerid);
        currentcolor = GetPlayerColor(playerid);
        SetPlayerColor(playerid, COLOR_GREY);
        SetPlayerVirtualWorld(playerid, 5);
        TogglePlayerControllable(playerid,1);
        return 1;
    }
    
    if (strcmp("/back", cmdtext, true, 10) == 0)
    {
        SetPlayerColor(playerid, currentcolor);
        SetPlayerVirtualWorld(playerid, currentvw);
        TogglePlayerControllable(playerid,0)
        return 1;
    }
Reply


Messages In This Thread
Disable player keys - by sim_sima - 24.02.2011, 13:58
Re: Disable player keys - by Libra_PL - 24.02.2011, 14:02
Re: Disable player keys - by sim_sima - 24.02.2011, 14:05
Re: Disable player keys - by deather - 24.02.2011, 14:06
Re: Disable player keys - by sim_sima - 24.02.2011, 14:11

Forum Jump:


Users browsing this thread: 1 Guest(s)