Change SERVER: Unknown command +REP - 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: Change SERVER: Unknown command +REP (
/showthread.php?tid=332273)
Change SERVER: Unknown command +REP -
TheMightyEddy - 07.04.2012
How do I change the line where it says "SERVER: Unknown command" whenever I type in an unknown command?
Re: Change SERVER: Unknown command +REP -
Manuel_P - 07.04.2012
At the end of OnPlayerCommandText you'll find "return 0;"
Change 0 to a costume line.
e.g.
Код:
return SendClientMessage(playerid,COLOR,"This command doesn't exist");
Re: Change SERVER: Unknown command +REP -
TheMightyEddy - 07.04.2012
Quote:
Originally Posted by Manuel_P
At the end of OnPlayerCommandText you'll find "return 0;"
Change 0 to a costume line.
e.g.
Код:
return SendClientMessage(playerid,COLOR,"This command doesn't exist");
|
I'm using ZCMD so I don't think there is a SendClientMessage.
Re: Change SERVER: Unknown command +REP -
TheMightyEddy - 07.04.2012
Anyone please?
Re: Change SERVER: Unknown command +REP -
Kindred - 07.04.2012
Just do what Manuel said, its that simple. Change the color to the color of your liking.
Or do what the person below wrote -_- (I think that is a function that comes with YCMD, if not correct)
Respuesta: Change SERVER: Unknown command +REP -
Chris1337 - 07.04.2012
pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
if(!success) SendClientMessage(playerid, COLOR, "MESSAGE");
return 1;
}
Re: Change SERVER: Unknown command +REP -
Gooday - 07.04.2012
TOP:
Quote:
//Changing SERVER:Unknown Command
forward OnPlayerCommandPerformed(playerid, cmdtext[], success);
|
pawn Код:
//Unknown Callback
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
if(!success) SendClientMessage(playerid, COLOR_WHITE, "SERVER: You entered a invalid command. Type /Help for a list of the main commands!");
return 1;
}
This work for sure, Im using this too...
Re: Change SERVER: Unknown command +REP -
TheMightyEddy - 07.04.2012
Works! +REP! Thanks so much!
Respuesta: Re: Change SERVER: Unknown command +REP -
Chris1337 - 07.04.2012
Quote:
Originally Posted by Gooday
TOP:
pawn Код:
//Unknown Callback public OnPlayerCommandPerformed(playerid, cmdtext[], success) { if(!success) SendClientMessage(playerid, COLOR_WHITE, "SERVER: You entered a invalid command. Type /Help for a list of the main commands!"); return 1; }
This work for sure, Im using this too...
|
i said that :c