Advertisement
KirillMysnik

prop_physics_enforcer

May 6th, 2017
246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.70 KB | None | 0 0
  1. # "Prop_Physics Enforcer" by Kirill (iPlayer) Mysnik
  2. from core import PLATFORM
  3. from memory import Convention, DataType, find_binary
  4. from memory.hooks import PreHook
  5.  
  6.  
  7. if PLATFORM == "windows":
  8.     CREATE_ENTITY_BY_NAME_IDENTIFIER = b"\x55\x8B\xEC\x56\x8B\x75\x0C\x83\xFE\xFF"
  9. else:
  10.     CREATE_ENTITY_BY_NAME_IDENTIFIER = "_Z18CreateEntityByNamePKci"
  11.  
  12. server = find_binary('server')
  13.  
  14. create_entity_by_name = server[CREATE_ENTITY_BY_NAME_IDENTIFIER].make_function(
  15.     Convention.CDECL,
  16.     [DataType.STRING, DataType.INT],
  17.     DataType.POINTER
  18. )
  19.  
  20.  
  21. @PreHook(create_entity_by_name)
  22. def pre_create_entity_by_name(args):
  23.     if args[0] == "prop_physics_multiplayer":
  24.         args[0] = "prop_physics"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement