[PEDIDO] CMD de Anъncio
#3

Fiz um /av Bem legal todo seu:

pawn Код:
if(strcmp(cmd, "/avisar", true) == 0 || strcmp(cmd, "/av", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
          if(IsPlayerAdmin(playerid))//Tem que estar logado da RCON :D
            {
                SendClientMessage(playerid, COLOR_GREY, "   Vocк nгo й um Admin!");
                return 1;
            }
            GetPlayerName(playerid, sendername, sizeof(sendername));
            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))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "{02EDE}USE: {02EDED}(/av)isar [TEXTO]");
                return 1;
            }
            SendClientMessageToAll(COLOR_DBLUE, "{02EDED}|_____________{FF0037}Aviso Do Admin{02EDED}_____________|");
            format(string, sizeof(string), "{046DB3}***{FF0037}Admin: {{02EDED}%s {FF00BF}ID:[{02EDED}%d]: {02EDED}%s", sendername, playerid, result);
            SendClientMessageToAll(0x33FF00FF, string);
        }
        return 1;
    }
Espero Ter Ajudado
Reply


Messages In This Thread
[PEDIDO] CMD de Anъncio - by [AF]Junior - 23.02.2011, 13:40
Re: [PEDIDO] CMD de Anъncio - by [Ips]Guh - 23.02.2011, 13:47
Re: [PEDIDO] CMD de Anъncio - by bruno-style - 23.02.2011, 14:02
Re: [PEDIDO] CMD de Anъncio - by [AF]Junior - 23.02.2011, 14:14
Re: [PEDIDO] CMD de Anъncio - by bruno-style - 23.02.2011, 14:18
Re: [PEDIDO] CMD de Anъncio - by steki. - 23.02.2011, 15:22
Re: [PEDIDO] CMD de Anъncio - by Ricop522 - 23.02.2011, 15:33
Re: [PEDIDO] CMD de Anъncio - by steki. - 23.02.2011, 15:52
Re: [PEDIDO] CMD de Anъncio - by [AF]Junior - 23.02.2011, 20:42

Forum Jump:


Users browsing this thread: 7 Guest(s)