By: nikhilgupta345
Description:
This plugin allows you to protect a player from a certain weapon for the first X seconds after he spawns. A .ini file is created where you can place the weapon names that you want to be blocked.
CVars:
wssp_protect_time - How long players are protected for after they spawn.
Installation:
Click 'Get Plugin' link below
Place 'weapon_spawn_protection.amxx' in addons/amxmodx/plugins/ folder
Open addons/amxmodx/configs/plugins.ini
Add the line 'weapon_spawn_protection.amxx' at the bottom
Either create 'spawn_protect_weapons.ini' on your own in the configs folder or allow the plugin to run once and it'll create it for you.
Add weapon names to it (weapon_awp, weapon_deagle, weapon_usp). Full list can be found here: http://wiki.amxmodx.org/CS_Weapons_Information
Restart server or change map
Example:
Example of 'spawn_protect_weapons.ini'
Changelog:;Use this file to configure which weapons players are protected from on spawn.
weapon_awp
weapon_deagle
weapon_knife
weapon_usp
;weapon_aug
Credits:October 12, 2011
-v1.0-
Initial Release
-v1.0.1-
Turn off weapons if no plugins were registered
Don't read from file if file was just created
Change from boolean + task to gametime
October 14, 2011
-v1.1-
Optimized Ham_TakeDamage and Ham_TraceAttack function calls
Credits to ConnorMcLeod for these optimizations.
July 07, 2011
-v1.1.1-
Closed file handle after use (xPaw)
Disabled some Ham forwards if they were not needed (Arkshine)
Vammpa - Main plugin idea (http://forums.alliedmods.net/showthread.php?p=1573613)
ConnorMcLeod - Plugin Optimizations
plugin
source