(For lack of a better name)
Enables you to take the C4 from a teammate by aiming at him/her and pressing the USE key. (default 'E')
This is especially useful when playing with bots either for gameplay or debug purposes...
amxmodx | fakemeta_util | hamsandwich
- c4t_admin_only [default 1] - limits the plugin for admin use only. Set to '0' so that everyone can take the C4. Set to '2' and admin gets the C4 automatically every start of a round.
- c4t_take_from_humans [default 0 ]- set to '1' to enable to take C4 from human players
- c4t_max_distance [default 120] - max distance for the take
- c4t_hud [default 5] - number of instances the HUD Message appears. Set to '0' to disable. Can be set to '9999...'.
- Only Admins can take C4 by default
- Max distance of the HUD message are the same which means it may serve as an indicator of sorts.
- HUD message appears for certain amount of instances (set by a cvar) for each human player. After that it is disabled.
I did this because I found the HUD message annoying after a couple of rounds.
- Based off joaquimandrade's and ConnorMcLeod's "EasyWeaponsTrade" plugin.
- First submitted plugin. Please don't hang me. Just take my bacon if you want.:bacon!:
- More optimization
- A few more inconsistencies fixed
- Code consistency. Courtesy for those wanting to learn the script.
- Code optimization.
- c4t_admin_only cvar now has 3 modes
0 - Disables admin_only. Everyone can take the C4.
1 - Enabled. Only admin gets to take the C4 from a teammate.
2 - Every start of a round, the admin always gets the C4.
- Carrier gets a HUD message when C4 is taken from them and who took it.
- Added CVAR 'admin_only' which limits use for admins only. It is set to '1' by default
- HUD Message disappears immediately when you've stopped looking at the bomb carrier
- Changed max distance default from 200 to 120
- New plugin name
- Removed unused 'MaxSlots' variable
- Removed some redundancies on EventStatusValue_PlayerID
- EventStatusValue_PlayerID now checks first if aiming player is alive
- Switched from CVARS to PCVARS because my code is horrible
- HUD Message now enabled when 'c4t_take_from_human' cvar is enabled
- Replaced getLookingAt function with native get_user_aiming
- Added 3 cvars
- Fixed code to prevent dead players from getting the C4
- Added code that resets the HUD Message limiter when player disconnects
To joaquimandrade & ConnorMcLeod for their EasyWeaponsTrade that inspired the idea.
To wickked & JusTGo for helping me with the HUD message.
To VEN for his bomb scripting tutorial.
To HamletEagle for helping me optimize the script.
Attached Images screencap.jpg (75.5 KB) Attached Files Get Plugin or Get Source (c4_taker.sma - 4.5 KB)
Wyświetl pełny artykuł