View Single Post
Old 01-07-2009   #2
rappo
Professional Dumbass
 
rappo's Avatar
 
Join Date: Aug 2003
Location: Los Angeles
Posts: 6,908
rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.
hey, don't worry about it - it's not ignorance, everybody's gotta learn somehow! I'll use the saveme.lua script as an example.. at the bottom of the file you'll see this line twice:
Code:
if (IsKeyPressed(9) == 1) then
this means "if the key pressed is TAB, then..." so basically 9 is the code for TAB. this value is called an ASCII decimal character code. each key on the keyboard has one. here's a huge table of ascii codes... the value you put in the LUA script is the one in the DEC column:





furthermore you can make the LUA code run on two keypresses by doing something like:
Code:
if(IsKeyPressed(9) == 1 && IsKeyPressed(32) == 1) then
in that example the code checks to see if both TAB and SPACE are being pressed
__________________
rappo is offline   Reply With Quote