Mute OnPlayerRequestClass And Unmute OnPlayerSpawn
#2

add this
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
SetPVarInt(playerid, "Muted", 1);
return 1;
}
public OnPlayerSpawn(playerid)
{
SetPVarInt(playerid, "Muted", 0);
return 1;
}
and this
pawn Код:
public OnPlayerText(playerid, text[])
{
if(GetPVarInt(playerid, "Muted") == 1)
    {
        SendClientMessage(playerid, red, "You are muted, you cannot talk.");
        return 0;
    }
    else if(GetPVarInt(playerid, "Muted") == 0)
    {
        new
            szText[128],
            szPlayerName[MAX_PLAYER_NAME];
        GetPlayerName(playerid, szPlayerName, sizeof(szPlayerName));

        format(szText, sizeof(szText), "%s: {FFFFFF}%s", szPlayerName, text);
        SendClientMessageToAll(GetPlayerColor(playerid), szText);
        return 0;
    }
return 1;
}
write here if this doesnt work..
Reply


Messages In This Thread
Mute OnPlayerRequestClass And Unmute OnPlayerSpawn - by lyrics - 13.08.2011, 10:56
Re: Mute OnPlayerRequestClass And Unmute OnPlayerSpawn - by emokidx - 13.08.2011, 11:02
Re: Mute OnPlayerRequestClass And Unmute OnPlayerSpawn - by lyrics - 13.08.2011, 11:14

Forum Jump:


Users browsing this thread: 1 Guest(s)