criando comando reportar
#7

Tente assim
pawn Код:
if(strcmp(cmd,"/reportar",true) == 0) /*|| strcmp(cmd,"/reportar",true) == 0)*///Opcional caso queira adicionar outro call para o comando
    {
        if(IsPlayerConnected(playerid))
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                msg(playerid,RED,"Use corretamente: /reportar");
                return 1;
            }
            new outrofudido;
            outrofudido = strval(tmp);
            if(!IsPlayerConnected(outrofudido)) return SendClientMessage(playerid,RED,"Player Inativo.");
            new willian[MAX_PLAYER_NAME];
            GetPlayerName(playerid, willian, sizeof(willian));
            {
                SendClientMessage(playerid,YELLOW,"Vocк enviou um report para os admins online.");
            }
            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;
            format(string,sizeof(string),"-> Report de: %s contra o id[%d] Motivo do report: %s ",nome,outrofudido,result);
            for(new i;i<MAX_PLAYERS;i++)
            {
                if(IsPlayerAdmin(i))
                {
                    SendClientMessage(i,-1,string);
                    return 1;
                    }
                }
            }
        }
@edit desculpe-me o Double...
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: 2 Guest(s)