CS2D
Scripts bind error bind error
5 replies so I was trying to solve the problem with key pressing , because, as I understood there are no such hooks as "key", "keypress" and so on. an I found a solution - binds.
bind some key to say !12121 and then addhook say - if text=="!12121" then.....
but I found a strange problem .
look, I have a simple script:
addhook("join","bb")
function bb(id)
parse ('bind "h" "sayteam !lol"')
end
and the problem is that only server says !lol after pressing "h". all other players ignore the bind. can anybody tell where the problem is? I don't think binds can be executed with lua DC Admin Offline
Lua scripts are executed on the server only which automatically means that the binds are executed for the server only. You can't remotely change the binds of clients (or execute other CS2D - non Lua - coammands remotely at clients). This is a security measurement because otherwise the server would be able to f*ck the whole controls of the client up which would be a pretty stupid thing.
Your idea works but the clients have to do the binding themselves. Manually. and what about aliases ? bind in alias and working with aliases in lua script DC Admin Offline
Same thing. Makes no difference.