Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Plugin generated by AMXX-Studio */
- #include <amxmodx>
- #include <hamsandwich>
- #include <reapi>
- #define PLUGIN "Switch weapons after throwing grenades"
- #define VERSION "1.0"
- #define AUTHOR "author"
- public plugin_init() {
- register_plugin(PLUGIN, VERSION, AUTHOR)
- RegisterHam(Ham_Weapon_WeaponIdle, "weapon_hegrenade", "Weapon_WeaponIdle_Pre", false);
- }
- public Weapon_WeaponIdle_Pre(const item)
- {
- if (Float:get_member(item, m_Weapon_flTimeWeaponIdle) > 0.0
- || Float:get_member(item, m_flStartThrow) > 0.0
- || Float:get_member(item, m_flReleaseThrow) < 0.0)
- {
- return HAM_IGNORED;
- }
- set_member(item, m_flStartThrow, 0.0);
- ExecuteHamB(Ham_Weapon_RetireWeapon, item);
- return HAM_SUPERCEDE;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement