Raised This Month: $12 Target: $400
 3% 

Reload weapon more ammunition than allowed


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SoulWeaver16
Senior Member
Join Date: May 2021
Location: Uruguay
Old 11-03-2022 , 16:44   Reload weapon more ammunition than allowed
Reply With Quote #1

Hello, I have a question about a plugin, is it possible to reload ammunition greater than the standard?
That is to say, the AK47, reloading more than 30 bullets, or the M3, more than 8 bullets, etc. I know in reserve if you can up to 999, but I'm not sure if you can reload a gun with custom ammo
__________________
Extended Arm Weapon Skin v2.1 {16/Apr/23}
(Detect which class is and associate it with the corresponding arms)
SideWeapons v0.2 {01/Sep/22}
(New version of Back Weapons v1.87)

SoulWeaver16 is offline
Stefanos
Senior Member
Join Date: May 2020
Old 11-12-2022 , 10:39   Re: Reload weapon more ammunition than allowed
Reply With Quote #2

Well its possible, im not sure is it possible with for example "84" ammo, but i think you can use ammo from other weapons like "30,50,100",
Stefanos is offline
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 11-12-2022 , 11:52   Re: Reload weapon more ammunition than allowed
Reply With Quote #3

Take a look
Attached Files
File Type: zip weapon_modifier.zip (6.5 KB, 42 views)
__________________


Quote:
Originally Posted by fysiks View Post
Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.
https://iceeedr.com.br/
iceeedr is offline
Send a message via Skype™ to iceeedr
SoulWeaver16
Senior Member
Join Date: May 2021
Location: Uruguay
Old 11-14-2022 , 06:01   Re: Reload weapon more ammunition than allowed
Reply With Quote #4

Quote:
Originally Posted by Stefanos View Post
Well its possible, im not sure is it possible with for example "84" ammo, but i think you can use ammo from other weapons like "30,50,100",
I had understood that it could be possible, for example in GunGame, there is an option that the AWP has one bullet when reloading, instead of the 10 that it would carry.
Quote:
Originally Posted by iceeedr View Post
Take a look
I'll take a look later, thanks
__________________
Extended Arm Weapon Skin v2.1 {16/Apr/23}
(Detect which class is and associate it with the corresponding arms)
SideWeapons v0.2 {01/Sep/22}
(New version of Back Weapons v1.87)

SoulWeaver16 is offline
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 #5

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
SoulWeaver16
Senior Member
Join Date: May 2021
Location: Uruguay
Old 11-21-2022 , 15:22   Re: Reload weapon more ammunition than allowed
Reply With Quote #6

Quote:
Originally Posted by deprale View Post
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
__________________
Extended Arm Weapon Skin v2.1 {16/Apr/23}
(Detect which class is and associate it with the corresponding arms)
SideWeapons v0.2 {01/Sep/22}
(New version of Back Weapons v1.87)

SoulWeaver16 is offline
deprale
Senior Member
Join Date: Oct 2018
Location: Leeds
Old 11-22-2022 , 10:48   Re: Reload weapon more ammunition than allowed
Reply With Quote #7

It's tough to understand, so if you have ANY amount of bullets left in your clip like even 1, or 6 or 15 or 29 when you reload you should have 31 in an ak47 for example yes?
What if you have 0 and you're reloading, does that mean that you still have 1 in the chamber?

It's not the logic per se but how would you implement such a realistic feat in a competitive esports game? I know some sims that do this like ready or not and some other indie combat sims in early alpha on steam, but how would you implement this in 1.6?

I guess you could mess with m_fInReload and tasks and hooking curweapon but I doubt it's gonna be anything requested, you'd be wasting time for a niche feature (no offence) in a game where it has no place to exist, if you tell some pub guy that he's gonna have to manually press R when he reaches 0/90 he's gonna lose his mind at the thought he's getting trolled by a 3rd party plugin in a relatively competitive shooter
__________________
deprale is offline
SoulWeaver16
Senior Member
Join Date: May 2021
Location: Uruguay
Old 11-22-2022 , 14:17   Re: Reload weapon more ammunition than allowed
Reply With Quote #8

Quote:
Originally Posted by deprale View Post
It's tough to understand, so if you have ANY amount of bullets left in your clip like even 1, or 6 or 15 or 29 when you reload you should have 31 in an ak47 for example yes?
What if you have 0 and you're reloading, does that mean that you still have 1 in the chamber?
That is correct, if you have 1, 6, 15 or 29 when reloading you would get 31 bullets in total, but instead if you have zero and you get automatic reloading, you would get 30, because the gun was fully unloaded, it does not have a bullet in the chamber.

Quote:
Originally Posted by deprale View Post
It's not the logic per se but how would you implement such a realistic feat in a competitive esports game? I know some sims that do this like ready or not and some other indie combat sims in early alpha on steam, but how would you implement this in 1.6?
I really didn't think of it as something serious, that is, there is a plugin that when reloading, discards the remaining bullets [Realistic Reload Mechanic] (for example, reloading with 25 bullets, 25 bullets are lost because according to the animation, you drop the magazine to the ground), forcing you to change your magazine when you have 0 bullets because you would lose the leftover bullets.
There isn't always a solid motivation for a plugin, but it's something I'd like to use in my Zombie Mod or if a "Realistic" mod is made later in CS 1.6, it would surely be included.

Quote:
Originally Posted by deprale View Post
I guess you could mess with m_fInReload and tasks and hooking curweapon but I doubt it's gonna be anything requested, you'd be wasting time for a niche feature (no offence) in a game where it has no place to exist, if you tell some pub guy that he's gonna have to manually press R when he reaches 0/90 he's gonna lose his mind at the thought he's getting trolled by a 3rd party plugin in a relatively competitive shooter
I guess so, but like all the ideas that I contribute to the page, they are things that I request for myself, if more people are interested, haha
Some are successful and I get support, others are not.
__________________
Extended Arm Weapon Skin v2.1 {16/Apr/23}
(Detect which class is and associate it with the corresponding arms)
SideWeapons v0.2 {01/Sep/22}
(New version of Back Weapons v1.87)


Last edited by SoulWeaver16; 11-22-2022 at 14:20.
SoulWeaver16 is offline
Ark_Procession
Senior Member
Join Date: Jun 2020
Location: Argentina
Old 11-27-2022 , 18:30   Re: Reload weapon more ammunition than allowed
Reply With Quote #9

Quote:
Originally Posted by iceeedr View Post
Take a look
Hi Iceeedr, i found this interesting, but i dont see any cvar sin the code, nor i have ever see a .lsp format.

Can you point me to the original post, please? thank you

nevermind, added the lsp file to configs. although it doesn't work as i expected.

weapon start with different amount of bullets, but you can reload to vanilla. is not set to max as i thought.

also max bpm ammo cannot be rebought.

plus more issues that make it unusable in an organized context.

Last edited by Ark_Procession; 11-27-2022 at 18:57. Reason: nm
Ark_Procession is offline
Reply


Thread Tools
Display Modes

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 14:58.


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