Raised This Month: $ Target: $400
 0% 

Reload weapon more ammunition than allowed


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
deprale
Senior Member
Join Date: Oct 2018
Location: Leeds
Old 11-21-2022 , 00:36   Re: Reload weapon more ammunition than allowed
Reply With Quote #6

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
__________________

Last edited by deprale; 11-21-2022 at 00:42.
deprale 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 07:42.


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