/report Command
#2

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;
}
from https://sampforum.blast.hk/showthread.php?tid=217479
just change the variables. its easy
Reply


Messages In This Thread
/report Command - by Ely - 26.10.2011, 20:31
Re: /report Command - by |_ⒾⓇⓄN_ⒹⓄG_| - 26.10.2011, 20:39
Re: /report Command - by TheBluec0de - 26.10.2011, 20:40
Re: /report Command - by Ely - 26.10.2011, 20:44
Re: /report Command - by |_ⒾⓇⓄN_ⒹⓄG_| - 26.10.2011, 21:11
Re: /report Command - by Ely - 26.10.2011, 21:50
Re: /report Command - by Ely - 27.10.2011, 06:07
Re: /report Command - by =WoR=Varth - 27.10.2011, 06:10
Re: /report Command - by Ely - 27.10.2011, 09:14
Re: /report Command - by Ely - 27.10.2011, 09:23

Forum Jump:


Users browsing this thread: 1 Guest(s)