[Ajuda] OnPublicCommandPerfomed (Problema)
#1

Pessoal й o seguinte! Eu coloco no GM a public OnPublicCommandPerfomed mas quando eu digito o CMD que nгo existe nгo aparece Nenhuma Mensagem! nem a normal do Serve "Serve: Unkckomed (seila as bagacera toda)"

Alguem pode Ajudar minha public ta assim:
pawn Code:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if(!success)
    {
        new NaoExiste[148];
        format(NaoExiste, sizeof(NaoExiste), "{0000FF} O Comando: {00FF00}%s{A9A9A9} Nгo existe! Use: {FF0000}/Comandos{FF0000}{A9A9A9}.", cmdtext);
        SendClientMessage(playerid, 0x33AA33AA, NaoExiste);
        return true;
    }
    return true;
}
Pessoal o que tem de Errado to Precisando Muito Disso!
Reply
#2

Tenta colocar return 1...
Reply
#3

Quote:
Originally Posted by n0minal
View Post
Tenta colocar return 1...
Nгo Funcionou! Mais alguma Sugestгo?
Reply
#4

pawn Code:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if(!success) return SendClientMessage(playerid, 0x33AA33AA, "{0000FF} O Comando Que Executou Nгo existe! Use: {FF0000}/Comandos{FF0000}{A9A9A9}.");
    return true;
}
Reply
#5

vc ta usando zcmd?

ou ta usando zcmd + strcmp?
Reply
#6

Defina 'OnPlayerCommandText' para retornar 1.
Reply
#7

Quote:
Originally Posted by n0minal
View Post
Tenta colocar return 1...
1 = true
0 = false
return 1 e return true sгo a mesma coisa. Vгo retornar a verdadeiro.
Reply
#8

Nгo consegui nenhum desses que Vocк flw nem pra return 1; o que o cara mandou. Alguem ae tem mais alguma Sugestгo??
Reply
#9

No final de OnPlayerCommandText coloque:

pawn Code:
GameTextForPlayer(playerid,"~r~/COMANDOS",3000,3);
SendClientMessage(playerid, 0xE0FFFFFF"{C1C1C1}[ERRO]: Comando inexistente. Digite {00FF00}/Comandos {C1C1C1}para obter a lista de comandos existentes.");
PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
return 1;
Tente !
Reply
#10

Quote:
Originally Posted by iD4N0N3_.x[X]x
View Post
No final de OnPlayerCommandText coloque:

pawn Code:
GameTextForPlayer(playerid,"~r~/COMANDOS",3000,3);
SendClientMessage(playerid, 0xE0FFFFFF"{C1C1C1}[ERRO]: Comando inexistente. Digite {00FF00}/Comandos {C1C1C1}para obter a lista de comandos existentes.");
PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
return 1;
Tente !
Nгo faзo uso de "OnPlayerCommandText" eu uso ZCMD.
Reply
#11

Meu OnPlayerCommandPerformed tб assim:

Quote:

public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
if(!success) return SendClientMessage(playerid, -1, "Comando invбlido.");

return 1;
}

E funciona perfeitamente... Verifica se dentro do gm nгo tem mesmo a public OnPlayerCommandText... Dб um CTRL+F ai...

@EDIT: seu zcmd estб em alguma versгo abaixo do 0.3.1? Atualiza ele caso esteja...
Reply
#12

Quote:
Originally Posted by n0minal
View Post
Meu OnPlayerCommandPerformed tб assim:



E funciona perfeitamente... Verifica se dentro do gm nгo tem mesmo a public OnPlayerCommandText... Dб um CTRL+F ai...

@EDIT: seu zcmd estб em alguma versгo abaixo do 0.3.1? Atualiza ele caso esteja...
Nгo sei a versгo da Minha INCLUDE Zcmd sу sei que nгo esta funcionando vou tentar atualizar a Include.
Obrigado, se tiver mais alguma sugestгo manda ae.
Reply
#13

Pessoal meu OnPlayerCommandPerfomed esta assim:
pawn Code:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if(!success)
    {
    SendClientMessage(playerid, 0x33AA33AA, "{0000FF} O Comando Que Executou Nгo existe! Use: {FF0000}/Comandos{FF0000}{A9A9A9}.");
    }
    return 1;
}
Ta atй funcionando mais em todos os Comandos atй que existe Alguem sabe Porque?
Reply
#14

Pessoal agora o Problema estб deste jeito aqui:

-Os Comandos que estгo no Prуpio GM fica falando que nгo existe
-Os Comandos que estгo no PPC_PlayersCommands nгo da erro

Alguem sabe por que? e se sabe pode me ajudar? Obrigado.
Reply
#15

Tente:

Quote:

public OnPlayerCommandPerformed(playerid,cmdtext[],success)
{
if(!success) return SendClientMessage(playerid, 0x33AA33AA,"Comando invбlido.");
return 1;
}

Reply
#16

Quote:
Originally Posted by PlantBR
View Post
Tente:
Continua com MSM problema se ta o CMD no GM ai aparece que esta cMD invalido se nao esta ai fica NORMAL.
Reply
#17

Certo mas a nativa do include a_samp sempre lк oncommandtext... Pois tens de return 0; para o oncommandperformed ou received funciomarem bem...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)