Endurance Onslaught 6.0
Original Post
[LUA] How to "Press something for something"
Like the title.

How to make something like: Press "F" (for example) for echo("test") [for example] ?
lua code:
key_to_press = string.byte("f")

function echoKeypress(key_pressed)
if key_pressed == key_to_press then
echo("test")
--if you're using F, you might want to type "return 1" here to stop it from opening the replay saving menu
end
end

add_hook("key_down", "y_example", echoKeypress)


Shortened:

lua code:
add_hook("key_down","",function(k) if k==102 then echo("test")end end)
Last edited by Yoyo; May 14, 2013 at 04:13 AM.
multiple texture uploader! updated: multiple texture remover!
updated pretty colorlist!

<BobJoelZ> ok ive just rebooted my pc and ive tried to activate my reflex on yahoo internet explorer :/ no luck

<Aracoon> I do not enjoy having anal sex with multiple men