13.03.2011, 09:29
(
Последний раз редактировалось iggy1; 13.03.2011 в 09:43.
Причина: code mistake
)
pawn Код:
new bool:afk_mute[ MAX_PLAYERS char ];//global var
//put this is OnPlayerDisConnect
afk_mute{ playerid } = false ;
//
public OnPlayerText(playerid, text[])
{
if(afk_mute{ playerid } == true )
{
SendClientMessage(playerid, 0xFF0000AA, "You are AFK! You cannot talk");
return 0;
}
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (!strcmp("/afk", cmdtext, true))
{
if(afk_mute{ playerid } != true) {
afk_mute = true ;
//send message that they are afk
}
else {
afk_mute{ playerid } = false ;
//send message that they are not afk
}
return 1;
}
return 0;
}

