Report command
#2

PHP код:
if(strcmp(cmd"/report"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            
GetPlayerName(playeridsendernamesizeof(sendername));
            new 
length strlen(cmdtext);
            while ((
idx length) && (cmdtext[idx] <= ' '))
            {
                
idx++;
            }
            new 
offset idx;
            new 
result[96];
            while ((
idx length) && ((idx offset) < (sizeof(result) - 1)))
            {
                
result[idx offset] = cmdtext[idx];
                
idx++;
            }
            
result[idx offset] = EOS;
            if(!
strlen(result)) return SendClientMessage(playeridCOLOR_WHITE"USAGE: /report [text]");
            
format(stringsizeof(string), "Report from [%d]%s: %s",playeridsendername, (result));
            
ABroadCast(COLOR_LIGHTYELLOW,string,1);
            
SendClientMessage(playeridCOLOR_YELLOW"Your report message was sent to online administrators, thank you.");
        }
        return 
1;
    } 
WoodPecker gave you this code in your topic today -.-
Reply


Messages In This Thread
Report command - by MeNMyselv - 12.07.2011, 12:24
Re: Report command - by [MG]Dimi - 12.07.2011, 12:27
Re: Report command - by MeNMyselv - 12.07.2011, 12:29
Re: Report command - by MeNMyselv - 12.07.2011, 12:37
Re: Report command - by MeNMyselv - 12.07.2011, 13:19
Re: Report command - by Shadoww5 - 12.07.2011, 13:30

Forum Jump:


Users browsing this thread: 1 Guest(s)