When weapon have 0 ammo
#1

Hi,

How always know when weapon reach 0 ammo? i need to write into variable that weapon have 0 ammo.
Reply
#2

I don't understand you quite well.But still, why do you wan't to know if a weapon reached 0 ammo?Whats the purpose?
Reply
#3

To set variable to 0...
Reply
#4

Use the callback OnPlayerWeaponShot.
Reply
#5

Yes, but not all weapons like spraycan, grenade call that.
Reply
#6

Then detect when a player presses LEFT CLICK. Set a timer and when they release it, get the ammo and kill the timer a while after.
Reply
#7

But i just need when reach 0, i update when ammo is smaller, in onplayerupdate, but weapon where ammo fast changes, now always onplayerupdate, can write to variable 0
Reply
#8

You can still achive that, with that method.
Reply
#9

But if weapon change, and player not release key?
Reply
#10

GetPlayerWeaponData or GetPlayerAmmo.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)