- Fail Commands. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: - Fail Commands. (
/showthread.php?tid=379008)
- Fail Commands. -
Bug. - 20.09.2012
How creat system if player do some fail command its say him
Something like this "Error: to see server cmd do (/help) Or (/helpme)."
Re: - Fail Commands. -
antonio112 - 20.09.2012
Change your 'OnPlayerCommandText' callback:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
//Change the return
return SendClientMessage(playerid, -1, "That command does not exist. Use /help or /commands.");
}
- Errors - -
Bug. - 20.09.2012
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
return SendClientMessage(playerid, -1, "That command does not exist. Use /help or /commands.");
return 0;
}
Код HTML:
I:\NpTDM[0.3e]\filterscripts\dude.pwn(95) : warning 225: unreachable code
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Warning.
How to fix it??!!
Re: - Fail Commands. -
CmZxC - 20.09.2012
remove
since it becomes useless after you return; your message.
Re: - Fail Commands. -
Bug. - 24.09.2012
Код HTML:
G:\NpTDM[0.3e]\gamemodes\NpTDM.pwn(330) : error 010: invalid function or declaration
G:\NpTDM[0.3e]\gamemodes\NpTDM.pwn(340) : error 010: invalid function or declaration
G:\NpTDM[0.3e]\gamemodes\NpTDM.pwn(342) : error 010: invalid function or declaration
G:\NpTDM[0.3e]\gamemodes\NpTDM.pwn(350) : error 010: invalid function or declaration
G:\NpTDM[0.3e]\gamemodes\NpTDM.pwn(352) : error 010: invalid function or declaration
G:\NpTDM[0.3e]\gamemodes\NpTDM.pwn(354) : error 010: invalid function or declaration
G:\NpTDM[0.3e]\gamemodes\NpTDM.pwn(356) : error 010: invalid function or declaration
G:\NpTDM[0.3e]\gamemodes\NpTDM.pwn(358) : error 010: invalid function or declaration
G:\NpTDM[0.3e]\gamemodes\NpTDM.pwn(360) : error 010: invalid function or declaration
G:\NpTDM[0.3e]\gamemodes\NpTDM.pwn(362) : error 010: invalid function or declaration
G:\NpTDM[0.3e]\gamemodes\NpTDM.pwn(364) : error 010: invalid function or declaration
G:\NpTDM[0.3e]\gamemodes\NpTDM.pwn(373) : error 010: invalid function or declaration
G:\NpTDM[0.3e]\gamemodes\NpTDM.pwn(375) : error 010: invalid function or declaration
G:\NpTDM[0.3e]\gamemodes\NpTDM.pwn(387) : error 010: invalid function or declaration
G:\NpTDM[0.3e]\gamemodes\NpTDM.pwn(389) : error 010: invalid function or declaration
G:\NpTDM[0.3e]\gamemodes\NpTDM.pwn(393) : error 010: invalid function or declaration
G:\NpTDM[0.3e]\gamemodes\NpTDM.pwn(395) : error 010: invalid function or declaration
G:\NpTDM[0.3e]\gamemodes\NpTDM.pwn(399) : error 010: invalid function or declaration
G:\NpTDM[0.3e]\gamemodes\NpTDM.pwn(401) : error 010: invalid function or declaration
G:\NpTDM[0.3e]\gamemodes\NpTDM.pwn(404) : error 010: invalid function or declaration
G:\NpTDM[0.3e]\gamemodes\NpTDM.pwn(406) : error 010: invalid function or declaration
G:\NpTDM[0.3e]\gamemodes\NpTDM.pwn(409) : error 010: invalid function or declaration
G:\NpTDM[0.3e]\gamemodes\NpTDM.pwn(411) : error 010: invalid function or declaration
G:\NpTDM[0.3e]\gamemodes\NpTDM.pwn(417) : error 010: invalid function or declaration
G:\NpTDM[0.3e]\gamemodes\NpTDM.pwn(419) : error 010: invalid function or declaration
G:\NpTDM[0.3e]\gamemodes\NpTDM.pwn(424) : error 010: invalid function or declaration
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
26 Errors.
Re: - Fail Commands. -
Rimeau - 24.09.2012
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
//Commmands
return SendClientMessage(playerid, -1, "That command does not exist. Use /help or /commands.");
}
Don't lose the last bracket
Re: - Fail Commands. -
XtremeR - 24.09.2012
Well try this
pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
if(!success) SendClientMessage(playerid, -1, "That command does not exist. Use /help or /commands..");
return 1;
}
Re: - Fail Commands. -
Bug. - 24.09.2012
Код:
G:\NpTDM[0.3e]\gamemodes\NpTDM.pwn(347) : error 029: invalid expression, assumed zero
G:\NpTDM[0.3e]\gamemodes\NpTDM.pwn(347) : error 017: undefined symbol "OnPlayerCommandPerformed"
G:\NpTDM[0.3e]\gamemodes\NpTDM.pwn(349) : error 017: undefined symbol "success"
G:\NpTDM[0.3e]\gamemodes\NpTDM.pwn(352) : warning 225: unreachable code
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
3 Errors.
]
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
if(!success) SendClientMessage(playerid, -1, "That command does not exist. Use /help or /commands..");
return 1;
}
Re: - Fail Commands. -
BlackAtom - 24.09.2012
You must use the
ZCMD (Click Here)
And below there is how the code must looks like:
pawn Код:
#include <a_samp>
#include <zcmd>
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
if(success == 0)
SendClientMessage(playerid, 0xFF0000FF, "That command does not exist. Use /help or /commands..");
return 1;
}
Re: - Fail Commands. How to fix it? ) -
Bug. - 26.09.2012
Код:
G:\NpTDM[0.3e]\gamemodes\NpTDM.pwn(404) : error 029: invalid expression, assumed zero
G:\NpTDM[0.3e]\gamemodes\NpTDM.pwn(404) : error 017: undefined symbol "OnPlayerCommandPerformed"
G:\NpTDM[0.3e]\gamemodes\NpTDM.pwn(406) : error 017: undefined symbol "success"
G:\NpTDM[0.3e]\gamemodes\NpTDM.pwn(409) : warning 225: unreachable code
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
3 Errors.