About something - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: About something (
/showthread.php?tid=203379)
About something -
Mr.Jvxmc - 26.12.2010
Hey,
in
Код:
public OnPlayerCommandText(playerid, cmdtext[])
end, it's say "SERVER: Unkown command."
but i make it "There aren't such one command. Look /help" .
but how i can make so that server says
"Command /help can not found. Look at /help" like help is a cmd if u type
some another cmd then there are another cmd
how i can do this ?
Regards,
Mr.Jvxmc
Re: About something -
FreshDoubleX - 26.12.2010
At the end, where is return 0, change it to your text.
And I suggest you to use ZCMD. Much easier.
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
return SendClientMessage(playerid, PINK,"This command is wrong, please type /help for help.");
}
Re: About something -
Mr.Jvxmc - 26.12.2010
Quote:
Originally Posted by FreshDoubleX
At the end, where is return 0, change it to your text.
And I suggest you to use ZCMD. Much easier.
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[]) { return SendClientMessage(playerid, PINK,"This command is wrong, please type /help for help."); }
|
No, i mean like
Command /teles (that command what player just type.) can not found. Look at /help.
Re: About something - [L3th4l] - 26.12.2010
pawn Код:
new Str[50];
format(Str, sizeof Str, "Command: %s can not be found. Look at /help.", cmdtext);
return SendClientMessage(playerid, PINK, Str);
Re: About something -
blackwave - 26.12.2010
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
new string[128];
format(string,sizeof(string),"Command /teles %s can not found. Look at /help.",cmdtext);
return SendClientMessage(playerid, PINK, string);
}
Re: About something -
FreshDoubleX - 26.12.2010
Quote:
Originally Posted by [L3th4l]
pawn Код:
new Str[50]; format(Str, sizeof Str, "Command: %s can not be found. Look at /help.", cmdtext); return SendClientMessage(playerid, PINK, Str);
|
Yes, That's if you want to display that wrong command too. Anyways good luck.
Re: About something -
Mr.Jvxmc - 26.12.2010
Quote:
Originally Posted by [L3th4l]
pawn Код:
new Str[50]; format(Str, sizeof Str, "Command: %s can not be found. Look at /help.", cmdtext); return SendClientMessage(playerid, PINK, Str);
|
Thx L3th4l.
However, it only shows the sentence.
pawn Код:
format(Str, sizeof Str, ""#COL_RED"ERROR: "#COL_WHITE"The command "#COL_YELLOW"%s "#COL_WHITE"can not be found. Look at /help.", cmdtext);
return SendClientMessage(playerid, COLOR_PINKI, Str);
how i can do this like server shows whole phrase.?
Re: About something -
Mr.Jvxmc - 26.12.2010
please help
Re: About something - [L3th4l] - 26.12.2010
Increase 'new Str[50]' to something like, 'new Str[128]'