Description
Just a quick addon which simulates the est_client_keypress event using nativetools instead of est
To use it just simple load it on your server and then you can use nt_client_keypress as an event in your shell or python script
example:
[syntax="es"]
event nt_client_keypress
{
if event_var(keyname) == "attack"
{
if event_var(status) == "1"
{
// they pressed attack so slay them ?!?!?
es_sexec event_var(userid) kill
}
}
}
[/syntax]
or python:
[syntax="python"]
import es
def nt_client_keypress(event_var):
keyname = event_var['keyname']
status = int(event_var['status'])
uid = int(event_var['userid'])
if keyname == "attack" and status == 1:
es.server.queuecmd("es_sexec %s kill" % uid)
[/syntax]