• TTT Keep Ammo?
    3 replies, posted
I'm looking into weapons, bases, etc, and I was wondering if anyone knows the exact function or just in general how TTT stores it's ammo on a certain gun, cause on some custom bases for example, if you pick up ammo, then drop the gun, the ammo is basically removed.
[img]http://puu.sh/aX8B9/1721025504.png[/img] SWEP.Secondary.Ammo SWEP.Primary.Ammo Basically what everyone else uses, mostly.
[QUOTE=Netheous;45722997][img]http://puu.sh/aX8B9/1721025504.png[/img] SWEP.Secondary.Ammo SWEP.Primary.Ammo Basically what everyone else uses, mostly.[/QUOTE] Thanks, but I was talking about after you drop it. Like the gun remembers how much of it's ammo it had inside of it, so when you pick it back up it remains
[QUOTE=Chimpanzee;45723139]Thanks, but I was talking about after you drop it. Like the gun remembers how much of it's ammo it had inside of it, so when you pick it back up it remains[/QUOTE] SWEP.Primary.Ammo is accessible on any weapon using this base by doing Weapon.Primary.Ammo where Weapon is the weapon entity. It's just a variable saved on each swep that uses this base, there is just no call in the functions to set it to 0 when it's dropped so it simply doesn't reset or anything alike.
Sorry, you need to Log In to post a reply to this thread.