Command /mute
#4

pawn Код:
CMD:mute(playerid, params[])
{
    new id, string[128], time;
    if(PlayerInfo[playerid][pAdmin] < 1)return NisiAdmin(playerid);
    else if(sscanf(params, "ui", id, time))return Koristi(playerid, "/mute [ime/ID] [Time in seconds]");
    if(time < 0) return SendClientMessage(playerid, -1, "Time cannot be lower than 0");
    else if(id == INVALID_PLAYER_ID) return PogresanID(playerid);
    SetPVarInt(id, "Mutan", 1);
    format(string, sizeof(string), ""#COL_YELLOW"Mute|Utisao si igraca %s!",PlayerName(id));
    SendClientMessage(playerid,-1, string);
    format(string, sizeof(string), ""#COL_YELLOW"Mute|Mutan si od Admina %s!",PlayerName(playerid));
    SendClientMessage(id,-1, string);
    SetTimerEx("unmute", time, 0, "i", id);
    return 1;
}

forward unmute(p);
public unmute(p)
{
    SetPVarInt(p, "Mutan", 0);
    SendClientMessage(p, -1, "You have been automatically unmuted.");
    return 1;
}
edit:
Didn't notice you want an unmute command, sec.
Reply


Messages In This Thread
Command /mute - by FL3GM4 - 14.12.2012, 14:45
Re: Command /mute - by LarzI - 14.12.2012, 14:55
Re: Command /mute - by FL3GM4 - 14.12.2012, 15:05
Re: Command /mute - by maramizo - 14.12.2012, 15:07
Re: Command /mute - by FL3GM4 - 14.12.2012, 15:08
Re: Command /mute - by maramizo - 14.12.2012, 15:16
Re: Command /mute - by FL3GM4 - 14.12.2012, 15:34
Re: Command /mute - by FL3GM4 - 14.12.2012, 15:37

Forum Jump:


Users browsing this thread: 1 Guest(s)