HeliCommander

HeliCommander 0.3.25



Currently implemented features:
- Optional custom flight controls and mechanics for the Patrol Helicopter (UH1Y), the Chinook (CH47) , the Minicopter and the Scrap Transport Helicopter
- Working rocket launchers and machine guns (UH1Y)
- Weapon ammunition system (UH1Y)
- Crash detection and damage system (UH1Y)
- Health, fuel and ammunition UI
- Customizable inventory and fuel systems
- Customizable passenger options with Friends and Clans support
- Customizable repair systems
- Option to allow players to spawn helicopters (with cooldowns)
- Option to allow players to build helicopters (with cooldowns) using specified resources

Default Controls:
w - Tilt forward
s - Tilt backward
a - Roll left
d - Roll right
Shift - Throttle up
Control - Throttle down
e - Enter
space - Exit
r - Inventory access (from outside the vehicle)
mouse look - Yaw left and right
e - While piloting will lock yaw so you can look left and right
Mouse 1 - Fire machine guns (Fires the guns relative to the direction you are facing)
Mouse 2 - Fire rockets

** Note : Due to the lack of buttons sent to the server from the client all controls besides YAW (turn left/right) are set to buttons. Because of this the yaw is adjusted based on the direction the pilots camera is facing ex. Look left -> Turn left / Look right -> Turn right. There is a slight 'dead zone' when facing straight ahead to prevent the helicopter from turning due to a small degree of camera angle

Commands
/spawnhc uh1y - Spawn a UH1Y where you are looking. This command uses the spawn cooldown system (Requires permission ' helicommander.canspawn.uh1y ')
/spawnhc ch47 - Spawn a CH47 where you are looking. This command uses the spawn cooldown system (Requires permission ' helicommander.canspawn.ch47 ')
/spawnhc mini - Spawn a Minicopter where you are looking. This command uses the spawn cooldown system (Requires permission ' helicommander.canspawn.mini ')
/spawnhc transport - Spawn a Scrap Transport Helicopter where you are looking. This command uses the spawn cooldown system (Requires permission ' helicommander.canspawn.transport ')

/storehc - Despawn the helicopter you are flying. The helicopter must be parked on the ground and you must be in the driver seat. Using this command will reset the cooldown applied from using the spawn command and the contents of the vehicle inventory and fuel tank will be dropped on the floow

/buildhc uh1y - Build a UH1Y using items specified in the config (Requires permission ' helicommander.canbuild.uh1y ')
/buildhc ch47 - Build a CH47 using items specified in the config (Requires permission ' helicommander.canbuild.ch47 ')
/buildhc mini - Build a Minicopter using items specified in the config (Requires permission ' helicommander.canbuild.mini ')
/buildhc transport - Build a Scrap Transport Helicopter using items specified in the config (Requires permission ' helicommander.canbuild.transport ')

Console Commands
spawnhc <ch47/uh1y/mini/transport> <playerId> - Spawn the specified helicopter infront of the player with the specified ID
spawnhc <ch47/uh1y/mini/transport> <x> <y> <z> - Spawn a the specified helictopter at the co-ordinates provided

Saving helicopters through plugin reload or server restart
To save command spawned helicopters through plugin reload or server restart add the "save" argument to the end of the command ex. "/spawnhc uh1y save" or "spawnhc uh1y save"

To save auto-spawned helicopter set the config option "Save helicopters spawned through the spawn system through reloads/restarts" to true for the applicable helicopter types

Permissions
helicommander.use.ch47 - Required to fly the CH47
helicommander.use.uh1y - Required to fly the UH1Y
helicommander.use.mini - Required to fly the Minicopter
helicommander.use.transport - Required to fly the Scrap Transport Helicopter

helicommander.passenger.ch47 - Allows players to enter the the CH47 as a passenger
helicommander.passenger.uh1y - Allows players to enter the the UH1Y as a passenger
helicommander.passenger.mini - Allows players to enter the the Minicopter as a passenger
helicommander.passenger.transport - Allows players to enter the the Scrap Transport Helicopter as a passenger

helicommander.canspawn.ch47 - Required to spawn a CH47 via chat command
helicommander.canspawn.uh1y - Required to spawn a UH1Y via chat command
helicommander.canspawn.mini - Required to spawn a Minicopter via chat command
helicommander.canspawn.transport - Required to spawn a Scrap Transport Helicopter via chat command

helicommander.canbuild.ch47 - Required to build a CH47 via chat command
helicommander.canbuild.uh1y - Required to build a UH1Y via chat command
helicommander.canbuild.mini - Required to build a Minicopter via chat command
helicommander.canbuild.transport - Required to build a Scrap Transport Helicopter via chat command

helicommander.ignorecooldown.ch47 - Players with this permission will ignore the spawn cooldown when spawning a CH47
helicommander.ignorecooldown.uh1y - Players with this permission will ignore the spawn cooldown when spawning a UH1Y
helicommander.ignorecooldown.mini - Players with this permission will ignore the spawn cooldown when spawning a Minicopter
helicommander.ignorecooldown.transport - Players with this permission will ignore the spawn cooldown when spawning a Scrap Transport Helicopter

API
C#:
(bool) IsHeliController(BaseHelicopter) // Returns true if helicopter is controllable

(ulong[]) GetOccupantIDs(BaseHelicopter) // Returns a array of user IDs of each occupant of the helicopter

Config
C#:
{
  "CH47 Options": {
    "Use Custom Controls": false,
    "Movement Settings": {
      "Pitch Tilt Force": 30.0,
      "Roll Tilt Force": 9.0,
      "Turn Force (Yaw via controls)": 24.0,
      "Roll Turn Force (Yaw via roll)": 6.0,
      "Engine Lift": 15000.0,
      "Engine Thrust": 8000.0,
      "Thrust Lerp Speed": 6.0,
      "Lift Angle Max (0.0 - 1.0)": 0.5,
      "Thrust Angle Min (0.0 - 1.0)": 0.85,
      "Lift Fraction (0.0 - 1.0)": 0.75,
      "Hover Force Scale (0.0 - 1.0)": 0.75
    },
    "Passenger Options": {
      "Allow passengers": true,
      "Require passenger to be a friend (FriendsAPI)": true,
      "Require passenger to be a clan mate (Clans)": true,
      "Eject non-friendly players when a player enters the pilot seat": true
    },
    "Inventory Options": {
      "Enable inventory system": true,
      "Drop inventory on death": true,
      "Drop loot on death": false,
      "Inventory size (max 36)": 36
    },
    "Health and Damage Options": {
      "Initial health": 7500,
      "Damage modifiers": {
        "Bullet": 1.0,
        "Explosion": 1.0
      }
    },
    "Fuel Options": {
      "Requires fuel": true,
      "Fuel type (item shortname)": "lowgradefuel",
      "Fuel consumption rate (litres per second)": 0.25,
      "Spawn vehicles with fuel": true,
      "Amount of fuel to give spawned vehicles (minimum)": 10,
      "Amount of fuel to give spawned vehicles (maximum)": 50
    },
    "Spawnable Options": {
      "Enable automatic vehicle spawning": true,
      "Use RandomSpawns for spawn locations": false,
      "Save helicopters spawned through the spawn system through reloads/restarts": false,
      "Spawnfile name": "",
      "Maximum spawned vehicles at any time": 2,
      "Time between autospawns (seconds)": 1800,
      "Cooldown time for player spawned vehicles via chat command (seconds)": 86400
    },
    "Repair Options": {
      "Allow users to repair helicopters": true,
      "Shortname of item required to repair": "scrap",
      "Amount of item required to repair": 10,
      "Amount of damage repaired per hit": 30
    },
    "Build Options": {
      "Allow users to build this helicopter": false,
      "Use cooldown timers": true,
      "Build Costs": [
        {
          "Item shortname": "metal.refined",
          "Amount": 500
        },
        {
          "Item shortname": "techparts",
          "Amount": 100
        }
      ]
    }
  },
  "Minicopter Options": {
    "Convert game spawned minicopters to HeliCommander minicopters": false,
    "Use Custom Controls": true,
    "Movement Settings": {
      "Pitch Tilt Force": 30.0,
      "Roll Tilt Force": 40.0,
      "Turn Force (Yaw via controls)": 3.0,
      "Roll Turn Force (Yaw via roll)": 1.5,
      "Engine Lift": 3500.0,
      "Engine Thrust": 2500.0,
      "Thrust Lerp Speed": 8.0,
      "Lift Angle Max (0.0 - 1.0)": 0.25,
      "Thrust Angle Min (0.0 - 1.0)": 0.5,
      "Lift Fraction (0.0 - 1.0)": 0.75,
      "Hover Force Scale (0.0 - 1.0)": 0.75
    },
    "Passenger Options": {
      "Allow passengers": true,
      "Require passenger to be a friend (FriendsAPI)": true,
      "Require passenger to be a clan mate (Clans)": true,
      "Eject non-friendly players when a player enters the pilot seat": true
    },
    "Inventory Options": {
      "Enable inventory system": true,
      "Drop inventory on death": true,
      "Drop loot on death": false,
      "Inventory size (max 36)": 36
    },
    "Health and Damage Options": {
      "Initial health": 1000,
      "Damage modifiers": {
        "Bullet": 1.0,
        "Explosion": 1.0
      }
    },
    "Fuel Options": {
      "Requires fuel": true,
      "Fuel type (item shortname)": "lowgradefuel",
      "Fuel consumption rate (litres per second)": 0.25,
      "Spawn vehicles with fuel": true,
      "Amount of fuel to give spawned vehicles (minimum)": 10,
      "Amount of fuel to give spawned vehicles (maximum)": 50
    },
    "Spawnable Options": {
      "Enable automatic vehicle spawning": true,
      "Use RandomSpawns for spawn locations": false,
      "Save helicopters spawned through the spawn system through reloads/restarts": false,
      "Spawnfile name": "",
      "Maximum spawned vehicles at any time": 2,
      "Time between autospawns (seconds)": 1800,
      "Cooldown time for player spawned vehicles via chat command (seconds)": 86400
    },
    "Repair Options": {
      "Allow users to repair helicopters": true,
      "Shortname of item required to repair": "scrap",
      "Amount of item required to repair": 10,
      "Amount of damage repaired per hit": 30
    },
    "Build Options": {
      "Allow users to build this helicopter": false,
      "Use cooldown timers": true,
      "Build Costs": [
        {
          "Item shortname": "metal.refined",
          "Amount": 500
        },
        {
          "Item shortname": "techparts",
          "Amount": 100
        }
      ]
    }
  },
  "Scrap Transport Options": {
    "Convert game spawned minicopters to HeliCommander minicopters": false,
    "Use Custom Controls": true,
    "Movement Settings": {
      "Pitch Tilt Force": 30.0,
      "Roll Tilt Force": 40.0,
      "Turn Force (Yaw via controls)": 10.0,
      "Roll Turn Force (Yaw via roll)": 6.0,
      "Engine Lift": 4500.0,
      "Engine Thrust": 3000.0,
      "Thrust Lerp Speed": 8.0,
      "Lift Angle Max (0.0 - 1.0)": 0.5,
      "Thrust Angle Min (0.0 - 1.0)": 0.5,
      "Lift Fraction (0.0 - 1.0)": 0.45,
      "Hover Force Scale (0.0 - 1.0)": 0.9
    },
    "Passenger Options": {
      "Allow passengers": true,
      "Require passenger to be a friend (FriendsAPI)": true,
      "Require passenger to be a clan mate (Clans)": true,
      "Eject non-friendly players when a player enters the pilot seat": true
    },
    "Inventory Options": {
      "Enable inventory system": true,
      "Drop inventory on death": true,
      "Drop loot on death": false,
      "Inventory size (max 36)": 36
    },
    "Health and Damage Options": {
      "Initial health": 1000,
      "Damage modifiers": {
        "Bullet": 1.0,
        "Explosion": 1.0
      }
    },
    "Fuel Options": {
      "Requires fuel": true,
      "Fuel type (item shortname)": "lowgradefuel",
      "Fuel consumption rate (litres per second)": 0.25,
      "Spawn vehicles with fuel": true,
      "Amount of fuel to give spawned vehicles (minimum)": 10,
      "Amount of fuel to give spawned vehicles (maximum)": 50
    },
    "Spawnable Options": {
      "Enable automatic vehicle spawning": true,
      "Use RandomSpawns for spawn locations": false,
      "Save helicopters spawned through the spawn system through reloads/restarts": false,
      "Spawnfile name": "",
      "Maximum spawned vehicles at any time": 2,
      "Time between autospawns (seconds)": 1800,
      "Cooldown time for player spawned vehicles via chat command (seconds)": 86400
    },
    "Repair Options": {
      "Allow users to repair helicopters": true,
      "Shortname of item required to repair": "scrap",
      "Amount of item required to repair": 10,
      "Amount of damage repaired per hit": 30
    },
    "Build Options": {
      "Allow users to build this helicopter": false,
      "Use cooldown timers": true,
      "Build Costs": [
        {
          "Item shortname": "metal.refined",
          "Amount": 500
        },
        {
          "Item shortname": "techparts",
          "Amount": 100
        }
      ]
    }
  },
  "UH1Y Options": {
    "Weapon Options": {
      "Rockets": {
        "Enable weapon system": true,
        "Require ammunition in inventory": false,
        "Ammunition type (item shortname)": "ammo.rocket.hv",
        "Fire rate (seconds)": 1.75,
        "Aim cone (smaller number is more accurate)": 0.025,
        "Damage": 90.0
      },
      "Machine Gun": {
        "Enable weapon system": true,
        "Require ammunition in inventory": false,
        "Ammunition type (item shortname)": "ammo.rifle.hv",
        "Fire rate (seconds)": 0.1,
        "Aim cone (smaller number is more accurate)": 1.25,
        "Damage": 10.0
      }
    },
    "Movement Settings": {
      "Pitch Tilt Force": 30.0,
      "Roll Tilt Force": 40.0,
      "Turn Force (Yaw via controls)": 30.0,
      "Roll Turn Force (Yaw via roll)": 20.0,
      "Engine Lift": 6000.0,
      "Engine Thrust": 3500.0,
      "Thrust Lerp Speed": 12.0,
      "Lift Angle Max (0.0 - 1.0)": 0.5,
      "Thrust Angle Min (0.0 - 1.0)": 0.85,
      "Lift Fraction (0.0 - 1.0)": 0.85,
      "Hover Force Scale (0.0 - 1.0)": 0.75
    },
    "Passenger Options": {
      "Allow passengers": true,
      "Require passenger to be a friend (FriendsAPI)": true,
      "Require passenger to be a clan mate (Clans)": true,
      "Eject non-friendly players when a player enters the pilot seat": true
    },
    "Inventory Options": {
      "Enable inventory system": true,
      "Drop inventory on death": true,
      "Drop loot on death": false,
      "Inventory size (max 36)": 36
    },
    "Health and Damage Options": {
      "Initial health": 7500,
      "Damage modifiers": {
        "Bullet": 1.0,
        "Explosion": 1.0
      }
    },
    "Fuel Options": {
      "Requires fuel": true,
      "Fuel type (item shortname)": "lowgradefuel",
      "Fuel consumption rate (litres per second)": 0.5,
      "Spawn vehicles with fuel": true,
      "Amount of fuel to give spawned vehicles (minimum)": 10,
      "Amount of fuel to give spawned vehicles (maximum)": 50
    },
    "Spawnable Options": {
      "Enable automatic vehicle spawning": true,
      "Use RandomSpawns for spawn locations": false,
      "Save helicopters spawned through the spawn system through reloads/restarts": false,
      "Spawnfile name": "",
      "Maximum spawned vehicles at any time": 2,
      "Time between autospawns (seconds)": 1800,
      "Cooldown time for player spawned vehicles via chat command (seconds)": 86400
    },
    "Repair Options": {
      "Allow users to repair helicopters": true,
      "Shortname of item required to repair": "scrap",
      "Amount of item required to repair": 10,
      "Amount of damage repaired per hit": 30
    },
    "Build Options": {
      "Allow users to build this helicopter": false,
      "Use cooldown timers": true,
      "Build Costs": [
        {
          "Item shortname": "metal.refined",
          "Amount": 500
        },
        {
          "Item shortname": "techparts",
          "Amount": 100
        }
      ]
    }
  },
  "Button Configuration": {
    "Toggle light": "RELOAD",
    "Open inventory": "RELOAD",
    "Pitch Forward": "FORWARD",
    "Pitch Backward": "BACKWARD",
    "Roll Left": "LEFT",
    "Roll Right": "RIGHT",
    "Throttle Up": "SPRINT",
    "Throttle Down": "DUCK",
    "Lock Yaw": "USE",
    "Fire Rockets": "FIRE_SECONDARY",
    "Fire MG": "FIRE_PRIMARY",
    "Open fuel tank": "FIRE_THIRD"
  },
  "UI Options": {
    "Health settings": {
      "Display to player": true,
      "Position - X minimum": 0.69,
      "Position - X maximum": 0.83,
      "Position - Y minimum": 0.1,
      "Position - Y maximum": 0.135,
      "Background color (hex)": "#F2F2F2",
      "Background alpha": 0.05,
      "Status color (hex)": "#ce422b",
      "Status alpha": 0.6
    },
    "Rocket settings": {
      "Display to player": true,
      "Position - X minimum": 0.69,
      "Position - X maximum": 0.83,
      "Position - Y minimum": 0.06,
      "Position - Y maximum": 0.096,
      "Background color (hex)": "#F2F2F2",
      "Background alpha": 0.05,
      "Status color (hex)": "#ce422b",
      "Status alpha": 0.6
    },
    "MG settings": {
      "Display to player": true,
      "Position - X minimum": 0.69,
      "Position - X maximum": 0.83,
      "Position - Y minimum": 0.021,
      "Position - Y maximum": 0.056,
      "Background color (hex)": "#F2F2F2",
      "Background alpha": 0.05,
      "Status color (hex)": "#ce422b",
      "Status alpha": 0.6
    },
    "Fuel settings": {
      "Display to player": true,
      "Position - X minimum": 0.69,
      "Position - X maximum": 0.83,
      "Position - Y minimum": 0.139,
      "Position - Y maximum": 0.174,
      "Background color (hex)": "#F2F2F2",
      "Background alpha": 0.05,
      "Status color (hex)": "#ce422b",
      "Status alpha": 1.0
    },
    "Crosshair settings": {
      "Display to player": true,
      "Size": 25,
      "Color (hex)": "#ce422b"
    }
  },
  "Version": {
    "Major": 0,
    "Minor": 3,
    "Patch": 0
  }
}

Information

Author
k1lly0u
First release
Last update
Rating
4.11 star(s) 9 ratings

Latest Release v0.3.25

Released
Oct 3, 2024 at 9:56 AM
Rating
0.00 star(s) 0 ratings


More resources from k1lly0u

  • PilotEject
    PilotEject
    A mini event where a helicopter malfunctions and the pilot has to eject
  • HeliRefuel
    HeliRefuel
    A mini-event where a helicopter populated with NPCs needs to land to refuel
  • ZombieHorde
    ZombieHorde
    Create hordes of zombies that roam around your server looking for brains
  • Admin Menu
    Admin Menu
    Manage groups, permissions, commands and convars from a GUI menu
  • TeleportGUI
    TeleportGUI
    Teleport, home and warp with a easy to use UI

HeliCommander by k1lly0u
© chaoscode.io Aug 30, 2017

Latest reviews

Works flawlessly! Just one MAJOR issue for me.. there needs to be a way to mute the helicopter when unoccupied please!!! <3
Everything about this mod and the Author is Amazing. Thank You for this.
Nice Plugin but if the helicopter was destroyed, other players will hear it permanently at this point (Until Server Restarts).
Love the plugin but, it would we way nice if we could turn the heli off when not using!
Pretty nifty, would be much better if you could turn the sound off when it is parked.