[Ajuda] Ajuda Criar comando
#1

Alguem sabe criar um comando Ex: /Comandos e depois vai aparecer uma lista com muitos comandos nao em "Dialog"

Em normal como nos servidores de RPG quando se escreve /ajuda... ate aparece /rg /nivel etc...
Reply
#2

pawn Код:
if(strcmp(cmdtext, "/comando", true) == 0)
    {
        SendClientMessage(playerid, COR, "/x /x /x /x /x /x /x /x /x");
        SendClientMessage(playerid, COR, "/x /x /x /x /x /x /x /x /x");
        SendClientMessage(playerid, COR, "/x /x /x /x /x /x /x /x /x");
        SendClientMessage(playerid, COR, "/x /x /x /x /x /x /x /x /x");
        SendClientMessage(playerid, COR, "/x /x /x /x /x /x /x /x /x");
        SendClientMessage(playerid, COR, "/x /x /x /x /x /x /x /x /x");
        return 1;
    }
Sу seguir este modelo.
Reply
#3

Quote:
Originally Posted by Victor'
Посмотреть сообщение
pawn Код:
if(strcmp(cmdtext, "/comando", true) == 0)
    {
        SendClientMessage(playerid, COR, "/x /x /x /x /x /x /x /x /x");
        SendClientMessage(playerid, COR, "/x /x /x /x /x /x /x /x /x");
        SendClientMessage(playerid, COR, "/x /x /x /x /x /x /x /x /x");
        SendClientMessage(playerid, COR, "/x /x /x /x /x /x /x /x /x");
        SendClientMessage(playerid, COR, "/x /x /x /x /x /x /x /x /x");
        SendClientMessage(playerid, COR, "/x /x /x /x /x /x /x /x /x");
        return 1;
    }
Sу seguir este modelo.
ZCMD й melhor -q

pawn Код:
CMD:comandos(playerid)
    {
        SendClientMessage(playerid, COR, "/x /x /x /x /x /x /x /x /x");
        SendClientMessage(playerid, COR, "/x /x /x /x /x /x /x /x /x");
        SendClientMessage(playerid, COR, "/x /x /x /x /x /x /x /x /x");
        SendClientMessage(playerid, COR, "/x /x /x /x /x /x /x /x /x");
        SendClientMessage(playerid, COR, "/x /x /x /x /x /x /x /x /x");
        SendClientMessage(playerid, COR, "/x /x /x /x /x /x /x /x /x");
        return 1;
    }
PS: Caso essas linhas nгo seja suficiente crie outras ....

Caso tenha alguma duvida acesse este link : http://www.wiki.sa-mp.com/wiki/Funct...dClientMessage
Reply
#4

Victor tem erro

Linhas:
PHP код:
C:\Users\Vitor\Desktop\Server Teste\gamemodes\Server.pwn(60) : error 010invalid function or declaration
C
:\Users\Vitor\Desktop\Server Teste\gamemodes\Server.pwn(65) : error 010invalid function or declaration
Pawn compiler 3.2.3664              Copyright 
(c1997-2006ITB CompuPhase
2 Errors

Erro:
Reply
#5

Coloque alguma Cor ...

@EDIT

Usa o meu que nгo tem erro -q
Reply
#6

Me de um tipo de Cor eu meti COLOR_RED mas ta dando erro diz que nao existe COLOR_RED
Reply
#7

Vocк precisa colocar dentro da public OnPlayerCommandText(playerid,cmdtext[]) e trocar COR pela cor que vocк quer (exemplo: verde = 0x00FF00AA | azul = 0x0000FFAA | vermelho = 0xFF0000AA [0xRRGGBBAA])

Ou se vocк estiver usando zcmd faзa como o Ades falou.
Reply
#8

Quote:
Originally Posted by Victor'
Посмотреть сообщение
Vocк precisa colocar dentro da public OnPlayerCommandText(playerid,cmdtext[]) e trocar COR pela cor que vocк quer (exemplo: verde = 0x00FF00AA | azul = 0x0000FFAA | vermelho = 0xFF0000AA [0xRRGGBBAA])

Ou se vocк estiver usando zcmd faзa como o Ades falou.
Cores se define assim :
pawn Код:
#define COR_VERDE 0x00FF00AA
#define COR_AZUL  0x0000FFAA
Neste ritmo
Reply
#9

Quote:
Originally Posted by Ades
Посмотреть сообщение
ZCMD й melhor -q

pawn Код:
CMD:comandos(playerid)
    {
        SendClientMessage(playerid, COR, "/x /x /x /x /x /x /x /x /x");
        SendClientMessage(playerid, COR, "/x /x /x /x /x /x /x /x /x");
        SendClientMessage(playerid, COR, "/x /x /x /x /x /x /x /x /x");
        SendClientMessage(playerid, COR, "/x /x /x /x /x /x /x /x /x");
        SendClientMessage(playerid, COR, "/x /x /x /x /x /x /x /x /x");
        SendClientMessage(playerid, COR, "/x /x /x /x /x /x /x /x /x");
        return 1;
    }
PS: Caso essas linhas nгo seja suficiente crie outras ....

Caso tenha alguma duvida acesse este link : http://www.wiki.sa-mp.com/wiki/Funct...dClientMessage
Sу uma pergunta. Porque ZCMD й melhor se o comando nгo usa parвmetros?
Reply
#10

Quote:
Originally Posted by [FeK]DraKiNs
Посмотреть сообщение
Sу uma pergunta. Porque ZCMD й melhor se o comando nгo usa parвmetros?
Por que й um processador de comandos -qq
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)