little code - 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: little code (
/showthread.php?tid=587507)
little code -
Trollerz - 31.08.2015
Hey guys..
Can u tell me how to remove that Server: unknown command when we type wrong command ...
I wanna make a dialog instead of it ♧....
Thanks
Re: little code -
Michael B - 31.08.2015
Try this:
PHP код:
public OnPlayerCommandText(playerid, cmdtext[])
{
//Your server commands here.
return ShowPlayerDialog(playerid, DIALOG_WELCOME, DIALOG_STYLE_MSGBOX, "Notice", "Th command you have inserted is wrong!", "Close", "");
}
Re: little code -
Trollerz - 31.08.2015
i dont have any command
I mean't
if someone just types /asdasd
i want it to show dialog
i dont wanna make /asdasd command
Re: little code -
Rodri99 - 31.08.2015
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
if(success == 0)
{
ShowPlayerDialog(playerid, 1244, DIALOG_STYLE_MSGBOX,"Unknown Command" , "OK", "Cancel");
return 1;
}
return 1;}
Re: little code -
Trollerz - 31.08.2015
public function lacks forward declaration (symbol "OnPlayerCommandPerformed")
Re: little code -
Onfroi - 31.08.2015
Quote:
Originally Posted by Trollerz
public function lacks forward declaration (symbol "OnPlayerCommandPerformed")
|
What command processor do you use? zcmd, dcmd, etc..
Re: little code -
xVIP3Rx - 31.08.2015
Quote:
Originally Posted by Trollerz
public function lacks forward declaration (symbol "OnPlayerCommandPerformed")
|
Thats because you're not using ZCMD, this public's included with it.
Quote:
Originally Posted by Trollerz
i dont have any command
I mean't
if someone just types /asdasd
i want it to show dialog
i dont wanna make /asdasd command 
|
And I think this should do it.
Quote:
Originally Posted by Michael B
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[]) { if(strcmp(cmdtext, "blabla".. else if(strcmp(cmdtext, "blabla".. else ShowPlayerDialog(playerid, DIALOG_ID, DIALOG_STYLE_MSGBOX, "Notice", "Th command you have inserted is wrong!", "Close", ""); }
|