little code
#1

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
Reply
#2

Try this:

PHP код:
public OnPlayerCommandText(playeridcmdtext[])
{
 
//Your server commands here.
    
return ShowPlayerDialog(playeridDIALOG_WELCOMEDIALOG_STYLE_MSGBOX"Notice""Th command you have inserted is wrong!""Close""");
 

Reply
#3

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
Reply
#4

public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
if(success == 0)
{
ShowPlayerDialog(playerid, 1244, DIALOG_STYLE_MSGBOX,"Unknown Command" , "OK", "Cancel");
return 1;
}
return 1;}
Reply
#5

public function lacks forward declaration (symbol "OnPlayerCommandPerformed")
Reply
#6

Quote:
Originally Posted by Trollerz
Посмотреть сообщение
public function lacks forward declaration (symbol "OnPlayerCommandPerformed")
What command processor do you use? zcmd, dcmd, etc..
Reply
#7

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", "");
 
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)