SA-MP Forums Archive
[Scripting]Unknown Command Help - 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: [Scripting]Unknown Command Help (/showthread.php?tid=469091)



[Scripting]Unknown Command Help - xXxGamerxXx - 11.10.2013

Hii , Well In My server when people type any cmd like /hdxnsdj [Just Random] which is not in database and which is wrong it now says
Quote:

SERVER: Unknown command.

I want to change it to like Hello User This is wrong command do /cmds , and /help to list all commands such like that is there anyway i can do that if yes then please tell me

Thanks!


EDIT : //// i am using zcmd

2) i have tried SendClientMessage(playerid, COLOR, "The Text ");

but didnt work!!!


Re: [Scripting]Unknown Command Help - ***Niko*** - 11.10.2013

open the pawno use
ctrl + f, enter SERVER: Unknown command. press enter,
you will see the text edit how you want and compile.


Re: [Scripting]Unknown Command Help - xVIP3Rx - 11.10.2013

Quote:
Originally Posted by Stefan_Salvatore
Посмотреть сообщение
open the pawno use
ctrl + f, enter SERVER: Unknown command. press enter,
you will see the text edit how you want and compile.
There is no "SERVER: Unknown command" on the script, This message shows when you return 0; after a command, etc, There is no way to find it on the script...

Topic: In the end of OnPlayerCommandText you can see "return 0;"
Change 0 to a costume line.
Like:
pawn Код:
return SendClientMessage(playerid,COLOR,"This command is not recognized in our server!");



Re: [Scripting]Unknown Command Help - xXxGamerxXx - 12.10.2013

Quote:
Originally Posted by xVIP3Rx
Посмотреть сообщение
There is no "SERVER: Unknown command" on the script, This message shows when you return 0; after a command, etc, There is no way to find it on the script...

Topic: In the end of OnPlayerCommandText you can see "return 0;"
Change 0 to a costume line.
Like:
pawn Код:
return SendClientMessage(playerid,COLOR,"This command is not recognized in our server!");
u weren't able to help out by skype & teamviewere u tried and it didnt work but anyway thanks


Re: [Scripting]Unknown Command Help - ***Niko*** - 12.10.2013

Send me skype name in PM


Re: [Scripting]Unknown Command Help - xVIP3Rx - 12.10.2013

Quote:
Originally Posted by xXxGamerxXx
Посмотреть сообщение
u weren't able to help out by skype & teamviewere u tried and it didnt work but anyway thanks
As you told me after that, you're using zcmds, Then you should add
pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if(!success) SendClientMessageEx(playerid, -1, "Here you should add the message");
    return 1;
}
Somewhere on the script


Re: [Scripting]Unknown Command Help - Threshold - 12.10.2013

If you still need assistance with this, or any other scripting obstructions, feel free to PM me your Skype name and I will add you.


Re: [Scripting]Unknown Command Help - ***Niko*** - 12.10.2013

He added me but then he went offline