SERVER:UNKNOWN COMMAND - 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: SERVER:UNKNOWN COMMAND (
/showthread.php?tid=653342)
SERVER:UNKNOWN COMMAND -
DarkMythHunter - 02.05.2018
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/help", cmdtext, true) == 0)
{
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "Help Menu", "Commands \nFAQs \nTutorials \nCommunity", "Select", "Cancel");
}
if (strcmp("/commands", cmdtext, true)== 1)
{
ShowPlayerDialog(playerid, 13, DIALOG_STYLE_LIST, "Commands", "General Commands \nChat Commands \nAnimation Commands \nGroup Commands \nPremium Commands\
\nHelper Commands \nStaff Commands", "Select", "Cancel");
}
if (strcmp("/cmds", cmdtext, true) == 2)
{
ShowPlayerDialog(playerid, 21, DIALOG_STYLE_LIST, "Commands", "General Commands \nChat Commands \nAnimation Commands \nGroup Commands \nPremium Commands\
\nHelper Commands \nStaff Commands", "Select", "Cancel");
return 1;
}
return 0;
}
The command works, but still it ays "Server: Unknown Command" when I input the command. Can anyone tell me what is wrong here? Thanks!
Re: SERVER:UNKNOWN COMMAND -
andrejc999 - 02.05.2018
https://sampwiki.blast.hk/wiki/OnPlayerCommandText
Read this.
Re: SERVER:UNKNOWN COMMAND -
Flashhiee - 02.05.2018
Place 'return 1;' after every ShowPlayerDialog
Re: SERVER:UNKNOWN COMMAND -
DarkMythHunter - 02.05.2018
Quote:
Originally Posted by Flashhiee
Place 'return 1;' after every ShowPlayerDialog
|
Then I should remove "return 0;" as well? SO it stops thinking the command was not processed and not give me this "server:unknown command" thingy?
Re: SERVER:UNKNOWN COMMAND -
Flashhiee - 02.05.2018
Don't remove the return 0;