About something
#1

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
Reply
#2

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.");
}
Reply
#3

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.
Reply
#4

pawn Код:
new Str[50];
format(Str, sizeof Str, "Command: %s can not be found. Look at /help.", cmdtext);
return SendClientMessage(playerid, PINK, Str);
Reply
#5

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);
}
Reply
#6

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.
Reply
#7

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.?
Reply
#8

please help
Reply
#9

Increase 'new Str[50]' to something like, 'new Str[128]'
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)