Function - after using a command writting something
#1

Hi,
I need help, with a function or something to do this;
After player using a command like /help he will have two options; teleport/commands.
But I want him to write them like a regular text: [CHAT]/help >> [CHAT]Teleports.
How to do that? and I want disable from doing any other texts or commands. After /help only teleport/commands.
Please, someone.
Reply
#2

Do you mean like this:

I type: /help Commands

Or: /help teleports


Or do you mean that you type the command: /help and then after you pressed enter, you type commands ?

Please explain more so we can help you
Reply
#3

Yea after you typed /help and pressed enter you will be able to use only TWO commands, help & teleports, nothing else until you will use them, after using them you're free.
Reply
#4

Anyone?
Reply
#5

Why can't you just simply put it in one command only? It makes the coding better.

But, alright..

put "new command = 0" on top of your script.
Under the command you use, you must set a variable to a value like 1 (for example "command=1;")

Then, under "OnPlayerText" you must check if that variable still is 0 or if it is 1. Then, you can use strcmp to check if the entered chat text is "teleport" or "Commands". Then, let the code do what you want.

Hope you understood.

Airplanesimen
Reply
#6

Works thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)