SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Português/Portuguese

Reply
 
Thread Tools Display Modes
Old 26/09/2017, 02:02 AM   #1
CezarBR
Big Clucker
 
CezarBR's Avatar
 
Join Date: Jul 2016
Location: Brasil-Minas Gerais
Posts: 139
Reputation: 2
Smile Unknown Command

Como tira o Unknown Command usando o y_commands?
__________________
Só sei que nada sei ~ Sócrates
CezarBR is offline   Reply With Quote
Old 26/09/2017, 02:08 AM   #2
RuanPereira
Big Clucker
 
RuanPereira's Avatar
 
Join Date: Mar 2017
Posts: 115
Reputation: 0
Default Re: Unknown Command

Tenta asim.

Quote:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
if(!success)
{
SendClientMessage(playerid, COLOR_LIGHTGREEN, "SERVER: Comando não encontrado.");//Escreva o que quiser !
return 1;
}
return 1;
}
RuanPereira is offline   Reply With Quote
Old 26/09/2017, 02:14 AM   #3
CezarBR
Big Clucker
 
CezarBR's Avatar
 
Join Date: Jul 2016
Location: Brasil-Minas Gerais
Posts: 139
Reputation: 2
Default Re: Unknown Command

Quote:
Originally Posted by RuanPereira View Post
Tenta asim.
Não funciona, já tentei antes !

aparece esses erros:
Quote:
C:\xx\xx\xx\xxx\pawno\include\YSI\..\YSI_Visual\y_ commands/impl.inc(229) : error 025: function heading differs from prototype
C:\xx\xx\xx\xxx\gamemodes\GM.pwn(231) : error 025: function heading differs from prototype
C:\xx\xx\xxx\xxx\gamemodes\GM.pwn(235) : error 017: undefined symbol "COLOR_LIGHTGREEN"
__________________
Só sei que nada sei ~ Sócrates
CezarBR is offline   Reply With Quote
Old 26/09/2017, 02:15 AM   #4
C4rtm4n
Gangsta
 
C4rtm4n's Avatar
 
Join Date: Jul 2017
Location: South Park
Posts: 657
Reputation: 15
Default Re: Unknown Command

PHP Code:
public OnPlayerCommandPerformed(playeridcmdtext[], success)
{
    if( !
success )
    {
        
formatcmdtext128" ERRO: O comando %s não existe veja em /comandos todos  "cmdtext );
        
SendClientMessageplayerid, -1cmdtext );
        
    }
    return 
true;

recomendo ler:http://forum.sa-mp.com/showthread.php?t=460056
__________________
No Projects At the moment

C4rtm4n is offline   Reply With Quote
Old 26/09/2017, 02:20 AM   #5
CezarBR
Big Clucker
 
CezarBR's Avatar
 
Join Date: Jul 2016
Location: Brasil-Minas Gerais
Posts: 139
Reputation: 2
Default Re: Unknown Command

Quote:
Originally Posted by C4rtm4n View Post
PHP Code:
public OnPlayerCommandPerformed(playeridcmdtext[], success)
{
    if( !
success )
    {
        
formatcmdtext128" ERRO: O comando %s não existe veja em /comandos todos  "cmdtext );
        
SendClientMessageplayerid, -1cmdtext );
        
    }
    return 
true;

recomendo ler:http://forum.sa-mp.com/showthread.php?t=460056
Não funciona !, e eu não consigo entrar no seu link !

Erro no Script:
Quote:
C:\xx\xx\xx\xxx\pawno\include\YSI\..\YSI_Visual\y_ commands/impl.inc(229) : error 025: function heading differs from prototype
C:\xx\xx\xx\xxx\gamemodes\GM.pwn(231) : error 025: function heading differs from prototype
Erro no Link:
Quote:
No Thread specified. If you followed a valid link, please notify the administrator
@edit

Consegui entrar no link !, eu já tinha olhado esse post antes kkkk
__________________
Só sei que nada sei ~ Sócrates
CezarBR is offline   Reply With Quote
Old 26/09/2017, 02:22 AM   #6
C4rtm4n
Gangsta
 
C4rtm4n's Avatar
 
Join Date: Jul 2017
Location: South Park
Posts: 657
Reputation: 15
Default Re: Unknown Command

Quote:
Originally Posted by CezarBR View Post
Não funciona !, e eu não consigo entrar no seu link !

Erro no Script:


Erro no Link:
Você testou ? eu fiz desse jeito no meu GM e funcionou eu uso YCMD e ZCMD,o link ta on.
__________________
No Projects At the moment

C4rtm4n is offline   Reply With Quote
Old 26/09/2017, 02:24 AM   #7
fxckshzt
Huge Clucker
 
Join Date: Jul 2017
Location: 127.0.0.1
Posts: 264
Reputation: 11
Default Re: Unknown Command

Mensagem: UNKNOWN COMMAND
Quando um player escreve um comando que nao existe recebe a mensagem: "SERVER: Unknown Command." entao como alterar essa mensagem?
Basta colocar a CallBack OnPlayerCommandPerformed e usar por exemplo assim:

Code:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if( !success ) return false;
    return true;
}
Mas podemos colocar uma mensagem para ficar mais agradavel de ser ver, para isso usamos assim:

Code:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if( !success )
	{
		format( cmdtext, 128, " ERRO: O comando %s não existe veja em /comandos todos  ", cmdtext );
		SendClientMessage( playerid, -1, cmdtext );
		
	}
    return true;
}
__________________
Paz & Amor
fxckshzt is offline   Reply With Quote
Old 26/09/2017, 02:24 AM   #8
CezarBR
Big Clucker
 
CezarBR's Avatar
 
Join Date: Jul 2016
Location: Brasil-Minas Gerais
Posts: 139
Reputation: 2
Default Re: Unknown Command

Quote:
Originally Posted by C4rtm4n View Post
Você testou ? eu fiz desse jeito no meu GM e funcionou eu uso YCMD e ZCMD,o link ta on.
o meu não foi :/, eu já tinha olhado esse post. Valeu por tentar ajudar !
__________________
Só sei que nada sei ~ Sócrates
CezarBR is offline   Reply With Quote
Old 26/09/2017, 02:25 AM   #9
C4rtm4n
Gangsta
 
C4rtm4n's Avatar
 
Join Date: Jul 2017
Location: South Park
Posts: 657
Reputation: 15
Default Re: Unknown Command

Quote:
Originally Posted by fxckshzt View Post
Mensagem: UNKNOWN COMMAND
Quando um player escreve um comando que nao existe recebe a mensagem: "SERVER: Unknown Command." entao como alterar essa mensagem?
Basta colocar a CallBack OnPlayerCommandPerformed e usar por exemplo assim:

Code:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if( !success ) return false;
    return true;
}
Mas podemos colocar uma mensagem para ficar mais agradavel de ser ver, para isso usamos assim:

Code:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if( !success )
	{
		format( cmdtext, 128, " ERRO: O comando %s não existe veja em /comandos todos  ", cmdtext );
		SendClientMessage( playerid, -1, cmdtext );
		
	}
    return true;
}
Curti o CTRL C + CTRL V do tutorial do PT slc 10/10
__________________
No Projects At the moment

C4rtm4n is offline   Reply With Quote
Old 26/09/2017, 02:27 AM   #10
CezarBR
Big Clucker
 
CezarBR's Avatar
 
Join Date: Jul 2016
Location: Brasil-Minas Gerais
Posts: 139
Reputation: 2
Default Re: Unknown Command

Quote:
Originally Posted by C4rtm4n View Post
Curti o CTRL C + CTRL V do tutorial do PT slc 10/10
kkkkkkkkkkkkkkkkkkkkkkkkk PT foi kibado ao vivo
__________________
Só sei que nada sei ~ Sócrates
CezarBR is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with YCMD proces command and problem with "Server:Unknown command JoDe Scripting Help 1 20/04/2018 12:12 PM
Problem with command. Only returns Server: Unknown Command Knappen Scripting Help 9 18/12/2013 06:09 PM
[Command Bugged] Each time i use /respawnallcars it says Unknown Command Rand_Omar Scripting Help 11 30/09/2012 12:35 AM
Executed ZCMD command returns SERVER: Unknown Command SexTourist Scripting Help 12 03/01/2012 03:38 PM
Slap command returns an Unknown Command when player is not connected HydraX Help Archive 16 01/08/2011 05:19 AM


All times are GMT. The time now is 11:54 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.