/mute cmd [Roleplay]
#1

Anyone can me ?

Thanks
Reply
#2

https://sampforum.blast.hk/showthread.php?tid=290311

SEARCH.
Reply
#3

pawn Код:
new Mute[MAX_PLAYERS];

CMD:mute(playerid, params[])
{
    if(IsPlayerAdmin(playerid))
    {
        new id;
        if(sscanf(params, "u", id)) return SendClientMessage(playerid, -1, "USAGE: /mute [playerid]");

        if(IsPlayerConnected(id))
        {
            switch(Mute[id])
            {
                case 0:
                {
                    Mute[id] = 1;
                    SendClientMessage(id, -1, "You has been muted by Admin!");
                }
                case 1:
                {
                    Mute[id] = 0;
                    SendClientMessage(id, -1, "You has been unmuted by Admin!");
                }
            }
        }
        else return SendClientMessage(playerid, -1, "Player not connected!");
    }
    else return SendClientMessage(playerid, -1, "You are not Admin!");
    return 1;
}

public OnPlayerText(playerid, text[])
{
    if(Mute[id] == 1) return SendClientMessage(playerid, -1, "You are muted!");
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)