Help me, IMPORTANT plz read
#4

pawn Код:
dcmd_report(playerid, params[])
{
    new pName[MAX_PLAYER_NAME], aName[MAX_PLAYER_NAME], str[128], reason, iD;
    if (sscanf(params, "dz", iD, reason)) return SendClientMessage(playerid, 0xAA3333AA, "Usage: /report [id] [reason]");
    if (iD == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xAA3333AA, "Invalid ID.");
    if (playerid == iD) return SendClientMessage(playerid, 0xAA3333AA, "You can't report yourself.");
    GetPlayerName(playerid, pName, sizeof(pName));
    GetPlayerName(iD, aName, sizeof(aName));
    for (new i = 0; i < MAX_PLAYERS; i++)
    {
        if (IsPlayerConnected(i))
        {
            new zName[MAX_PLAYER_NAME], pFile[256];
            GetPlayerName(i, zName, sizeof(zName));
            format(pFile, sizeof(pFile), "Users\%s.ini", zName);
            if (IsPlayerAdmin(i) || dini_Int(pFile, "AdminLevel") >= 1)
            {
                format(str, sizeof(str), "%s(%d) has reported %s(%d) for: %s", pName, playerid, aName, iD, reason);
                SendClientMessage(i, 0xFFFFFFFF, str);
            }
        }
    }
    return 1;
}
Not tested.
Reply


Messages In This Thread
Help me, IMPORTANT plz read - by MBX97 - 15.02.2011, 23:20
Re: Help me, IMPORTANT plz read - by admantis - 15.02.2011, 23:52
Re: Help me, IMPORTANT plz read - by MBX97 - 15.02.2011, 23:56
Re: Help me, IMPORTANT plz read - by AlExAlExAlEx - 16.02.2011, 06:31
Re: Help me, IMPORTANT plz read - by MBX97 - 16.02.2011, 11:02
Re: Help me, IMPORTANT plz read - by Zack9764 - 16.02.2011, 11:05
Re: Help me, IMPORTANT plz read - by MBX97 - 16.02.2011, 13:25

Forum Jump:


Users browsing this thread: 1 Guest(s)