View Single Post
  #3  
Old 08-08-2011, 09:50 AM
Emera Emera is offline
Delterian Hybrid
Emera's Avatar
Join Date: Mar 2011
Location: Newcastle Upon-Tyne
Posts: 1,704
Emera is a jewel in the roughEmera is a jewel in the rough
Quote:
Originally Posted by cbk1994 View Post
You should use

PHP Code:
function onKeyPressed(temp.codetemp.keytemp.scan) {
  if (
keydown(1)) {
    
player.chat "Left!";
  } else if (
keydown(3)) {
    
player.chat "Right!";
  }

It's possible to check the key's code instead, but using keydown allows you to use the player's defined arrow keys.

There's a list of key numbers for keydown here.
I know this won't help you any more than what cbk told you, but I use this for all of my keycode needs. It is a simple way of finding out key codes by just inserting the desired key into a text box. Obviously you are talking about keydown not keydown2 but still, it might be useful.
__________________
Reply With Quote