/report problem
#2

PHP код:
if(strcmp(cmd"/report"true) == 0)
{
    new 
str[256], idxn[24], n2[24];
    
str strtok(cmdtextidx);
    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) || !strlen(str)) return SendClientMessage(playerid0xFFFFFFFF"USAGE: /report [id] [reason]");
    if(!
IsPlayerConnected(strval(str) || strval(str) == INVALID_PLAYER_ID) return SendClientMessage(plaeyrid0xFF0000FF"INVALID ID.");
    
GetPlayerName(playeridn24);
    
GetPlayerName(strval(str), n224);
    
format(strsizeof str"%s [%d] was reported by %s [%d] | Reason: %s"n2strval(str), strplayeridresult);
    for(new 
0MAX_PLAYERS++) { if(IsPlayerAdmin(i)) SendClientMessage(i0xFFFF00FFstr); }
    
SendClientMessage(playerid0xFFFF00FF"Your report message was sent to online administrators, thank you.");
    return 
1;

Note: IT'S YOUR THIRD THREAD ABOUT THE SAME THING ! ¬¬'

https://sampforum.blast.hk/showthread.php?tid=268371
https://sampforum.blast.hk/showthread.php?tid=268386
Reply


Messages In This Thread
/report problem - by MeNMyselv - 12.07.2011, 15:05
Re: /report problem - by Shadoww5 - 12.07.2011, 15:38
Re: /report problem - by MeNMyselv - 12.07.2011, 15:39
Re: /report problem - by MeNMyselv - 12.07.2011, 15:41
Re: /report problem - by MeNMyselv - 12.07.2011, 15:44
Re: /report problem - by MeNMyselv - 12.07.2011, 16:04
Re: /report problem - by Unte99 - 12.07.2011, 16:16
Re: /report problem - by MeNMyselv - 12.07.2011, 16:48
Re: /report problem - by Unte99 - 12.07.2011, 17:46
Re: /report problem - by Shadoww5 - 12.07.2011, 20:11

Forum Jump:


Users browsing this thread: 2 Guest(s)