WEAPONSTATE_NO_BULLETS not work
#1

so i make if bullets goes empty the variable changes but it take my weapon when i get into my hands any clue whats wrong?
http://pastebin.com/tH4xaZXJ
Reply
#2

Ehm, weapons dissapear automaticly when they are empty (except when in vehicle)
Reply
#3

Quote:
Originally Posted by alpha500delta
Посмотреть сообщение
Ehm, weapons dissapear automaticly when they are empty (except when in vehicle)
Wrong.
Reply
#4

Yeah they not dissapear, you just cant use them anymore
I dont know much about the function GetPlayerWeaponState but it looks like that it gets the state of your weapon holding and if you shot your last bullet you auto switch to another weapon and so you cant rly obtain this state

But actually why do you need that ?
Just update the ammo if they switch weapon which happens if you reach 0 ammo
Reply
#5

Код:
1 - WEAPONSTATE_LAST_BULLET
facepalm.
Reply
#6

Quote:
Originally Posted by GaGlets®
Посмотреть сообщение
Код:
1 - WEAPONSTATE_LAST_BULLET
facepalm.
Its more or less the same, how often does your weapon has the LAST bullet ?

And how long if you use it ? Maybe a 1/4 sec :/

You will only get the sate if you are lucky and stop shooting with that last bullet
Or you call it permanently in OnPlayerUpdate
Reply
#7

script will check it anyway, test it with `print` At onplayerupdate, onplayerkeystatechange etc. Of course it may not check for it if you use quite slow timer.
Reply
#8

Yeah I know that it will but you need to get it with the function

And OnPlayerKeyStateChange only gets called if you change the key and that doesnt happen if you press the keys permanent (if you shoot)

And I try to avoid using OnPlayerUpdate for anything what isnt necessary
Reply
#9

any idea how it make works correctly
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)