Jump to content

setWeaponAmmo maybe bug ?


DarkLink

Recommended Posts

Hi there! I notice that if I dont have any ammo, and leave the four argument without anything like this :

setWeaponAmmo(v, hasWeapon, amountToGive)

Then I get the ammo, but I keep with 0 on clip, and it doesnt reload ! cant even shoot ... I guess I will need the four argument ? :S

Thanks in advance!

Link to comment

If you leave the 4th argument off or set it to 0 (this is what you do) then the ammo will stay the same. If you had 0 in the clip before using this function then you will be left with 0. Doesn't it make sense? I haven't tested this idea but if you want to reload then you'll have to swap weapons and then change back to this weapon or try giveWeapon with ammo 0 and setDefault to true.

Link to comment
If you leave the 4th argument off or set it to 0 (this is what you do) then the ammo will stay the same. If you had 0 in the clip before using this function then you will be left with 0. Doesn't it make sense? I haven't tested this idea but if you want to reload then you'll have to swap weapons and then change back to this weapon or try giveWeapon with ammo 0 and setDefault to true.

Hi fifty, thanks again for passing by and try to help me ;)

So here it is: I tryed using the zero on 4th argument, so will have 0 on clip.. till here its fine ! and it works !

But then I tryed to reloading, changing weapons like u said.. and still zero on clip ! cant even shoot, tryed to look for a key to reload on MTA and didnt found one..

Then I tryed to use a number like 1 or 2, sometimes works good, another times, there is that number of ammo on clip, but I try to shoot, and nothing happens !! Like I would have zero of ammo on clip !

Then I also tryed to fill the clip using the maximum that some weapon's clip can take using this on the 4th argument:

getOriginalWeaponProperty ( hasWeapon, "std", "maximum_clip_ammo")

And still I get some bugs, like, there is no zero on clip and cant shoot.. and dont even reloading... and also found a bug, where there was NEGATIVE ammo !

Can u give me some feedback on this? maybe bug or not?

Also some fix if possible... Well the fix would be taking out the weapon and giving again with the ammo I want right...? kinda ridiculous xD

Thanks !!

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...