Is it possible to make command without forward slash?
#1

Is it possible?

eg: !help !stats !admin
Reply
#2

Yes, it is.
Reply
#3

Use OnPlayerText and compare their input to your defined text. If it matches, execute the command's code and return 0 under OnPlayerText to prevent the text they typed from entering the chat.
Reply
#4

Код:
if(!strcmp(cmdtext, "!help", true))
Wouldn't this work?
Reply
#5

Quote:
Originally Posted by JaydenJason
Посмотреть сообщение
Wouldn't this work?
No.

Because OnPlayerCommandText get Only called when you write a /

You have to call the function again under OnPlayerText when it starts with !

PHP код:
if(text[0] == '!'OnPlayerCommandText(playerid,text); //For example 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)