Hey :slightly_smiling_face: !
You could modify the command creation function itslef, by adding to a condition :

RegisterCommand("commandName", function(source --[[ this is the player ID (on the server): a number ]], args --[[ this is a table of the arguments provided ]], rawCommand --[[ this is what the user entered ]])
    if source.world == "WORLD1" then
        print("Do the command instructions.")
    elseif source.world == "WORLD2" then
        print("deny access to the command")
    else
        --Do Nothing
    end
end, true)

In this case source.world is just here as an example, but you can remplace it by the Player’s Object created by the framework you use (by adding a attribute world to the player Object yourself) or use State bags (see Cfx doc) to add this attribute to the player without modifying the framwork’s Player Object.


Another idea, but not sure it could work. Is adding a new groupe for each world. And then use aces to deny/allow the pool of commands
add_ace group.world1 command.mycommand deny