Robert_Easter Posted May 22, 2024 Posted May 22, 2024 I'm currently trying to disable the autoswap weapon when the ammo's running out... but unfortunatly this line of code doesn't do anything. I tried searching for the native aswell, I found this. Both of this code doesn't work. I use only javascript, can anyone help me to disable that autoswap ? Client side : const playerPed = mp.players.local.handle; mp.game.invoke("0xA21C51255B205245", playerPed, false); mp.game.weapon.unequipEmptyWeapons = false;
Kopra Posted May 24, 2024 Posted May 24, 2024 This should do it: mp.events.add("playerReady", () => mp.game.weapon.unequipEmptyWeapons = false)
Robert_Easter Posted May 24, 2024 Author Posted May 24, 2024 Thank you for your anwser .I tried it in a Client side script, unfortunatly it still switches the weapon.
Robert_Easter Posted May 31, 2024 Author Posted May 31, 2024 The problem is still not solved, can anyone propose a solution for this ? Thank you
Kopra Posted June 1, 2024 Posted June 1, 2024 mp.events.add("playerReady", () => { mp.game1.weapon.unequipEmptyWeapons = false; mp.game.weapon.unequipEmptyWeapons = false; }); Try this one
Robert_Easter Posted June 2, 2024 Author Posted June 2, 2024 Dude I can't believe you solved this, thank you, how you figured out the synthax ?) mp.game1 ? but thank you it's excellent 1
Kopra Posted June 5, 2024 Posted June 5, 2024 game1 is leftover v1 API, some methods still work for compatibility reasons or because v2 one is broken (for now). 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now