View Single Post
impossible_cc
Senior Member
Join Date: Sep 2018
Location: Ukraine
Old 01-13-2019 , 17:40   Re: [CSGO] How to prevent reloading if you have too much ammo
Reply With Quote #9

I have an idea how to do it.
I need to hook event <when you take something in your hand or switch weapon>.
Then every time this event fires, I store in global array weapon index, weapon index in listWeapons array .
Also I hook post weapon_fire.
Every time this event fires I store ammo in global array.
And OnPlayerRunCmd (buttons & IN_RELOAD) I check stored values, if ammo is more then okay, i prevent reloading.
The problem is - Is there any switch weapon event in cs go??

Sorry for my bad English, I will be grateful for any help!

Last edited by impossible_cc; 01-13-2019 at 17:41.
impossible_cc is offline