criando comando reportar
#2

pawn Код:
if(strcmp(cmd, "/reportar", true) == 0)
    {
        new string[256];
        tmp = strtok(cmdtext, idx);
        new otherplayer = strval(tmp);
        if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_RED, "USE: /reportar [id] [motivo]");
        new length = strlen(cmdtext);
        while ((idx < length) && (cmdtext[idx] <= ' '))
        {
        idx++;
        }
        new offset = idx;
        new result[64];
        while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
        {
        result[idx - offset] = cmdtext[idx];
        idx++;
        }
        result[idx - offset] = EOS;
        if(!strlen(result)) return SendClientMessage(playerid, COLOR_RED, "USE: /reportar [id] [motivo]");
        if(!IsPlayerConnected(otherplayer)) return SendClientMessage(playerid, COLOR_WHITE, "[ERRO] Jogador indisponнvel.");
        GetPlayerName(playerid, playrname, sizeof(playrname));
        {
        SendClientMessage(playerid, COLOR_RED, "[AVISO] Seu report foi enviado para a Administraзгo.");
        }
        format(string,sizeof(string),"Report de {FFFFFF}%s{FFFF00}: [{FFFFFF}ID:%d {FFFF00}Razгo pelo Report: {FFFFFF}%s.{FFFF00}]", playrname, otherplayer, result);
        for(new i=0;i<MAX_PLAYERS;i++)
        {
            if(IsPlayerConnected(i) && PlayerInfo[i][Admin] >= 1)
            {
            SendClientMessage(i,COLOR_YELLOW,string);
            }
        }
        return 1;
    }
Mude a variбvel PlayerInfo[i][Admin] >= 1 para a que vocк tem no seu sistema, ou use IsPlayerAdmin.
Reply


Messages In This Thread
criando comando reportar - by CanTLoGin - 30.08.2011, 02:49
Re: criando comando reportar - by [AF]Junior - 30.08.2011, 03:23
Re: criando comando reportar - by CanTLoGin - 30.08.2011, 04:36
Re: criando comando reportar - by WLSF - 30.08.2011, 04:53
Re: criando comando reportar - by CanTLoGin - 30.08.2011, 05:12
Re: criando comando reportar - by WLSF - 30.08.2011, 05:21
Re: criando comando reportar - by WLSF - 30.08.2011, 05:25
Re: criando comando reportar - by CanTLoGin - 30.08.2011, 05:28
Re: criando comando reportar - by WLSF - 30.08.2011, 05:33
Re: criando comando reportar - by CanTLoGin - 30.08.2011, 05:44

Forum Jump:


Users browsing this thread: 1 Guest(s)