Description:
This is a cosmetic plugin for server donors which allows them to shoot props with trails out of their gun.
Props will be despawned after a short amount of time and only root admins can spam shoot.
CVARS: Listed in your cfg/sourcemod/plugin.trailgun.cfg (which is generated when the plugin is loaded)
sm_trailgun_weapon - (Default: tf_weapon_flaregun) What weapon(s) is/are used as the trail gun? Separate classnames with a comma. Put "all" if you want all weapons to be considered as a trailgun.
sm_trailgun_weapon_slot - (Default: -1) Which weapon slot should the trailgun be used on? -1 = All weapon slots are allowed, 0 = Primary Slot, 1 = Secondary Slot, 2 = Melee Slot
sm_trailgun_despawn_time - (Default: 6) After a prop & trail is shot out of the gun, how many seconds till it despawns?
sm_trailgun_delay - (Default: 4.0) Time in seconds before a prop can be shot again. Use the command override below to set who can bypass this cvar.
Command:
sm_trailgun - (Default Access: ADMFLAG_RESERVATION) Opens the Trail Gun menu.
Command Override: This would go in your addons/sourcemod/configs/admin_overrides.cfg
sm_trailgun_override_delay - (Default Access: ADMFLAG_ROOT) This is the override to bypass the sm_trailgun_delay cvar (meaning there's no delay).
Developer Native:
PHP Code:
/** * Does the player have the trailgun enabled? * * @param1 client - player's client index * @return True if the player has it enabled, false otherwise */ native bool TG_Enabled(int client);
For those of us who don't read and follow your instructions you might want to change the LogErrors to SetFailStates ("Host_Error: Bad string: ?" crash if the config files aren't present)