[Ajuda] /Reportar [ID] [Denъncia]
#3

hm.. troca esses seus comandos para zcmd e sscanf que fica bem mais facil!

Usa este /relatorio como exemplo:
pawn Код:
if(strcmp(cmd, "/relatorio", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
                    new sendername[MAX_PLAYER_NAME]
                        GetPlayerName(playerid, sendername, sizeof(sendername));
            new length = strlen(cmdtext);
            while ((idx < length) && (cmdtext[idx] <= ' '))
            {
                idx++;
            }
            new offset = idx;
            new result[800];
            while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
            {
                result[idx - offset] = cmdtext[idx];
                idx++;
            }
            result[idx - offset] = EOS;
            if(!strlen(result))
            {
                SendClientMessage(playerid, -1, "Uso Correto: /Relatуrio [Texto]");
                                return 0x01;
            }
                        if(VARIAVEL PLAYER NORMAL)
                       {
            format(string, sizeof(string), "[Relatуrio][%d] %s: %s",playerid, sendername, (result));
            SendClientMessageToAll(0xFFFF00FF,string);
                }
                        if(VARIAVEL PLAYER VIP)
                       {
            format(string, sizeof(string), "[Relatуrio][%d] %s: %s",playerid, sendername, (result));
            SendClientMessageToAll(0x057ABDAA,string);
                }
                        if(VARIAVEL PLAYER SOCIO)
                       {
            format(string, sizeof(string), "[Relatуrio][%d] %s: %s",playerid, sendername, (result));
            SendClientMessageToAll(0xFF0000FF,string);
                }

        }
     return 0x01;
    }
Reply


Messages In This Thread
/Reportar [ID] [Denъncia] - by powerths - 23.08.2013, 00:39
Re: /Reportar [ID] [Denъncia] - by powerths - 23.08.2013, 09:53
Respuesta: /Reportar [ID] [Denъncia] - by ViniKuliveguisky - 23.08.2013, 10:43
Re: /Reportar [ID] [Denъncia] - by powerths - 23.08.2013, 15:10
Respuesta: /Reportar [ID] [Denъncia] - by ViniKuliveguisky - 23.08.2013, 15:53
Re: /Reportar [ID] [Denъncia] - by Sti - 25.08.2013, 03:09

Forum Jump:


Users browsing this thread: 2 Guest(s)