[PEDIDO] Fake Chat (Admin)
#9

pawn Код:
// no topo
#define Vermelho                0xFF0000AA

// coloca no  OnPlayerCommandText

if(strcmp(cmd, "/FakeChat", true) == 0)
    {
        if(// Coloca aki o seu sistema pra somente admin)
        {
        tmp = strtok(cmdtext, idx);
        new id = strval(tmp);
        if(!strlen(tmp))
        {
            SendClientMessage(playerid, Vermelho, "|ERRO| Uso correto: /FakeChat [PlayerID][Texto]");
            return 1;
        }
        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++;
        }
        tmp = strtok(cmdtext, idx);
        if(!strlen(result))
        {
            SendClientMessage(playerid, Vermelho, "|ERRO| Uso correto: /FakeChat [PlayerID][Texto]");
            return 1;
        }
        if(!IsPlayerConnected(id))
        {
            SendClientMessage(playerid, Vermelho,"|ERRO| Uso correto: /FakeChat [PlayerID][Texto]");
            return 1;
        }
        result[idx - offset] = EOS;
        OnPlayerText(id, result);

        return 1;
        }
    }
tenta isso.. eu dei uma editada.... ve se vai funfa pq eu nao testei...
se ajudei +rep
Reply


Messages In This Thread
[PEDIDO] Fake Chat (Admin) - by xPaulistaa - 09.04.2012, 18:56
Re: [PEDIDO] Fake Chat (Admin) - by Đeagle - 09.04.2012, 18:59
Re: [PEDIDO] Fake Chat (Admin) - by rafinha.faria - 09.04.2012, 19:00
Re: [PEDIDO] Fake Chat (Admin) - by xPaulistaa - 09.04.2012, 19:02
Re: [PEDIDO] Fake Chat (Admin) - by Đeagle - 09.04.2012, 19:05
Re: [PEDIDO] Fake Chat (Admin) - by xPaulistaa - 09.04.2012, 19:07
Re: [PEDIDO] Fake Chat (Admin) - by rafinha.faria - 09.04.2012, 19:07
Re: [PEDIDO] Fake Chat (Admin) - by Đeagle - 09.04.2012, 19:09
Re: [PEDIDO] Fake Chat (Admin) - by rafinha.faria - 09.04.2012, 19:11
Re: [PEDIDO] Fake Chat (Admin) - by xPaulistaa - 09.04.2012, 19:12

Forum Jump:


Users browsing this thread: 1 Guest(s)