Help with this cmd.
#1

When I add the reason it doesnt show up.

pawn Код:
CMD:report(playerid, params[])
{
    new id, reason[128];
    new nameid[20];

    if(sscanf(params, "s[20]s[70]",nameid, reason))
    {

        SendClientMessage(playerid, COLOR_WHITE, "Use: It will report the selected player.");
        return SendClientMessage(playerid, COLOR_WHITE, "Usage: /Report [Name / ID] [Reason]");
    }
    if(ReturnUser(nameid,playerid) == -1)
    {
        return 1;
    }
    else
    {
        id = ReturnUser(nameid, playerid);
    }

//    if(id==playerid) return SendClientMessage(playerid,COLOR_WHITE,"You cannot report yourself!");
    if (id==INVALID_PLAYER_ID)SendClientMessage(playerid,COLOR_WHITE,"This player is not connected!");
    {
        new Name[MAX_PLAYER_NAME], ReportMessage[128];
        new Name2[MAX_PLAYER_NAME];
        GetPlayerName(playerid, Name, sizeof(Name));
        GetPlayerName(id, Name2, sizeof(Name2));
        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;
     }
    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)