10/2022: I plan to completely rewrite this plugin somewhat soon. It's currently stable but the code really needs to be cleaned up.
Spawnable drones that can be piloted by the player that owns it. There is an example drone under configs/drones/example_drone.txt
. Drone plugins are placed under plugins/drones/
and a template can be found under scripting/drones/example_drone.sp
.
sm_drone
- Opens a menu with all available drones (root flag required by default)
- Configuration files so you can make your own custom drones
- Create your own logic for drones through other plugins (example included)
- Define a model and destroyed model for each drone
- Set health, speed, and acceleration for each drone
- Set up to 6 weapons with individual parameters
- Choose how the drone operates:
- Flying
- Hover
- Ground
- Flying drones move in the direction the camera is facing
- Cannot fly below specific speeds
- More agile than other drones
- Hover drones can fly and move in any direction
- Movement input controls drone movement
- More combat oriented
- Drones limited to ground movement
- Not functioning at this time
This plugin comes with several forwards and natives to use with other plugins. Refer to scripting/include/customdrones.inc
for more detailed explanations.
CD_ToggleViewLocked
- Unlock/Lock a drone to the player's view anglesCD_SpawnDroneByName
- Spawns a drone for a client from the given config nameCD_SetWeaponReloading
- Initiates a reload sequence on the given weapon for a droneCD_GetDroneWeapon
- Retrieves the weapon object from the given slotCD_GetDroneActiveWeapon
- Retrieves the active weapon object and its slot for the given droneCD_IsValidDrone
- Checks a given entity to see if it is a drone or notCD_SpawnRocket
- Spawns and prepares a rocket to be used as a base projectileCD_SpawnDroneBomb
- Spawns a custom bomb entity to be dropped from dronesCD_FireBullet
- Fires a hitscan attack from the droneCD_GetParamFloat
- Retrieves a float parameter from a drone's config fileCD_GetParamInteger
- Retrieves an integer parameter from a drone's config fileCD_GetParamString
- Retrieves a string parameter from a drone's config fileCD_GetCameraHeight
- Retrieves the vertical offset of a drone's view cameraCD_DroneTakeDamage
- Damages a drone and sends a damage event to the attackerCD_OverrideMaxSpeed
- Overrides the max speed for the given droneCD_GetClientDrone
- Retrieves the given client's drone object if currently piloting one
CD_OnDroneCreated
- Called when a drone initially spawnsCD_OnDroneDestroyed
- Called when a drone is destroyedCD_OnDroneRemoved
- Called when a drone is removed from the world after being destroyedCD_OnWeaponChanged
- Called when a player cycles weapons on a droneCD_OnDroneAttack
- Called when a drone fires its active weaponCD_OnPlayerEnterDrone
- Called when a player enters a droneCD_OnPlayerExitDrone
- Called when a player exits a drone
- Drones can phase through geometry at certain speeds
- Ground based drones are not properly tested/functioning at this time
- Native support abilities (healing, ammo regeneration, etc)
- Multiple move type modes for ground based drones