First thing I tried.
[QUOTE]You can not use this hook to detect KEY_ keys. This is strictly for IN_ keys.[/QUOTE]
The only way to do this is to get the client to send the key press event. This is unreliable because the client can send false positives.
What do you need this for?
[QUOTE=Nevec;29549323]The only way to do this is to get the client to send the key press event. This is unreliable because the client can send false positives.
What do you need this for?[/QUOTE]
To set to which seat a player should change to.
Then it's ok.
[lua]
hook.Add("Think", "keycheck", function()
if( input.IsKeyDown( KEY_0 ) ) then
//do shit
elseif( input.IsKeyDown( KEY_1 ) ) then
[/lua]
obviously a better way to do this, maybe make a multidimensional table (keys = {} keys[1] = {0, function} ) then loop through the table and call v[2]?
[editline]1st May 2011[/editline]
Sorry if my post seems dumb, i was having trouble trying to explain what I meant.
[editline]1st May 2011[/editline]
also i didnt read, input is client side D:
Sorry, you need to Log In to post a reply to this thread.