Alguem Me Ajuda
#2

Somente jogadores VIP poder usar o comando?

pawn Code:
if(strcmp(cmd, "/relatorio", true) == 0)
    {
      if(IsPlayerConnected(playerid))
      {
     if(gPlayerLogged[playerid] == 0)
        {
          SendClientMessage(playerid, COLOR_GREY, "Voce nгo estб logado!");
          return 1;
        }
        if(VIP == FALSO)
        {
          SendClientMessage(playerid, COLOR_GREY, "Voce nгo й um VIP!");
          return 1;
        }
        GetPlayerName(playerid, sendername, sizeof(sendername));
            new length = strlen(cmdtext);
            while ((idx < length) && (cmdtext[idx] <= &#39; '))
            {
                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, "USE: /relatorio [text]");
                return 1;
            }
            format(string, sizeof(string), "Relatorio de %s(%d)[%d]: %s", sendername, playerid, pVIP, (result));
            ABroadCast(COLOR_RED,string,1);
            SendClientMessage(playerid, COLOR_YELLOW, "Sua mensagem foi enviada aos admins.");
      }
      return 1;
    }
pawn Code:
if(VIP == FALSO)// ops tinha colocado ao contrбrio =P
    {
       SendClientMessage(playerid, COLOR_GREY, "Voce nгo й um VIP!");
       return 1;
    }
Ou Pastbin:

http://pastebin.com/m254851e7
Reply


Messages In This Thread
Alguem Me Ajuda - by zezao - 12.01.2010, 22:57
Re: Alguem Me Ajuda - by KingstoN* - 12.01.2010, 23:32
Re: Alguem Me Ajuda - by netado - 12.01.2010, 23:33
Re: Alguem Me Ajuda - by zezao - 12.01.2010, 23:45
Re: Alguem Me Ajuda - by KingstoN* - 12.01.2010, 23:47
Re: Alguem Me Ajuda - by JustinSton - 14.01.2010, 14:55
Re: Alguem Me Ajuda - by Guedes747 - 14.01.2010, 20:15
Re: Alguem Me Ajuda - by Sucre Pleasure - 14.01.2010, 22:26
Re: Alguem Me Ajuda - by Guedes747 - 14.01.2010, 23:11

Forum Jump:


Users browsing this thread: 1 Guest(s)