PDA

View Full Version : Find when a player uses a client-side command?


MPQC
01-14-2012, 11:15
For example, finding when a player jumps, or changes a cl_ variable.

Impact123
01-14-2012, 15:58
For the first read here (http://forums.alliedmods.net/showthread.php?t=94187) #5, for the second one read here (http://wiki.alliedmods.net/Commands_%28SourceMod_Scripting%29#Client-Only_Commands).

Yours sincerely
Impact

McFlurry
01-14-2012, 16:02
Yak's method is outdated now isn't it? Why not use OnPlayerRunCmd?

Impact123
01-14-2012, 16:06
Why not use OnPlayerRunCmd?
This function is showed on #5?

Yours sincerely
Impact

McFlurry
01-14-2012, 16:18
Oops, missed that. :grrr: I wish that the old method wasn't shown anymore in that post.
@MPQC Make sure you use OnPlayerRunCmd instead of the old OnGameFrame hook method.

MPQC
01-14-2012, 16:28
Thanks very much. :)

Would it be possible to find out what keys they have bound?

McFlurry
01-14-2012, 16:45
No, you can only detect the command they send, the bound key is strictly client-side.