Not Getting Warning
#1

when i do /warn (id) (reason)

it show

Administrator %s(%d) warns %s(%d) [Reason: %s] [Warnings: 3/] and no number is on other side of 3 there must be a max warning to it

example
Administrator %s(%d) warns %s(%d) [Reason: blah] [Warnings: 1/3]
Administrator %s(%d) warns %s(%d) [Reason: blah] [Warnings: 2/3]
Administrator %s(%d) warns %s(%d) [Reason: blah] [Warnings: 3/3]

here is the code

pawn Код:
CMD:warn(playerid, params[])
{
    new str[128],id, reason[64];
    if(PInfo[playerid][Level] < 1) return SendClientMessage(playerid,red,error);
    if(sscanf(params,"us[64]",id,reason)) return SendClientMessage(playerid,lightgreen,"USAGE: "lyellow2"/warn (id) (reason)");
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid,red,error2);
    if(PInfo[id][Warn] == MAX_WARNINGS)
    {
        format(str, sizeof(str), "%s(%d) has been kicked [Reason: Reach the Maxium Warnings!]", GetPName(id), id);// Line 6084
        SendClientMessageToAll(RED, str);
        SendClientMessage(id, RED, "You've been kicked [Reason: Reach the Maxium Warnings!]");
        SetTimerEx("KickTimer",1000,false,"i",id);
    }
    PInfo[id][Warn] += 1;
    format(str, sizeof(str), "» Administrator %s(%d) warns %s(%d) [Reason: %s] [Warnings: %d/%d]", GetPName(playerid), playerid, GetPName(id), id, reason, MAX_WARNINGS);
    SendClientMessageToAll(yellow, str);
    format(str, sizeof(str), "» You warned %s(%d) [Reason: %s] [Warnings: %d/%d]",GetPName(id), id, reason, MAX_WARNINGS);
    SendClientMessage(playerid, green, str);
    format(str, sizeof(str), "» You've been warned by Administrator %s(%d) [Reason: %s] [Warnings: %d/%d]",GetPName(playerid), playerid, reason, MAX_WARNINGS);
    SendClientMessage(id, red, str);
    return 1;
}
Reply


Messages In This Thread
Not Getting Warning - by Team_PRO - 26.08.2014, 12:54
Re: Not Getting Warning - by Phyzic - 26.08.2014, 12:57
Re: Not Getting Warning - by IceCube! - 26.08.2014, 12:59
Re: Not Getting Warning - by tsonn1 - 26.08.2014, 13:01
Re: Not Getting Warning - by Team_PRO - 26.08.2014, 13:13
Re: Not Getting Warning - by IceCube! - 26.08.2014, 13:16
Re: Not Getting Warning - by Team_PRO - 26.08.2014, 13:26

Forum Jump:


Users browsing this thread: 1 Guest(s)