Heli permission system not workingSolved
Hi,

I hope you can help.  I have installed HeliControl and setup permissions for the default geroup to callheli and callheli to a target.  This issue I am facing is that no matter what I do to the cooldowns and limits, the user can call and kill unlimited helis.  I would like to be able to restrict a user (no a specific one, but anyone in a specific group) to calling 1 heli every 1 hour.  Could someone advise how you do this? 

I have tested serveral variations, but I am attaching the final version. 

Here is my config
{
  "Cooldowns": {
    "Cooldown.0": 3600,
    "Cooldown.1": 0,
    "Cooldown.2": 0,
    "Cooldown.3": 0,
    "Cooldown.4": 0,
    "Cooldown.5": 0,
    "Cooldown.6": 0,
    "Cooldown.7": 0,
    "Cooldown.8": 0,
    "Cooldown.9": 0,
    "cooldown.ch47.0": 0,
    "cooldown.ch47.1": 0,
    "cooldown.ch47.2": 0,
    "cooldown.ch47.3": 0,
    "cooldown.ch47.4": 0,
    "cooldown.ch47.5": 0,
    "cooldown.ch47.6": 0,
    "cooldown.ch47.7": 0,
    "cooldown.ch47.8": 0,
    "cooldown.ch47.9": 0
  },
  "Damage - Global damage multiplier": 1.0,
  "Gibs - Health of gibs": 500.0,
  "Gibs - Time until gibs can be harvested in seconds": 300.0,
  "Health - Base Helicopter health": 10000.0,
  "Health - Main rotor health": 1550.0,
  "Health - Tail rotor health": 1075.0,
  "Limits": {
    "Limit.0": 1,
    "Limit.1": 0,
    "Limit.2": 0,
    "Limit.3": 0,
    "Limit.4": 0,
    "Limit.5": 0,
    "Limit.6": 0,
    "Limit.7": 0,
    "Limit.8": 0,
    "Limit.9": 0,
    "limit.ch47.0": 0,
    "limit.ch47.1": 0,
    "limit.ch47.2": 0,
    "limit.ch47.3": 0,
    "limit.ch47.4": 0,
    "limit.ch47.5": 0,
    "limit.ch47.6": 0,
    "limit.ch47.7": 0,
    "limit.ch47.8": 0,
    "limit.ch47.9": 0
  },
  "Loot - Max Crates to drop": 6,
  "Loot - Time before unlocking CH47 crates": -1.0,
  "Loot - Time before unlocking crates": -1.0,
  "Loot - Use Custom loot spawns": false,
  "Misc - Helicopter can shoot while dying": true,
  "Misc - Helicopter speed": 55.0,
  "Misc - Helicopter startup length in seconds": 0.0,
  "Misc - Helicopter startup speed": 25.0,
  "Misc - Maximum CH47 life time in minutes": 15,
  "Misc - Maximum helicopter life time in minutes": 15,
  "Misc - Prevent crates from spawning when forcefully killing helicopter": true,
  "Rockets - Blunt damage to deal": 175.0,
  "Rockets - Explosion damage to deal": 100.0,
  "Rockets - Explosion radius": 6.0,
  "Rockets - Max helicopter rockets": 12,
  "Rockets - Time between each rocket in seconds": 0.2,
  "Spawning - Automatically call CH47 between max seconds": 0.0,
  "Spawning - Automatically call CH47 between min seconds": 3600.0,
  "Spawning - Automatically call CH47 if one is already flying": false,
  "Spawning - Automatically call helicopter between max seconds": 3600.0,
  "Spawning - Automatically call helicopter between min seconds": 3600.0,
  "Spawning - Automatically call helicopter if one is already flying": false,
  "Spawning - Chinooks to spawn": 1,
  "Spawning - Disable CH47 default spawns": true,
  "Spawning - Disable Helicopter": false,
  "Spawning - Disable helicopter gibs": true,
  "Spawning - Disable helicopter napalm": false,
  "Spawning - Disable Rust's default spawns": false,
  "Spawning - Helicopters to spawn": 1,
  "Spawning - Max active helicopters": 1,
  "Spawning - Use custom helicopter spawns": true,
  "Spawning - Use static spawning": false,
  "Spawning - Use static spawning for CH47": false,
  "Turrets - Helicopter bullet accuracy": 2.0,
  "Turrets - Helicopter bullet damage": 20.0,
  "Turrets - Helicopter bullet speed": 250,
  "Turrets - Max range": 300.0,
  "Turrets - Time between turret bursts in seconds": 3.0,
  "Turrets - Turret burst length in seconds": 3.0,
  "Turrets - Turret fire rate in seconds": 0.125
}​
Hello, have you used HeliControl previously without issue? Has this started occurring after recent updates? It'd be very helpful to diagnosing the issue to get an answer on this, as it could be a bug. Thanks!
Hi Shady,

This is a new server and the first time I am using this plugin. 

I only have two groups - default and admin.  I do have a number of other plugins installed, but nothing that should be overriding these permissions.  
See an image below which lists the plugins in use. 

https://www.screencast.com/t/qS70QQkNrG

Thanks for your help.

PS.  Keen to buy your lock-on mod.  That is your plugin as well, right?
I didnt change my default cooldowns or limits, but try using the same cooldown (3600) for each setting and making the limits the same (for instance 2) , it might not do anything but it is worth a try, (in some plugins "0" equates to no limit)

You could also limit the amount of helis that are active at any one time by using :
Spawning - Max active helicopters (default -1) - The maximum amount of Helicopters that can be flying at any time from any source.  (i have mine set at 3)
@mediatomcat
Did you grant both "helicontrol.callheli" AND "helicontrol.cooldown.0" to the default group ?
Ah, I see.  I granted callheli, but not helicontrol.cooldown.  Thats very helpful. Ill test it when I get home.  
mediatomcat
Hi Shady,

This is a new server and the first time I am using this plugin. 

I only have two groups - default and admin.  I do have a number of other plugins installed, but nothing that should be overriding these permissions.  
See an image below which lists the plugins in use. 

https://www.screencast.com/t/qS70QQkNrG

Thanks for your help.

PS.  Keen to buy your lock-on mod.  That is your plugin as well, right?

I'm not sure which plugin you're referring to with lock-on, but it isn't mine. As for your issue, let us know how it goes after doing what FuelStream suggested. :)

Hi all,

Thanks for the input.  I tried those command and the cooldown and limit were applied to both admin and default.  But you can still call unlimited helis.  I thought there might be conflict with the TimeOfDay plugin, but I removed this and it had no effect. 

Also, I checked the HeliControlCooldowns.json file and this is updating with each spawn.  However, there is no info in the HeliControlSpawns.json file.  Should something be added here with each spawn?

Any other ideas?  Would be great to get this working. 
When you say "unlimited", do you mean without cooldown or without a number limit ?
I set cooldown.0 to 3600 and limit.0 to 1 for both default and admin.  However, you can just keep calling heli's - it does not say you have to wait 1 hour or anything.  The helis just keep coming.  I was using killheli, so I thought this might not count again your spawn limit, so I started taking them down, but as soo as I drop it then I can callheli again.

Thanks for trying to help btw, really appreciate it.  This is the only thing stopping my server going live. 

You say you used /killheli, do you have helicontrol.admin ?
If you do, I'm pretty sure that overrides any limit or cooldowns.

Remember to give default group helicontrol.limit.0 if you want to impose an amount per day limit.

Recap:
oxide.grant group default helicontrol.callheli OR oxide.grant group default helicontrol.callheliself
oxide.grant group default helicontrol.cooldown.0
oxide.grant group default helicontrol.limit.0
oxide.revoke group admin helicontrol.admin

and test again.

Hmm, maybe I have admin.  I will revoke and run the commands as you ahve laid them out.  Will let you know either way.  

Thanks..

Merged post

Unfortunately this did not work.  I followed the basic steps you recommended.  And then I did the following;

  1. Revoked every possible permission whether it was assigned or not for both default and admin
  2. Reinstalled the plugin and generated a default config.
  3. Updated the config to cooldown 0 to 1 hour and limits 0 to 1
  4. I then followed you process again - reload the plugin checked the permissions hadnt changed
  5. Used oxide.show group admin and default to see which permissions were assigned
  6. Still able to call unlimited heli.
  7. I then uninstalled every other plugin installed on the server, in case of a conflict
  8. Rebooted the server and checked that none of the other plugins were active
  9. Used oxide.show group admin and default to see which permissions were assigned
  10. Still able to call unlimited heli.
Only option I can think of now is to completely reinstall the server??  And then install just this one plugin and apply the permissions as per your message.  Do you think this is worth it?

Thanks again for all the help so far. 

Merged post

I took teh drastic step of completely unsinstalling SteamCMD and UMOd.  I reinstalled everything from scratch and only installed HeliControl plugin.  I followed your steps of granting and revoking permissions.  I set the limit to 1 but left cooldown and everything else at default.  Everything went well and as it should.

I logged in and was able to call in as many helis as a default user.  I had not yet set myself as an owner.  /callheli and then /killheli over and over and over.

I then added myself as owner did a callheli and shot it down with M249, I was immediately able to call heli again.  

I think there must be a bug with the latest version, becasue I cannot imagine what else to do or try.  Any last chance suggestions?  Maybe someone with nouce would do a screenshare with me to see the setup?

Thanks. 
I will try on my test server
Thanks. Hope you find something. 

Cooldowns and limits does NOT work on helicontrol.callheli
Maybe this was never meant to be a player perm but wasn't documented.
We can maybe get @Shady to look into this.

If you use helicontrol.callheliself both coolsdowns and limits work as intended.
The chat command with this perm is still /callheli

and I presume that the difference is that callheli perm spawns a public heli with no destination whereas the callheliself perm calls a heli with target/destination, and target being the player who used the chat command, although I didn't test long enough to verify this.

Sorry you reinstalled your server :o/

For now you can get it to work if you just grant the default group helicontrol.callheliself instead of helicontrol.callheli :o)
Locked automatically