Raised This Month: $ Target: $400
 0% 

Help to make a fast reload shotguns


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
artist
Member
Join Date: Nov 2013
Old 01-07-2015 , 19:25   Help to make a fast reload shotguns
Reply With Quote #1

Very quickly recharged shotguns...

My attempts:

Code:
#include <amxmodx> #include <fakemeta> #include <hamsandwich> #define m_pPlayer       41 #define m_fInReload         54 #define m_flNextReload      75 #define m_fInSpecialReload  55 #define m_flTimeWeaponIdle  48 #define m_flNextAttack      83 #define m_flNextPrimaryAttack   46 #define m_flNextSecondaryAttack 47 public plugin_init() {     RegisterHam(Ham_Weapon_Reload, "weapon_m3", "reload_shotguns", 1)     RegisterHam(Ham_Weapon_Reload, "weapon_xm1014", "reload_shotguns", 1) } public reload_shotguns(ent) {     static id; id = get_pdata_cbase(ent, m_pPlayer, 4)     static Float:time_reload; time_reload = 0.5     static special; special = get_pdata_int(ent, m_fInSpecialReload, 4)         if(!special)     {         time_reload *= get_pdata_float(id, m_flNextAttack, 5)         set_pdata_int(ent, m_fInSpecialReload, 1, 4)         set_pdata_float(id, m_flNextAttack, time_reload, 5)         set_pdata_float(ent, m_flTimeWeaponIdle, time_reload, 4)         set_pdata_float(id, m_flNextPrimaryAttack, time_reload, 5)         set_pdata_float(id, m_flNextSecondaryAttack, time_reload, 5)     }     else if(special == 1)     {         time_reload *= get_pdata_float(ent, m_flNextReload, 4)         set_pdata_int(ent, m_fInSpecialReload, 2, 4)         set_pdata_float(ent, m_flNextReload, time_reload, 4)         set_pdata_float(ent, m_flTimeWeaponIdle, time_reload, 4)     }     else set_pdata_int(ent, m_fInSpecialReload, 1, 4)     return HAM_SUPERCEDE }

Mainly affects:
Code:
set_pdata_int(ent, m_fInSpecialReload, 2, 4)

How to make that?

Last edited by artist; 01-07-2015 at 19:32.
artist is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:32.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode