Unknow command!
#1

How i can add unknow command for this gamemode(http://www.solidfiles.com/d/w5hW/).
Reply
#2

Change line 40300 to
pawn Код:
return 0;
Reply
#3

At the end of OnPlayerCommandText, use
pawn Код:
return SendClientMessage(playerid, 0xcolor, "SERVER: UNKNOWN COMMAND");
instead of
pawn Код:
return 0;
Reply
#4

Quote:
Originally Posted by DiGiTaL_AnGeL
Посмотреть сообщение
At the end of OnPlayerCommandText, use
pawn Код:
return SendClientMessage(playerid, 0xcolor, "SERVER: UNKNOWN COMMAND");
instead of
pawn Код:
return 0;
https://sampwiki.blast.hk/wiki/OnPlayerCommandText
Quote:

// Returning 0 informs the server that the command hasn't been processed by this script.
// OnPlayerCommandText will be called in other scripts until one returns 1.
// If no scripts return 1, the 'SERVER: Unknown Command' message will be shown to the player.

You can do what you said, but there really is no point, it will do it automatically. Unless you want to do a custom message/textdraw/sound whatever.
Reply
#5

Quote:
Originally Posted by Nathan_Taylor
Посмотреть сообщение
https://sampwiki.blast.hk/wiki/OnPlayerCommandText

You can do what you said, but there really is no point, it will do it automatically. Unless you want to do a custom message/textdraw/sound whatever.
Yeah, totally forgot.
Reply
#6

Thanks guys!
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)