SERVER:UNKNOWN COMMAND
#1

Код:
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!
Reply
#2

https://sampwiki.blast.hk/wiki/OnPlayerCommandText

Read this.
Reply
#3

Place 'return 1;' after every ShowPlayerDialog
Reply
#4

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?
Reply
#5

Don't remove the return 0;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)