AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   Reload weapon more ammunition than allowed (https://forums.alliedmods.net/showthread.php?t=340220)

SoulWeaver16 11-03-2022 16:44

Reload weapon more ammunition than allowed
 
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

Stefanos 11-12-2022 10:39

Re: Reload weapon more ammunition than allowed
 
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",

iceeedr 11-12-2022 11:52

Re: Reload weapon more ammunition than allowed
 
1 Attachment(s)
Take a look

SoulWeaver16 11-14-2022 06:01

Re: Reload weapon more ammunition than allowed
 
Quote:

Originally Posted by Stefanos (Post 2792653)
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 (Post 2792662)
Take a look

I'll take a look later, thanks

deprale 11-21-2022 00:36

Re: Reload weapon more ammunition than allowed
 
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 :D
https://forums.alliedmods.net/showthread.php?t=123645

SoulWeaver16 11-21-2022 15:22

Re: Reload weapon more ammunition than allowed
 
Quote:

Originally Posted by deprale (Post 2793305)
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 :D
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

deprale 11-22-2022 10:48

Re: Reload weapon more ammunition than allowed
 
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 :D

SoulWeaver16 11-22-2022 14:17

Re: Reload weapon more ammunition than allowed
 
Quote:

Originally Posted by deprale (Post 2793441)
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 (Post 2793441)
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 (Post 2793441)
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 :D

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.

Ark_Procession 11-27-2022 18:30

Re: Reload weapon more ammunition than allowed
 
Quote:

Originally Posted by iceeedr (Post 2792662)
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.


All times are GMT -4. The time now is 17:13.

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