altv-issues icon indicating copy to clipboard operation
altv-issues copied to clipboard

Adding weaponShot or extending weaponChange event for ammunition tracking

Open tastydev opened this issue 4 years ago • 11 comments

Suggestion Since there are many edge cases to handle currently to track bullets/ammo of players it would be nice to see this feature inside the alt:V api.

Use cases Correct and easy tracking of ammunition amounts

Describe the solution you'd like Since the server currently already knows ammo amounts and since empty weapon sound click is synced as well it would nice to see a weaponShot event with oldAmmo, newAmmo and weaponHash or an ammo param inside the weaponChange event

Describe alternatives you've considered Designing ugly own clientside events through everyTick/interval checks to check ammunition of the current weapon and disabling ped tasks to stop the automated weaponswitch of the game. This is really bad cause u somehow rely on clientside data.

Additional context This would also help to resolve issue #667 which was a feature request to track the last bullet that got shot before the game unequips the empty weapon. I still would like to see both requests inside the api.

tastydev avatar Nov 02 '20 18:11 tastydev

duplicate of #1 , but with better description

ThomasMarangoni avatar Nov 02 '20 18:11 ThomasMarangoni

I remember talk about adding similar event, possible to add is event when weapon starts shooting and when it's stop. Otherwise it's a waste of traffic

Unnvaldr avatar Nov 02 '20 18:11 Unnvaldr

Afaik server has that info already. It just need to be parsed.

FabianTerhorst avatar Nov 02 '20 20:11 FabianTerhorst

it´s not a waste of traffic the information is already there on serverside

tastydev avatar Nov 02 '20 20:11 tastydev

it´s not a waste of traffic the information is already there on serverside

That's what devs spoke some time ago, not my words

Unnvaldr avatar Nov 02 '20 21:11 Unnvaldr

Found btw on discord that tuxick already told its possible and sent already. tuxick statement

tastydev avatar Nov 02 '20 22:11 tastydev

Found btw on discord that tuxick already told its possible and sent already. tuxick statement

It doesn't matter, I'm not the one implementing said feature, also not kinda up to me that someone can change his mind

Unnvaldr avatar Nov 02 '20 22:11 Unnvaldr

Why do u feel offended? I am posting this for documentation not to blame u :P

tastydev avatar Nov 02 '20 22:11 tastydev

Nah, not offended but kinda continuing the conversation regarding it? 😃

Unnvaldr avatar Nov 02 '20 22:11 Unnvaldr

Afaik server has that info already. It just need to be parsed.

Is this possible to add in the next update? Would be really great

KooperNinja avatar Jun 20 '22 07:06 KooperNinja

Its not planned for the next update. It most likely will first be available clientside. Because server doesn't has the info yet.

FabianTerhorst avatar Jun 20 '22 09:06 FabianTerhorst

Ammo getter / setter is now available in 15.0 dev.

FabianTerhorst avatar Jun 17 '23 09:06 FabianTerhorst