Weapon-Specific Spawn Protection
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.
- wssp_protect_time - How long players are protected for after they spawn.
- 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 of 'spawn_protect_weapons.ini'
- Code: ;Use this file to configure which weapons players are protected from on spawn.
- 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.
October 14, 2011
Code: October 12, 2011
- Turn off weapons if no plugins were registered
- Don't read from file if file was just created
- Change from boolean + task to gametime
- Optimized Ham_TakeDamage and Ham_TraceAttack function calls
- Credits to ConnorMcLeod for these optimizations.
Attached Files Get Plugin
or Get Source
(weapon_spawn_protection.sma - 4.2 KB) Wyświetl pełny artykuł