| haimmaik |
11-02-2005 21:02 |
you can also register a clcmd and bind it into the key u want...
lets say if u want the key "ENTER" to do something then:
Code:
public plugin_init()
{
register_clcmd("action","function")
}
and then make a function that will force the player
to bind ur clcmd when he connects
Code:
public client_connect ( id )
{
client_cmd("bind ENTER action")
}
and then u can do ur function
Code:
public function()
{
.
.
.
.
}
now every time client presses on Enter it will send "action" in his console and it will trigger ur function :)
my way is may binding a key for the client (which can be VERY annoying for him) but it also saves u a prethink function which takes ALOT of memory.. if u do it big.. ull get low FPS when many ppl join the server.
goodluck
|