Quote:
|
Originally Posted by Stefan
Also the keypressed is correctly passing the code parameter (+512 if control key is pressed while pressing another key).
|
Are you sure? I still can't seem to get it to work for letter keys. It works fine for numbers and arrows (returns 512 + keycode), but when I hold CTRL + a letter, it only returns 162 (and no other keycode). Here is the script I am using to test (ctest2 on N-Pulse):
NPC Code:
//#CLIENTSIDE
if (keypressed) {
if (strequals(#p(0),#v(512+keycode(s))))
setplayerprop #c,#p(0) - #p(1);
else
setplayerprop #c,Pressing #p(0) (#p(1)) instead of ctrl+s;
}