Bug in Warn command
#1

i get a bug when i do /warn

pawn Код:
CMD:warn(playerid, params[])
{
    new str[128], id, reason[128];
    if(PInfo[playerid][Level] < 3) return SendClientMessage(playerid,red,error);
    {
        //if(sscanf(params, "us[128]", id, reason)) return SendClientMessage(playerid,-1, "PHT-BOT:"lgreen" /warn (playerid) (reason)")
        if(sscanf(params,"us[128]",id,reason)) return SendClientMessage(playerid,lightgreen,"USAGE: "lyellow2"/warn (id) (reason)");
        if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid,red,error2);
        format(str, sizeof(str), "» Administrator %s(%d) warns %s(%d) [Reason: %s]", GetPName(playerid), playerid, GetPName(playerid), playerid, reason);
        SendClientMessageToAll(yellow, str);
        format(str, sizeof(str), "» You warned %s(%d) [Reason: %s]",GetPName(playerid), playerid, reason);
        SendClientMessage(playerid, green, str);
        format(str, sizeof(str), "» You've been warned by Administrator%s(%d) [Reason: %s]",GetPName(playerid), playerid, reason);
        SendClientMessage(id, red, str);
        }
    return 1;
}
when i /warn 1 somereason then i press enter it warn different Player like id 2 or 3 and not the id 1 and when i warn a not connected player id it giving warn to myself any idea to those?
Reply


Messages In This Thread
Bug in Warn command - by Team_PRO - 13.07.2014, 11:32
Re: Bug in Warn command - by Konstantinos - 13.07.2014, 11:46
Re: Bug in Warn command - by Team_PRO - 13.07.2014, 12:26

Forum Jump:


Users browsing this thread: 1 Guest(s)