[Help]: /report command!
#1

Hello!

I have one problem! I made the /report command and I don't get any ERROR or WARNING, but ingame there aren't any names in my report and not the right IDs -.- Can someone check my code pls?

Code:

pawn Code:
CMD:report(playerid, params[])
{
    new targetid;
    new reason;
    new string[200];
    if(sscanf(params, "us", targetid, reason))return SCM(playerid, COLOR_GREY, "[USAGE]: /report [playerid][reason]");
    if(IsPlayerConnected(targetid))return SCM(playerid, COLOR_RED, "[ERROR]: This player is not connected!");
    format(string, sizeof(string), "{80FF00}[REPORT]: {80FF00}%s(ID:%d) {00FF00}has Reported {80FF00}%s(ID:%d){00FF00}! {FF0000}|| {00FF00}Reason: {80FF00}%s", GetName(playerid), playerid, GetName(targetid), targetid, reason);
    SendAdminMessage(string);
    SCM(playerid, COLOR_GREEN, "[REPORT]: Report has been send to an Online Administrator(/admins)! Thanks for Reporting!");
    return 1;
}
Stocks:

pawn Code:
stock GetName(playerid)
{
    new
    name[24];
    GetPlayerName(playerid, name, sizeof(name));
    return name;
}

stock SendAdminMessage(const string[])
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(pInfo[i][Adminlevel] >= 1)
    SendClientMessage(i, -1, string);
    }
    return 1;
}
Thanks
Reply


Messages In This Thread
[Help]: /report command! - by Areax - 28.05.2013, 12:41
Re: [Help]: /report command! - by Areax - 28.05.2013, 14:47
Re: [Help]: /report command! - by Red_Dragon. - 28.05.2013, 14:51
Re: [Help]: /report command! - by Areax - 28.05.2013, 14:52
AW: [Help]: /report command! - by HurtLocker - 28.05.2013, 14:53
Re : [Help]: /report command! - by Stefano.R - 28.05.2013, 14:53
Re: AW: [Help]: /report command! - by Areax - 28.05.2013, 14:59

Forum Jump:


Users browsing this thread: 1 Guest(s)