03.04.2016, 18:07
Thanks!
By the way, something was changed in the PlayerKeyStateChangeEvent? Yesterday it was detecting the keys fine but today it isn't working:
And it prints:
Work
Didn't work
When I press the SPRINT key (I have tested it with other players)
Also it prints something like this
net.gtaun.shoebill.object.impl.PlayerKeyStateImpl@ 17b0699[keys=0,upDown=0,leftRight=0,action=0,crouch=0,fire =0,sprint=0,secondAttack=0,jump=0,lookRight=0,hand break=0,lookLeft=0,subMission=0,lookBehind=0,walk= 0,analogUp=0,analogDown=0,analogLeft=0,analogRight =0]
By the way, something was changed in the PlayerKeyStateChangeEvent? Yesterday it was detecting the keys fine but today it isn't working:
Код:
event.registerHandler(PlayerKeyStateChangeEvent.class, (e) ->{ Player player= e.getPlayer(); if(isSpec(player)){ System.out.println("Work"); if(player.getKeyState().isKeyPressed(PlayerKey.JUMP)){ //do something }else{ System.out.println("Didn't work"); }
Work
Didn't work
When I press the SPRINT key (I have tested it with other players)
Also it prints something like this
net.gtaun.shoebill.object.impl.PlayerKeyStateImpl@ 17b0699[keys=0,upDown=0,leftRight=0,action=0,crouch=0,fire =0,sprint=0,secondAttack=0,jump=0,lookRight=0,hand break=0,lookLeft=0,subMission=0,lookBehind=0,walk= 0,analogUp=0,analogDown=0,analogLeft=0,analogRight =0]