SERVER:Unknown Command -
Biggy54 - 25.07.2014
Hello guys, I have a problem with my SA-MP Server Gamemode..
When i type any incorrect command it doesn't give me the default samp '
SERVER:Unknown Command' message.
and it doesn't do anything.
So, I need your help guys.
Thanks
-Biggy
Re: SERVER:Unknown Command -
Stinged - 25.07.2014
What command processor do you use?
Re: SERVER:Unknown Command -
Biggy54 - 25.07.2014
Here's a screenshot of my includes folder..
Re: SERVER:Unknown Command -
AMouldyLemon - 25.07.2014
Do you want a custom Message to be sent to the Player?
Re: SERVER:Unknown Command -
Biggy54 - 25.07.2014
I just want the server to send a message to the player when he/she enters a wrong/incorrect command.
Re: SERVER:Unknown Command -
AMouldyLemon - 25.07.2014
pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
if(!success) SendClientMessage(playerid, -1, "This command doesn't exist.");
return 1;
}
Like that?
Re: SERVER:Unknown Command -
Biggy54 - 25.07.2014
Alright, where to add this?
Re: SERVER:Unknown Command -
Sojo12 - 25.07.2014
Quote:
Originally Posted by AMouldyLemon
pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success) { if(!success) SendClientMessage(playerid, -1, "This command doesn't exist."); return 1; }
Like that?
|
Where is the return format in your code?I don't see it.
Re: SERVER:Unknown Command -
KayJ - 25.07.2014
Quote:
Originally Posted by AMouldyLemon
pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success) { if(!success) SendClientMessage(playerid, -1, "This command doesn't exist."); return 1; }
Like that?
|
Its wrong.
If you are using zcmd, you will use this:
pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
if(!success)
{
new str[256];
format(str, sizeof(str), "Command %s doesn't exists please /yourcommand for all commands", cmdtext);
SendClientMessage(playerid, -1, str);
}
return 1;
}
Re: SERVER:Unknown Command -
Biggy54 - 25.07.2014
same, everything is cool when i compile it
but when i test this in-game it doesn't respond.(when i type an incorrect command it doesn't give me the text)
this's the all the warnings i get
Код:
warning 203: symbol is never used: "gArmySpawns"
warning 203: symbol is never used: "gMedicalSpawns"
warning 203: symbol is never used: "gPoliceSpawns"
warning 203: symbol is never used: "lastanimid"
warning 203: symbol is never used: "thisanimid"