Problem with my /report command
#2

a normal report to admins? /report (id) (reason) [EX: /report 1337 Hacker!]

Not tested
pawn Код:
COMMAND:report(playerid, params[])
{
    new targetid, reason[128];
    if(sscanf(params, "us[128]", targetid, reason)) return SendClientMessage(playerid, RED, "[LOST:RP] /report [ID] [MESSAGE]");
    else if(PlayerInfo[playerid][pRmute] == 1) return SendClientMessage(playerid, RED, "[LOST:RP] You are muted from /report, Behave next time");
    {
        new playername[MAX_PLAYER_NAME], targetname[MAX_PLAYER_NAME];
        GetPlayerName(playerid, playername, sizeof(playername));
        GetPlayerName(targetid, targetname, sizeof(targetname));
       
        new string[128];
        SendClientMessage(playerid, RED, "[LOST:RP] Report sent!");
        format(string, sizeof(string), "[LOST:RP] [%d]%s has reported [%d]%s: %s", playerid, playername, targetid, targetname, reason);
        aMessage(RED,string, 1);
    }
    return 1;
}
Reply


Messages In This Thread
Problem with my /report command - by BizzyD - 07.05.2011, 14:34
Re: Problem with my /report command - by Laronic - 07.05.2011, 14:42
Re: Problem with my /report command - by Elka_Blazer - 07.05.2011, 14:44
Re: Problem with my /report command - by BizzyD - 07.05.2011, 14:44

Forum Jump:


Users browsing this thread: 2 Guest(s)