Code: Select all
RuntimeError: Access violation while reading address '8'.
And it doesn't deal damage.
How to fix it?
Syntax: Select all
import memory
from memory import Convention
from memory import DataType
from memory.hooks import PreHook
from weapons.constants import WeaponID
from commands.typed import TypedClientCommand
from players.entity import Player
server = memory.find_binary('server')
fire_bullets = server[b'\x55\x8B\xEC\x81\xEC\x20\x02\x00\x00\x53\x56'].make_function(
Convention.THISCALL,
[DataType.POINTER, DataType.INT, DataType.POINTER, DataType.POINTER, DataType.INT, DataType.INT, DataType.INT, DataType.FLOAT, DataType.FLOAT, DataType.FLOAT],
DataType.VOID)
@TypedClientCommand('fb')
def fb(cmd_info):
player = Player(cmd_info.index)
fire_bullets(player.pointer, player.index, player.eye_location, player.view_angle, WeaponID.GLOCK, 0, 100, 0.01, 0.06, 10.0)