Server-Sided Non-Gun Weapon Ammo
#1

Are there any functions like OnPlayerWeaponShot, but for the rest of the weapons that don't shoot? Grenades, teargas, extinguisher, etc.

I have a player timer, but it doesn't loop fast enough. So if a player uses their last grenade, sometimes it's not recognized that they have 0 ammo.

I've also considered using OnPlayerKeyStateChange and seeing if they are pressing KEY_FIRE, but that seems like it wouldn't be 100% accurate.
Reply
#2

Try OnPlayerKeyStateChange+GetPlayerAnimationIndex. Maybe it will work. But probably the animation won't start soon enough for OnPlayerKeyStateChange to read it.
Reply
#3

Quote:
Originally Posted by Unte99
Посмотреть сообщение
Try OnPlayerKeyStateChange+GetPlayerAnimationIndex. Maybe it will work. But probably the animation won't start soon enough for OnPlayerKeyStateChange to read it.
Yeah, Using OnPlayerKeyStateChange is actually more reliable than I thought it would be.
Reply
#4

Quote:
Originally Posted by Aerotactics
Посмотреть сообщение
Yeah, Using OnPlayerKeyStateChange is actually more reliable than I thought it would be.
So how are you doing it?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)