Help in making /reports command
#6

PHP код:
COMMAND:report(playeridparams[])
{
    new 
pName[MAX_PLAYER_NAME], aName[MAX_PLAYER_NAME], str[128], reasoniD;
    if (
sscanf(params"dz"iDreason)) return SendClientMessage(playerid0xAA3333AA"Usage: /report [id] [reason]");
    if (
iD == INVALID_PLAYER_ID) return SendClientMessage(playerid0xAA3333AA"Invalid ID.");
    
GetPlayerName(playeridpNamesizeof(pName));
    
GetPlayerName(iDaNamesizeof(aName));
    
SendClientMessage(playerid,COLOR_RED,"Your report has been sent to admins");
    for (new 
0MAX_PLAYERSi++)
    {
        if (
IsPlayerConnected(i))
        {
            new 
zName[MAX_PLAYER_NAME], pFile[256];
            
GetPlayerName(izNamesizeof(zName));
            
format(pFilesizeof(pFile), "Admin\%s.ini"zName);
            if (
PInfo[playerid][Level] <1)
            {
                
format(strsizeof(str), "%s(%d) has reported %s(%d) for: %s"pNameplayeridaNameiDreason);
                
SendClientMessage(i0xFFFFFFFFstr);
            }
        }
    }
    return 
1;

Reply


Messages In This Thread
Help in making /reports command - by Youssef221 - 05.12.2014, 06:00
Re: Help in making /reports command - by xCrazyMonkey - 05.12.2014, 06:33
Re: Help in making /reports command - by OsteeN - 05.12.2014, 06:40
Re: Help in making /reports command - by Youssef221 - 05.12.2014, 06:43
Re: Help in making /reports command - by Youssef221 - 05.12.2014, 10:04
Re: Help in making /reports command - by Diti1 - 05.12.2014, 12:11

Forum Jump:


Users browsing this thread: 2 Guest(s)