Page 1 of 1

GetPlayerInput trouble

Posted: Tue Mar 12, 2013 1:28 am
by Thomas
For some special action in my mod I use GetPlayerInput, I want to keep track of the movement keys being pressed (bt_forward, bt_back, bt_moveleft, bt_moveright). And while this works fine offline, GetPlayerInput seems to return 0 online whenever I press one of those keys. Any idea what's causing this? Am I doing something wrong or is this a bug?

I'm using:

Code: Select all

GetPlayerInput (PlayerNumber(), INPUT_BUTTONS);

RE: GetPlayerInput trouble

Posted: Tue Mar 12, 2013 1:43 am
by Theshooter7
Make sure the compat flag "Send Full Button Info" is enabled. Otherwise GetPlayerInput() doesn't work at all online without it.

RE: GetPlayerInput trouble

Posted: Tue Mar 12, 2013 2:30 am
by Thomas
Ah, well that's probably it. Well it does work when I press jump/crouch buttons. Anyway, thanks!

RE: GetPlayerInput trouble

Posted: Tue Mar 12, 2013 2:35 am
by Ijon Tichy
also you can use -1 instead of PlayerNumber()