orel56000 Posted October 9, 2017 Posted October 9, 2017 When a weapon has 0 bullets its disappeard, how to make the weapon stay in my hands even if I got no ammo?
koragg Posted October 9, 2017 Posted October 9, 2017 (edited) I'm no expert in modes other than race but you could test if holding a weapon with 0 ammo is even possible the following way: Make a function which gives you a weapon and set it's ammo variable to 0 with this: https://wiki.multitheftauto.com/wiki/GiveWeapon via a command handler. If it doesn't disappear then there is a way to do what you want, otherwise it could be hardcoded to go away when out of ammo. You can also see if it has 0 ammo with this: https://wiki.multitheftauto.com/wiki/GetWeaponAmmo And as long as your weapon has 0 ammo you give yourself a new weapon and set it's ammo to 0. Probably onClientRender would be needed for this. Edited October 9, 2017 by koragg I love rock/metal/pop but don't mind any other music genre except чалга...that thing sux I also love cars PS I'm friendly
orel56000 Posted October 9, 2017 Author Posted October 9, 2017 6 minutes ago, koragg said: I'm no expert in modes other than race but you could test if holding a weapon with 0 ammo is even possible the following way: Make a function which gives you a weapon and set it's ammo variable to 0 in this function: https://wiki.multitheftauto.com/wiki/GiveWeapon If it doesn't disappear then there is a way to do what you want, otherwise it could be hardcoded to go away when out of ammo. You can also see if it has 0 ammo with this: https://wiki.multitheftauto.com/wiki/GetWeaponAmmo And as long as your weapon has 0 ammo you give yourself a new weapon and set it's ammo to 0. it is not giving when i give a weapon with 0 bullets...
koragg Posted October 10, 2017 Posted October 10, 2017 That's bad I guess you can give a weapon with ammo 1 when ammo reaches 0 and somehow disable firing until ammo goes above 1. I love rock/metal/pop but don't mind any other music genre except чалга...that thing sux I also love cars PS I'm friendly
Zorgman Posted October 11, 2017 Posted October 11, 2017 I disable fire when ammo is 1 and re-enable it when above. You also need a custom hud to hide that one bullet and display it as 0. Dystopia alpha 0.75DOWNLOAD
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