mute cmd help
#2

pawn Код:
CMD:mute(playerid, params[])
{
    LevelCheck(playerid, 1);
    new Player, Reason[80], mutetime;
    if(sscanf(params,"uis[126]",Player,mutetime, Reason)) return SendClientMessage( playerid, COLOR_ULTRARED, "USAGE: {33CCFF}/mute [PlayerID] [Seconds] [Reason]" );
    if(!IsPlayerConnected(Player) && Player == INVALID_PLAYER_ID) return SendError( playerid, "Player is not connected or is the highest level admin" );
    if(PlayerInfo[Player][Level] > PlayerInfo[playerid][Level]) return SendError( playerid, "You cannot use this command on this admin" );
    if(PlayerInfo[Player][Muted] == 1) return SendError(playerid, "Player is already muted" );
    if(mutetime >= 201)
    {
        SendClientMessage(playerid,COLOR_ULTRARED,"You can only mute him for 1-200 seconds");
        return 1;
    }
    CMDMessageToAdmins(playerid,"mute");
    PlayerInfo[Player][PMutes]++;
    PlayerPlaySound(Player, 1057, 0.0, 0.0, 0.0);
    PlayerInfo[Player][Muted] = 1;
    PlayerInfo[Player][MuteWarnings] = 0;
    format(gsString,sizeof(gsString),"Administrator %s(%d) has muted %s(%d) [Reason: %s]", PlayerName(playerid), playerid, PlayerName(Player),Player,Reason);
    SendClientMessageToAll(COLOR_ULTRARED,gsString);
    FormatMSG( Player, COLOR_ABLUE, "You have been muted by Administrator %s [Reason: %s]", PlayerName(playerid), Reason);
    FormatMSG( playerid, COLOR_ABLUE, "You have muted %s [Reason: %s]", PlayerName(Player), Reason);
    return 1;
}
there are, see if it works there?

and by the way as you defined it? o.O

pawn Код:
LevelCheck(playerid, 1);
Reply


Messages In This Thread
mute cmd help - by Dangjai - 04.10.2014, 22:23
Respuesta: mute cmd help - by !R1Ch@rD! - 04.10.2014, 22:32
Re: Respuesta: mute cmd help - by Dangjai - 04.10.2014, 22:42
Respuesta: Re: Respuesta: mute cmd help - by !R1Ch@rD! - 04.10.2014, 22:43
Re: Respuesta: Re: Respuesta: mute cmd help - by Dangjai - 04.10.2014, 22:47
Respuesta: Re: Respuesta: Re: Respuesta: mute cmd help - by !R1Ch@rD! - 04.10.2014, 22:51
Re: mute cmd help - by Dangjai - 04.10.2014, 22:55
Respuesta: mute cmd help - by !R1Ch@rD! - 04.10.2014, 23:00
Re: mute cmd help - by Dangjai - 04.10.2014, 23:08
Re: mute cmd help - by MasonSFW - 05.10.2014, 01:24

Forum Jump:


Users browsing this thread: 1 Guest(s)