Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weapon Ammo type #2308

Open
1 task done
kernkode opened this issue Jul 24, 2024 · 1 comment
Open
1 task done

Weapon Ammo type #2308

kernkode opened this issue Jul 24, 2024 · 1 comment
Labels
Class: bug Something isn't working

Comments

@kernkode
Copy link

kernkode commented Jul 24, 2024

Description of the problem

I am trying to add explosive ammunition to my weapon, but in the attempt only the component is placed, and when I try to add the ammunition nothing happens, it has the explosive bullets component but with the functions of adding the ammunition it does nothing

Reproduction steps

alt.on('playerConnect', (player: alt.Player) => {
    player.giveWeapon(alt.hash("weapon_CARBINERIFLE_MK2".toLowerCase()), 200, true);
    player.addWeaponComponent(alt.hash("weapon_" + "CARBINERIFLE_MK2".toLowerCase()), 0x3D25C2A7);
    
    let ammo = alt.getAmmoHashForWeaponHash(alt.hash("weapon_" + "CARBINERIFLE_MK2".toLowerCase()));
    player.setAmmoFlags(alt.getAmmoHashForWeaponHash(alt.hash("weapon_" + "CARBINERIFLE_MK2".toLowerCase())), false, false, false, false);
    player.setAmmo(ammo, 100);
    player.setAmmo(0x3D25C2A7, 100);
});

Expected behaviour

I was waiting for him to give me the explosive bullets

Additional context

I don't know if it's a bug or I'm doing something wrong, I looked to see if anyone had tried to do this but I couldn't find anything.

Operating system

windows 10

Version

alt:V Server 16.1.1 (release)

Crashdump ID

none

Confirmation of issue's presence

  • By submitting this ticket, I affirm that I have verified the presence of this issue on the latest developer version available at the time of writing this ticket.
@kernkode kernkode added the Class: bug Something isn't working label Jul 24, 2024
@Lekenthu
Copy link

I will confirm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Class: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants