onplayertext & mute
#3

Quote:
Originally Posted by DeathCore
Посмотреть сообщение
Код:
if(muted[playerid] == 1) return SendClientMessage(playerid, COLOR_ORANGE, "SERVER: You are muted");
Hope you got it
Removed the warning but now the cmd is broke. I repped you btw.

Код:
new muted[MAX_PLAYERS];

public OnPlayerText(playerid, text[])
{
if(muted[playerid] == 1) return SendClientMessage(playerid, COLOR_ORANGE, "SERVER: You are muted");
return 0;
}

CMD:mute(playerid, params[])
{
    if(eUser[playerid][e_USER_ADMIN_LEVEL] == 0) return SendClientMessage(playerid, COLOR_ERROR, "You are not a administrator!");
    if(eUser[playerid][e_USER_ADMIN_LEVEL] >= 1)
    {
        new string[128], id, reason[128];
        if(muted[id])
        {
            muted[id] = 1;
            if(sscanf(params, "uS[128]", id, reason)) return SendClientMessage(playerid, COLOR_ERROR, "USAGE: /mute [playerid] [reason]");
            format(string, sizeof(string), "SERVER: %s has been muted by an admin (Reason: %s)", pName(id), reason);
            SendClientMessageToAll(COLOR_ORANGE, string);
        }
   	}
	return 1;
}
Reply


Messages In This Thread
onplayertext & mute - by MyUndiesSmell - 18.01.2018, 21:18
Re: onplayertext & mute - by DeathCore - 18.01.2018, 21:47
Re: onplayertext & mute - by MyUndiesSmell - 18.01.2018, 22:32
Re: onplayertext & mute - by Fratello - 18.01.2018, 22:53
Re: onplayertext & mute - by MyUndiesSmell - 18.01.2018, 23:33
Re: onplayertext & mute - by RogueDrifter - 18.01.2018, 23:36
Re: onplayertext & mute - by 1fret - 18.01.2018, 23:43
Re: onplayertext & mute - by MyUndiesSmell - 18.01.2018, 23:44
Re: onplayertext & mute - by RogueDrifter - 18.01.2018, 23:52
Re: onplayertext & mute - by MyUndiesSmell - 19.01.2018, 00:03

Forum Jump:


Users browsing this thread: 1 Guest(s)