25.02.2011, 18:24
Hello guys. I have made an AFK filterscript.
It works almost perfect.
It has a /goafk command and a /back command.
I want to make the player unable to chat when he types /goafk, and the only thing he can type is /back.
If he types anything else, i want to send him a client message.
I have done the following:
At the top of the script I added:
In the /goafk command i added:
And in the /back command i added:
And under OnPlayerText i added:
But it works almost fine. When the player chats in AFK mode, it shows the client message, but the chat text still appears.
Hope someone can help me fixing it. Thank you.
It works almost perfect.
It has a /goafk command and a /back command.
I want to make the player unable to chat when he types /goafk, and the only thing he can type is /back.
If he types anything else, i want to send him a client message.
I have done the following:
At the top of the script I added:
pawn Code:
new afkmsg[500];
pawn Code:
afkmsg[playerid] = 1;
pawn Code:
afkmsg[playerid] = 0;
pawn Code:
if(afkmsg[playerid] != 0) return SendClientMessage(playerid, COLOR_NORMALRED, "( ! ) You can not chat while in AFK mode. Type /back to chat");
Hope someone can help me fixing it. Thank you.