You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried hooking run_command in CSGO and came up with an issue.
The attributes in BotCmd are not working or are mixed. What should be BotCmd.buttons is actually BotCmd.weaponsubtype. The most attributes are not giving correct values.
import memory
from entities.hooks import EntityPreHook
from entities.hooks import EntityCondition
from entities.helpers import index_from_pointer
from players.bots import BotCmd
from players.entity import PlayerEntity
@EntityPreHook(EntityCondition.is_player, 'run_command')
def pre_player_run_command(args):
index = index_from_pointer(args[0])
cmd = memory.make_object(BotCmd, args[1])
player = PlayerEntity(index)
print(cmd.weaponsubtype)
The text was updated successfully, but these errors were encountered:
CCSPlayer::RunCommand takes a CUserCmd argument and not a CBotCmd argument. In CS:S (or Orangebox in general) CBotCmd and CUserCmd are identical in their structure. However, in CS:GO they aren't. That's why you are getting this weird behaviour.
I tried hooking run_command in CSGO and came up with an issue.
The attributes in BotCmd are not working or are mixed. What should be BotCmd.buttons is actually BotCmd.weaponsubtype. The most attributes are not giving correct values.
The text was updated successfully, but these errors were encountered: