Creating report command?
#6

try this
pawn Код:
dcmd_report(playerid, params[]) // i don't use dcmd, idk about this line
{
    new s_text[128], s_string[128], ID, pname[MAX_PLAYER_NAME], aname[MAX_PLAYER_NAME];
    if(sscanf(params, "us[128]", ID, s_text)) return SendClientMessage(playerid, -1, "Usage: /report [playerid] [reason]");
    if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, -1, "Invalid ID!");
    GetPlayerName(playerid, pname, sizeof(pname));
    GetPlayerName(ID, aname, sizeof(aname));
    format(s_string, sizeof(s_string), "%s(%d) has reported %s(%d) Reason: %s", pname, playerid, aname, ID, s_text);
    for(new playerid=0; playerid<MAX_PLAYERS; playerid++)
    {
        if(IsPlayerAdmin(playerid) || AdminLevel[playerid] >= 1)
        {
            SendClientMessage(playerid, Color, s_string);
        }
    }
    SendClientMessage(playerid, -1, "Your report has been sent to the current admins. The report will be checked. Thank you.");
    return 1;
}
Reply


Messages In This Thread
Creating report command? - by ServerScripter - 28.02.2012, 10:32
Re: Creating report command? - by Sufyan - 28.02.2012, 10:34
Re: Creating report command? - by Ricop522 - 28.02.2012, 10:56
Re: Creating report command? - by ServerScripter - 29.02.2012, 09:54
Re: Creating report command? - by milanosie - 29.02.2012, 09:57
Re: Creating report command? - by emokidx - 29.02.2012, 09:59
Re: Creating report command? - by Ricey - 29.02.2012, 10:01
Re: Creating report command? - by milanosie - 29.02.2012, 10:03
Re: Creating report command? - by Ricey - 29.02.2012, 10:06
Re: Creating report command? - by milanosie - 29.02.2012, 10:14

Forum Jump:


Users browsing this thread: 1 Guest(s)