[Ajuda] Problema "Unknow Command" - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Problema "Unknow Command" (
/showthread.php?tid=592645)
Problema "Unknow Command" -
F1N4L - 28.10.2015
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
|
Re: Problema "Unknow Command" -
SepZ - 28.10.2015
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(playerid, CMDtxt[playerid]);
SetTimerEx("@HideWrongCommand", 2000, false, "i", playerid);
return 1;
}
@edit
Re: Problema "Unknow Command" -
Galhardo - 28.10.2015
PHP код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
new CMDtxt[128];
if(!success) //linha 6505
{
TextDrawSetString(CMDtxt, "Comando invalido, digite /cmds."); //linha 6507
TextDrawShowForPlayer(playerid, CMDtxt); //linha 6508
SetTimerEx("@HideWrongCommand", 2000, false, "i", playerid);
return 1;
}
return 1;
}
Re: Problema "Unknow Command" -
F1N4L - 28.10.2015
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(playerid, CMDtxt[playerid]);
SetTimerEx("@HideWrongCommand", 2000, false, "i", playerid);
return 1;
}
@edit
|
Quote:
Originally Posted by Galhardo
PHP код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
new CMDtxt[128];
if(!success) //linha 6505
{
TextDrawSetString(CMDtxt, "Comando invalido, digite /cmds."); //linha 6507
TextDrawShowForPlayer(playerid, CMDtxt); //linha 6508
SetTimerEx("@HideWrongCommand", 2000, false, "i", playerid);
return 1;
}
return 1;
}
|
Obrigado Amigos!