command help[+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: command help[+Rep] (
/showthread.php?tid=555906)
command help[+Rep] -
PrinXe - 09.01.2015
Hello friends i need a help when any player type any unknown cmd then it shows like this
Unknown command
But i want to make it more attractive like this when player will type an unknown cmd then it will show a msg to us like this.
Error(red colour) you(white colour) enter(white) a(white) wrong(white) command(white) try(white) /'help(green) or /cmds(green)
Anyone
Srry for bad english!
Re: command help -
KayJ - 09.01.2015
i didn't understand plz explain more
Re: command help -
PrinXe - 09.01.2015
Bro i want a msg to be shown
Error:-you entered a wrong cmd use /help
In this error must be show in red colour /help must be shown in green colour .
Re: command help[+Rep] -
Glossy42O - 09.01.2015
You mean replace it instead "Server: Unknown command" ?
EDIT: use that
https://sampforum.blast.hk/showthread.php?tid=274661
Re: command help[+Rep] -
PrinXe - 09.01.2015
Bro i want to replace but i want to change in look like this
Error must be in red color /help in green and rest of in white
Re: command help[+Rep] -
TheRaGeLord - 09.01.2015
You Can do it Like This:-
pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
if (!success)
{
SendClientMessage(playerid,COLOR_RED,"Error: you entered a wrong command use /help");
}
return 1;
}
Here Return 1 will Hide your "Server: Unkown Command" Text
Re: command help[+Rep] -
Glossy42O - 09.01.2015
Just replace mine with ur text
PHP код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
if(!success) return SendClientMessage(playerid, -1, "{FF0000}[SYSTEM]: {FFFFFF}The command you have entered does not exist. Use {ffff33}(/help, /cmds)");
return 0;
}
Re: command help[+Rep] -
TheRaGeLord - 09.01.2015
Yeah.. Stunn23's Code Can also be used.. It similar to that you want...
Re: command help[+Rep] -
Glossy42O - 09.01.2015
Well, both of us same just not same code. but it does the same thing.
Re: command help[+Rep] -
PrinXe - 09.01.2015
Ty guys rep added guys anyone of u want to work me in my freeroam gm?