Mute Bug
#4

replace "u" with "d" in if(sscanf...) statement.

EDIT: and try to keep your if's in order, to give clear view of each if{}, this makes it easier for others to help you
pawn Код:
if(strcmp("/warn", cmd, true) == 0)
{
    if(PlayerInfo[playerid][AdminLevel] < 1) return 0;
    {
    new i, reason[50], name[50], string[100], params[100];
    if(sscanf(params, "ds[50]", i, reason)) SendClientMessage(playerid, BLANCO, "USAGE: /warn [id] [reason]");
    else if(i == INVALID_PLAYER_ID) SendClientMessage(playerid, ROJO, "Player is not connected!");
    else
    {
        GetPlayerName(i, name, sizeof(name));
        if(playerid!=i)
        {
            if(WarnTimes[i]>=2)
            {
                format(string, 100,"[AUTO-KICK]: %s[%d] Has Been Kicked From The Server, [3/3 Warnings]", name, i);
                SendClientMessageToAll(AC, string);
                SetPlayerHealth(i, 999999999);
                SetPlayerInterior(i, 10);
                SetPlayerPos(i,226.9807,111.1730,999.0156);
                format(string, sizeof(string), "~W~You Have Been ~R~Kicked ~W~From The Server");
                GameTextForPlayer(i ,string, 99999999999999999999999, 3);
                Kick(i);
            }
            else
            {
                WarnTimes[i]+=1;
                if(WarnTimes[i]==1)
                {
                    format(string, 256,"[ADMIN-WARN]: You Have Received A Warning, Reason: %s, [1/3 Warnings]", reason);
                    SendClientMessage(i, AC, string);
                }
                else if(WarnTimes[i]==2)
                {
                    format(string, 256,"[ADMIN-WARN]: You Have Received A Warning, Reason: %s, [2/3 Warnings]", reason);
                    SendClientMessage(i, AC, string);
                }
                else
                {
                    format(string, 256,"[ADMIN-WARN]: %s[%d] Has Received A Warning, Reason: %s", name, i, reason);
                    SendClientMessageToAll(AC, string);
                    GameTextForPlayer(i,"~W~You Have Received A ~n~  ~R~Warning",5000,3);
                }
            }
        }
    }
    else return SendClientMessage(playerid, COLOR_RED, "You Can't Warn Your Self");
    return 1;
}
Reply


Messages In This Thread
Mute Bug - by MikeMike1997 - 22.03.2013, 19:07
Re: Mute Bug - by dusk - 22.03.2013, 19:12
Re: Mute Bug - by MikeMike1997 - 22.03.2013, 19:29
Re: Mute Bug - by HurtLocker - 22.03.2013, 22:14

Forum Jump:


Users browsing this thread: 2 Guest(s)