Can you please hep me ? So I am having trouble with getting a player to be forced to execute a command that is triggered by an event or a loop so for example I have an NPC and I coded a script to where an event is triggered when this specific NPC is clicked here is my block of code :
on right click on player:
if name of clicked player is "&e&lCommand":
cancel the event
I just don't know what to add next to make it so that when that player or NPC is rightclicked the player who rightclicked is gonna be forced to execute a specific command, I tried:
make player execute command "/command1"
But it keeps giving me an error in the chat when I save and try to reload the script. But when I remove this specific line of code it stops giving me the problem so that's how i made sure that it wasn't something else, and also I know that the first block of code I gave has no errors by making it so that it opens a gui and formats some item in, I just can't get it to force a player to execute a specific command can someone please help me with that, thank you so much for reading my Thread.
[doublepost=1500684935,1500684754][/doublepost]In the thread above in the first block of code, I tried to make the lines spaced out same as in my text editor but it keeps putting them back together.
on right click on player:
if name of clicked player is "&e&lCommand":
cancel the event
I just don't know what to add next to make it so that when that player or NPC is rightclicked the player who rightclicked is gonna be forced to execute a specific command, I tried:
make player execute command "/command1"
But it keeps giving me an error in the chat when I save and try to reload the script. But when I remove this specific line of code it stops giving me the problem so that's how i made sure that it wasn't something else, and also I know that the first block of code I gave has no errors by making it so that it opens a gui and formats some item in, I just can't get it to force a player to execute a specific command can someone please help me with that, thank you so much for reading my Thread.
[doublepost=1500684935,1500684754][/doublepost]In the thread above in the first block of code, I tried to make the lines spaced out same as in my text editor but it keeps putting them back together.