[Ajuda] Problema "Unknow Command"
#1

O problema й que para evitar a famosa frase de erro de comando samp se usa geralmente uma TextDraw ou uma SendClientMessage, porйm eu vi no sistema do Garfield (GM Moro Logo Ali), esse cуdigo mas nгo sei como colocб-lo no meu GM! cуdigo muito bacana porйm da erro.

Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
	new CMDtxt[128]
	if(!success) //linha 6505
	{
        TextDrawSetString(CMDtxt[playerid], Desbug("Comando invalido, digite /cmds.")); //linha 6507
        TextDrawShowForPlayer(playerid, CMDtxt[playerid]); //linha 6508
        SetTimerEx("@HideWrongCommand", 2000, false, "i", playerid);
        return 1;
    }
	return 1;
}
Quote:

x.pwn(6505) : error 001: expected token: ";", but found "if"
x.pwn(6507) : warning 213: tag mismatch
x.pwn(6507) : error 017: undefined symbol "Desbug"
x.pwn(650 : warning 213: tag mismatch

Reply
#2

que funзгo й essa, "Desbug"?

PHP код:
// topo do gm
new Text:CMDtext[MAX_PLAYERS];
//OnGameModeInit
TextDrawCreate(...
//CommandPerf..
if(!success//linha 6505
{
    
TextDrawSetString(CMDtxt[playerid], "Comando invalido, digite /cmds."); 
    
TextDrawShowForPlayer(playeridCMDtxt[playerid]); 
    
SetTimerEx("@HideWrongCommand"2000false"i"playerid);
    return 
1;

@edit
Reply
#3

PHP код:
public OnPlayerCommandPerformed(playeridcmdtext[], success)
{
    new 
CMDtxt[128];
    if(!
success//linha 6505
    
{
            
TextDrawSetString(CMDtxt"Comando invalido, digite /cmds."); //linha 6507
            
TextDrawShowForPlayer(playeridCMDtxt); //linha 6508
            
SetTimerEx("@HideWrongCommand"2000false"i"playerid);
            return 
1;
    }
    return 
1;

Reply
#4

Quote:
Originally Posted by SepZ
Посмотреть сообщение
que funзгo й essa, "Desbug"?

PHP код:
// topo do gm
new Text:CMDtext[MAX_PLAYERS];
//OnGameModeInit
TextDrawCreate(...
//CommandPerf..
if(!success//linha 6505
{
    
TextDrawSetString(CMDtxt[playerid], "Comando invalido, digite /cmds."); 
    
TextDrawShowForPlayer(playeridCMDtxt[playerid]); 
    
SetTimerEx("@HideWrongCommand"2000false"i"playerid);
    return 
1;

@edit
Quote:
Originally Posted by Galhardo
Посмотреть сообщение
PHP код:
public OnPlayerCommandPerformed(playeridcmdtext[], success)
{
    new 
CMDtxt[128];
    if(!
success//linha 6505
    
{
            
TextDrawSetString(CMDtxt"Comando invalido, digite /cmds."); //linha 6507
            
TextDrawShowForPlayer(playeridCMDtxt); //linha 6508
            
SetTimerEx("@HideWrongCommand"2000false"i"playerid);
            return 
1;
    }
    return 
1;

Obrigado Amigos!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)