Here's the offset:
Code: Select all
#CHL2MP_Player::FireBullets(FireBulletsInfo_t const&)
[[fire_bullets]]
offset_linux = 113
offset_windows = 112
arguments = POINTER
return_type = INT
Syntax: Select all
from memory import make_object
from players.entity import Player
from entities.hooks import EntityPreHook, EntityCondition
@EntityPreHook(EntityCondition.is_player, 'fire_bullets')
def fire_bullets_hook(args):
player = make_object(Player, args[0])
# FireBulletsInfo??
info = make_object(????, args[1])
Also, how can I add virtual offsets outside of core data files?
At the moment I'm adding the offsets into the core SP data files (source-python/data/source-python/entities/orangebox/hl2mp in this case), so every time there's an update, I have to add them again.