Is Player Admin?
#7

sscanf will return 1(or -1?) if the format is not correct.
Also, you don't need to use sscanf as well.
Seems you are using ZCMD(not DCMD ), you can use insull like this:
pawn Код:
CMD:report(playerid, params[])
{
    new string[128];//Since max I/O is 128, you must use 128.
    if(!isnull(params)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /report [text]");
    SendClientMessage(playerid, COLOR_YELLOW, "Your report has been sent to any online admins.");
    format(str, sizeof(str), "[REPORT] %s: %s", GetPName(playerid), params);//Put it here to reduce repeated processing
    for(new i=0; i<MAX_PLAYERS; i++)
        if(GetAdminLevel(i)>= 1 || IsPlayerAdmin(i)) SendClientMessage(i, COLOR_REPORT, str);
    return 1;
}
Reply


Messages In This Thread
Is Player Admin? - by Slash01 - 29.04.2011, 10:28
Re: Is Player Admin? - by Ironboy500[TW] - 29.04.2011, 10:49
Re: Is Player Admin? - by Sascha - 29.04.2011, 10:50
Re: Is Player Admin? - by Slash01 - 29.04.2011, 10:51
Re: Is Player Admin? - by Sascha - 29.04.2011, 11:04
Re: Is Player Admin? - by Slash01 - 29.04.2011, 11:19
Re: Is Player Admin? - by leong124 - 29.04.2011, 12:33
Re: Is Player Admin? - by Slash01 - 29.04.2011, 12:36
Re: Is Player Admin? - by Vince - 29.04.2011, 12:37
Re: Is Player Admin? - by Slash01 - 29.04.2011, 12:40

Forum Jump:


Users browsing this thread: 2 Guest(s)