#Commands Permissions

1 messages · Page 1 of 1 (latest)

native iris
#

Is there any option that a command executed by one user cannot be executed by another user?

Example: ":fly (user)" how do I avoid doing that? and that only the same user can use it?

willow hatch
#

Nope

#

Its possible for you to script it though

#

Might be complicated

native iris
#

Can you explain it to me?

willow hatch
#

Alr so basically you will need to get the code that lets you fly

#

It can be found in the main module

#

Then you just need to make it check for the player's rank

#

If its said rank then it will only let the person whocran it fly

#

If they are higher than the rank then they can make others fly

native iris
#

Alright

native iris
#

this can gonna work?

willow hatch
# native iris this can gonna work?

Id rather do this

if not args[1] == "me" then
return Functions.Hint("You can only run commands on yourself", {plr}) -- This is to notify the player that runs the command saying they can only use this on themselves 
end
#

Other than that it should work

native iris
#

Hmm is not working

#

It looks like it overshoots that, it doesn't print it and it executes the code

willow hatch
#

Let me know if that doesnt work

native iris
#

No, in fact nothing happened, it didn't even print something that it should if the code worked.

#

It is as if that code is not the one that executes it

willow hatch
#

Weird

#

I cant really check rn so im not sure

native iris
#

I will keep searching or discovering

full sparrow
#
if not args[1] == "me" then

is the same as

if (not args[1]) == "me" then
native iris
full sparrow
#

well

#

not exactly

#

you would need to modify it

#

to work inversely

#

but if you want to do it that bandaid way

#

then it should be

if not (args[1] == "me") then

or

if args[1] ~= "me" then
#

actually using the playerselector restrictor in this way would require you to rework some parts of adonis

#

i havent the time to show you exactly how to do it

#

so maybe just do it the bandaid way unless someone else is able to show you what you need to change

native iris
#

It's strange, it seems that it doesn't work even modifying that code, it seems as if it would never save, I'll look at what you sent me to see it

native iris
#

oh

#

1 secnod

#

I discovered the error

#

What I am editing is a module already downloaded, but still adonis downloads the module from the web so it will be the web version and not the one I modify

native iris
#

Where can I put the startup module so that it will start without it and I can start the customization I made?

full sparrow
#

you have to enable debug mode

native iris
full sparrow
#

no you dont need to do that tho

#

you should be using a plugin that overrides

#

commands

#

not forking adonis

#

fork only when absolutely necessary

#

otherwise ur not gonna receive updates anymore including security fixes

native iris
#

the debug mode apart from not downloading the module from the web, does it bring any other problem that may interfere?

full sparrow
#

i dont remember what other behaviours enabling debug mode enables

#

its called debug mode for a reason tho

#

so as i said you should avoid it unless you have no choice