report cmd
#1

i want to create report cmd so this NOT IS Dialog
I want when player type /report reason) and send this to admin
anyone help me
Reply
#2

PHP код:
CMD:report(playerid, params[])
{
    new 
string[128];

    if(
isnull(params) || strlen(params) < 1 || strlen(params) > 64)
        return 
SendClientMessage(playerid, -1, "USAGE: /report [report text]");
        
    
format(string, sizeof(string), "* /report : %s (ID: %d) - (%s)", params);
    for(new 
i; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i))
    {
        if(
IsPlayerAdmin(i)) // Change this on the way how you detect if player is an admin
        
{
            
SendClientMessage(i, 0x33AA33FF, string);
        }
    }
    
    
SendClientMessage(playerid, -1, "Your report has been sent to admins.");
    return 
1;
} 
Reply
#3

Quote:
Originally Posted by JaKe Elite
Посмотреть сообщение
PHP код:
CMD:report(playerid, params[])
{
    new 
string[128];
    if(
isnull(params) || strlen(params) < 1 || strlen(params) > 64)
        return 
SendClientMessage(playerid, -1, "USAGE: /report [report text]");
        
    
format(string, sizeof(string), "* /report : %s (ID: %d) - (%s)", params);
    for(new 
i; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i))
    {
        if(
IsPlayerAdmin(i)) // Change this on the way how you detect if player is an admin
        
{
            
SendClientMessage(i, 0x33AA33FF, string);
        }
    }
    
    
SendClientMessage(playerid, -1, "Your report has been sent to admins.");
    return 
1;
} 
How to admin see this report
Reply
#4

Quote:
Originally Posted by Hiei
Посмотреть сообщение
How to admin see this report
If the player have admin level or in staff team
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)