24.02.2011, 13:58
Hi guys. I made a /goafk command. I want to disable the player keys when he is afk, so the only thing he can do is typing in chat. How can i do that?
Her is what i already made:
And when you type /back, keys will be enabled again.
And i added:
above.
Hope someone can help me. Thank you.
Her is what i already made:
pawn Код:
if (strcmp("/goafk", cmdtext, true, 10) == 0)
{
currentvw = GetPlayerVirtualWorld(playerid);
currentcolor = GetPlayerColor(playerid);
SetPlayerColor(playerid, COLOR_GREY);
SetPlayerVirtualWorld(playerid, 5);
return 1;
}
if (strcmp("/back", cmdtext, true, 10) == 0)
{
SetPlayerColor(playerid, currentcolor);
SetPlayerVirtualWorld(playerid, currentvw);
return 1;
}
And i added:
pawn Код:
new currentvw;
new currentcolor;
Hope someone can help me. Thank you.