{"action":"created","issue":{"url":"https://api.github.com/repos/Source-Python-Dev-Team/Source.Python/issues/68","labels_url":"https://api.github.com/repos/Source-Python-Dev-Team/Source.Python/issues/68/labels{/name}","comments_url":"https://api.github.com/repos/Source-Python-Dev-Team/Source.Python/issues/68/comments","events_url":"https://api.github.com/repos/Source-Python-Dev-Team/Source.Python/issues/68/events","html_url":"https://github.com/Source-Python-Dev-Team/Source.Python/issues/68","id":102850677,"number":68,"title":"PlayerEntity.run_command & BotCmd bug","user":{"login":"high-voltage","id":10765718,"avatar_url":"https://avatars.githubusercontent.com/u/10765718?v=3","gravatar_id":"","url":"https://api.github.com/users/high-voltage","html_url":"https://github.com/high-voltage","followers_url":"https://api.github.com/users/high-voltage/followers","following_url":"https://api.github.com/users/high-voltage/following{/other_user}","gists_url":"https://api.github.com/users/high-voltage/gists{/gist_id}","starred_url":"https://api.github.com/users/high-voltage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/high-voltage/subscriptions","organizations_url":"https://api.github.com/users/high-voltage/orgs","repos_url":"https://api.github.com/users/high-voltage/repos","events_url":"https://api.github.com/users/high-voltage/events{/privacy}","received_events_url":"https://api.github.com/users/high-voltage/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-24T17:39:15Z","updated_at":"2015-08-24T19:40:12Z","closed_at":null,"body":"I tried hooking run_command in CSGO and came up with an issue.\r\nThe 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.\r\n\r\n```\r\nimport memory\r\n\r\nfrom entities.entity import Entity\r\nfrom entities.hooks import EntityPreHook\r\nfrom entities.hooks import EntityCondition\r\nfrom entities.helpers import index_from_pointer\r\n\r\nfrom players.entity import PlayerEntity\r\n\r\n@EntityPreHook(EntityCondition.is_player, 'run_command')\r\ndef pre_player_run_command(args):\r\n    index = index_from_pointer(args[0])\r\n    cmd = memory.make_object(BotCmd, args[1])\r\n    player = PlayerEntity(index)\r\n    print(cmd.weaponsubtype)\r\n```"},"comment":{"url":"https://api.github.com/repos/Source-Python-Dev-Team/Source.Python/issues/comments/134351215","html_url":"https://github.com/Source-Python-Dev-Team/Source.Python/issues/68#issuecomment-134351215","issue_url":"https://api.github.com/repos/Source-Python-Dev-Team/Source.Python/issues/68","id":134351215,"user":{"login":"Ayuto","id":5445604,"avatar_url":"https://avatars.githubusercontent.com/u/5445604?v=3","gravatar_id":"","url":"https://api.github.com/users/Ayuto","html_url":"https://github.com/Ayuto","followers_url":"https://api.github.com/users/Ayuto/followers","following_url":"https://api.github.com/users/Ayuto/following{/other_user}","gists_url":"https://api.github.com/users/Ayuto/gists{/gist_id}","starred_url":"https://api.github.com/users/Ayuto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ayuto/subscriptions","organizations_url":"https://api.github.com/users/Ayuto/orgs","repos_url":"https://api.github.com/users/Ayuto/repos","events_url":"https://api.github.com/users/Ayuto/events{/privacy}","received_events_url":"https://api.github.com/users/Ayuto/received_events","type":"User","site_admin":false},"created_at":"2015-08-24T19:40:11Z","updated_at":"2015-08-24T19:40:11Z","body":"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.\r\n\r\nI will go ahead and expose CUserCmd as well."}}