Hi there,
I know you can use the OnTick listener and use playerinfo.get_last_user_command() to get the same sort of information as OnPlayerRunCmd, but these values are of course read only.
I think it may involve some signature scanning, but I am totally new to Source.Python's memory module and trying to implement a solution. Would anyone be able to guide me towards a possible solution for this?
Thanks,
Roflmuffin
Hooking OnPlayerRunCmd
-
- Junior Member
- Posts: 19
- Joined: Fri Nov 06, 2015 11:49 pm
We have PlayerRunCommand already included, so it's extremely easy to hook it.
Syntax: Select all
from entities.hooks import EntityPreHook
from entities.hooks import EntityCondition
@EntityPreHook(EntityCondition.is_player, 'run_command')
def on_pre_player_run_command(args):
print(args)
-
- Junior Member
- Posts: 19
- Joined: Fri Nov 06, 2015 11:49 pm
Looks like the offsets were originally added to our data on August 14:
https://github.com/Source-Python-Dev-Team/Source.Python/commit/77859ac6f696dce71e22f18157b0b5ac2ca88cc8
https://github.com/Source-Python-Dev-Team/Source.Python/commit/77859ac6f696dce71e22f18157b0b5ac2ca88cc8
- L'In20Cible
- Project Leader
- Posts: 1534
- Joined: Sat Jul 14, 2012 9:29 pm
- Location: Québec
Return to “Plugin Development Support”
Who is online
Users browsing this forum: No registered users and 9 guests