Help with this cmd.
#2

Untested:

pawn Код:
CMD:report(playerid, params[])
{
    new id, reason[128], sendername[MAX_PLAYER_NAME], receivername[MAX_PLAYER_NAME];
    if(sscanf(params, "us[128]", id, reason) == 0)
    {
        if(id != playerid)
        {
            if(strlen(reason) > 2)
            {
                new ReportMessage[256];
                GetPlayerName(playerid, sendername, sizeof(sendername));
                GetPlayerName(id, receivername, sizeof(receivername));
                format(ReportMessage, sizeof(ReportMessage), "New Report From: %s [ID: %d] reported %s [ID: %d] [Reason: %s]", Name, playerid, Name2, id, ReportMessage);
                SendClientMessageToAdmins(COLOR_WHITE, ReportMessage);
                Report[playerid] = 1;
            }
            else
            {
                SendClientMessage(playerid, COLOR_WHITE, "Error - Your report was invalid. (Too short)");
                return 1;
            }
        }
        else
        {
            SendClientMessage(playerid, COLOR_WHITE, "Error - You can't report yourself!");
            return 1;
        }
    }
    else
    {
        SendClientMessage(playerid, COLOR_WHITE, "USAGE: /report [PlayerID/PartOfName] [Reason]");
        return 1;
    }
}
Reply


Messages In This Thread
Help with this cmd. - by Super_Panda - 13.12.2011, 20:46
Re: Help with this cmd. - by Rob_Maate - 13.12.2011, 20:59

Forum Jump:


Users browsing this thread: 2 Guest(s)