Weapon-Specific Spawn Protection
By: nikhilgupta345
<b>
Description:
</b>
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.
<b>
CVars:
</b>
- 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....ons_Information
- Restart server or change map
Example:
- Example of 'spawn_protect_weapons.ini'
- Code: ;Use this file to configure which weapons players are protected from on spawn.
weapon_awp
weapon_deagle
weapon_knife
weapon_usp
;weapon_aug - In the above code, awp, deagle, knife, and usp will be blocked, but not aug. Using ';', or '//' at the beginning of the line will comment it out completely. If something is not working, make sure that you see the 'Weapon Loaded: WEAPON_NAME' in console when you restart the server. If it's there and it is not working, let me know.
Changelog:
Code: October 12, 2011- -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.
Credits:
Attached Files
Get Plugin or
Get Source (weapon_spawn_protection.sma - 4.2 KB)
Wyświetl pełny artykuł