Jump to content
  • 0

Is it possible to make commands for only admins?


Question

Posted

Hello. Is there any way to make custom commands that only admins can use. For example i made /heal command and it will restore your health. But is it possible to deny that command for normal players?

12 answers to this question

Recommended Posts

  • 3
Posted

There is so much going on in this thread including wrong information, duplicated information, and off topic bickering so I am deleting it all and going over the options you have.

 

Option A: Make the spawn/execution conditions check for admin powers

26b8e75c7fe761ffcd2545505f242b11.png

 

If players without admin access try to use this command they will receive a nasty invalid /command message on their screen:

e28278e7485aff588ed7baff2bc35e02.png

 

 

Option B: Leave Spawn/Execution Conditions Empty, and use a Conditional Branch in the Commands

485160af13e612784894fd94be13d1d9.png

 

The second option allows you to show the non-admin players a message if you so desire under the "Else" in the conditional branch.

 

Both of these are tested and working in Intersect Beta 4.2

  • 1
Posted
Just now, Vitaly said:

For moderators yes it shows that you are not an admin. But if your power lvl is 0 then it shows invalid command for me.

I set my power level to 0 in that gif and it still showed the message. What does your event look like?

  • 0
Posted
7 hours ago, jcsnider said:

There is so much going on in this thread including wrong information, duplicated information, and off topic bickering so I am deleting it all and going over the options you have.

 

Option A: Make the spawn/execution conditions check for admin powers

26b8e75c7fe761ffcd2545505f242b11.png

 

If players without admin access try to use this command they will receive a nasty invalid /command message on their screen:

e28278e7485aff588ed7baff2bc35e02.png

 

 

Option B: Leave Spawn/Execution Conditions Empty, and use a Conditional Branch in the Commands

485160af13e612784894fd94be13d1d9.png

 

The second option allows you to show the non-admin players a message if you so desire under the "Else" in the conditional branch.

 

Both of these are tested and working in Intersect Beta 4.2

Works, but the second option Else is not working for non admins. Still shows Invalid command.

  • 0
Posted
13 minutes ago, Vitaly said:

Works, but the second option Else is not working for non admins. Still shows Invalid command.

Works fine for me. Are you sure you're on 4.2?

 
HilariousBouncyEwe-size_restricted.gif
 

fWVWAM1.png

  • 0
Posted
1 minute ago, MCADAMS said:

Works fine for me. Are you sure you're on 4.2?

fWVWAM1.png

For moderators yes it shows that you are not an admin. But if your power lvl is 0 then it shows invalid command for me.

  • 0
Posted
Just now, MCADAMS said:

I set my power level to 0 in that gif and it still showed the message. What does your event look like?

Hm, my event looks exactly the same.

  • 0
Posted
2 minutes ago, MCADAMS said:

I set my power level to 0 in that gif and it still showed the message. What does your event look like?

Oh it works now, i restarted server and now it works. Thanks alot.

  • 0
Posted
8 minutes ago, MCADAMS said:

I set my power level to 0 in that gif and it still showed the message. What does your event look like?

Oh what?? Its actually so weird, if i did exactly the same texts as you then it works. But if i change it to heal and add restore HP then its not working. Try it out yourself.

  • 0
Posted
2 minutes ago, Vitaly said:

Oh what?? Its actually so weird, if i did exactly the same texts as you then it works. But if i change it to heal and add restore HP then its not working. Try it out yourself.

Nevermind.. I deleted all my common events and started new ones, now they are working again. This can be closed, answered.

  • 0
Posted
13 minutes ago, Vitaly said:

Oh what?? Its actually so weird, if i did exactly the same texts as you then it works. But if i change it to heal and add restore HP then its not working. Try it out yourself.

It appears, to me at least, that having more than one /command as a common event breaks all your /commands? I haven't used the event system a lot so maybe I'm doing something wrong.

 

https://gfycat.com/TastyHarshHammerheadbird (make sure to turn on HD in the bottom right gif settings if it looks terrible)

 

 

 

  • 0
Posted
1 minute ago, MCADAMS said:

It appears, to me at least, that having more than one /command as a common event breaks all your /commands? I haven't used the event system a lot so maybe I'm doing something wrong.

 

https://gfycat.com/TastyHarshHammerheadbird

 

 

 

 

Uh not really, mine works perfectly now. Also you have to get those files from here to get more than 1 command event working at the same time. 

 

  • 0
Posted
7 minutes ago, Vitaly said:

Uh not really, mine works perfectly now. Also you have to get those files from here to get more than 1 command event working at the same time. 

 

Got it. Looks like our work here is done B)

×
×
  • Create New...