Quote:
Originally Posted by deprale
ReApi & cstrike module can do that.
https://github.com/s1lentq/reapi/blo...medll.inc#L547
https://github.com/s1lentq/reapi/blo...medll.inc#L568
Or you can also use cs_set_user_ammo and cs_set_user_bpammo respectively.
If you mean like reload even when you have "full ammo" etc 30/90 and use backpack ammo to reload to 60/90 you can literally fake that with messages and then set his ammo to 60 and remove the amount from bpammo.
PHP Code:
message_begin(MSG_ONE,108,{0,0,0},id)
write_short(reloadtime)
message_end()
stop him from shooting somehow(you'll find hundreds of ways) if it doesn't prevent him already (never tested).
or you can directly set_pdata_int( iWeapon, m_fInReload, true ) you can find more info in hlsdk like usual
reloadtime you can rebuild it with info from source (idk why nobody bothered to make an excel sheet or something like that for future devs, or at least a wiki page)
i guess you can just search in the repo for C(GunNameHere)::reload
example:
https://github.com/alliedmodders/hls...glock.cpp#L229
also xPaw posted nice info in 2010, I was gonna say that you're gonna have some trouble with the shotguns
https://forums.alliedmods.net/showthread.php?t=123645
|
I understand, because my idea was somewhat silly and without purpose, since if the weapon was not completely empty, when reloading it would have one more bullet than the usual charger, in real life, there is always one bullet left in the chamber, for example when reloading the AK-47, it would have 31 bullets, but 30 if you fully depleted the magazine, with the P90 it would have 51 bullets, m249 101 bullets, etc.
Shotguns have always been a problem in every aspect, I prefer not to get involved in that hahaha
__________________