Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2020
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.77 KB | None | 0 0
  1.  /* ------------------ C_game Hooks ------------------ */
  2.     MafiaSDK::C_game_Hooks::Hook_Init([&](MafiaSDK::C_game* game) {
  3.         printf("Game init\n");
  4.     });
  5.  
  6.     MafiaSDK::C_game_Hooks::Hook_Tick([&](MafiaSDK::C_game* game, float dt) {
  7.         printf("Game tick: %f\n", dt);
  8.     });
  9.  
  10.     MafiaSDK::C_game_Hooks::Hook_Done([&](MafiaSDK::C_game* game) {
  11.         printf("Game done\n");
  12.     });
  13.  
  14.     /* ------------------ C_human Hooks ------------------ */
  15.     MafiaSDK::C_human_Hooks::Hook_Do_Reload([](MafiaSDK::C_human* human) {
  16.         printf("Human: [0x%X] reloaded weapon !\n", (DWORD)human);
  17.     });
  18.  
  19.     MafiaSDK::C_human_Hooks::Hook_Do_Holster([](MafiaSDK::C_human* human) {
  20.         printf("Human: [0x%X] holstered weapon !\n", (DWORD)human);
  21.     });
  22.  
  23.     MafiaSDK::C_human_Hooks::Hook_Do_Shoot([](MafiaSDK::C_human* human, BOOL shooting, S_vector* screenSpace) {
  24.         if(screenSpace != nullptr)
  25.             printf("Human: [0x%X] shooting %d, %X !\n", (DWORD)human, shooting, (DWORD)screenSpace);
  26.     });
  27.  
  28.     MafiaSDK::C_human_Hooks::Hook_Do_ThrowGrenade([](MafiaSDK::C_human* human, S_vector pos) {
  29.         printf("Human: [0x%X] throw grenade at: %f %f %f\n", (DWORD)human, pos.x, pos.y, pos.z);
  30.     });
  31.  
  32.     MafiaSDK::C_human_Hooks::Hook_Hit([](MafiaSDK::C_human* human, int hitType, const S_vector& unk1, const S_vector& unk2, const S_vector& unk3, float damage, MafiaSDK::C_actor* atacker, DWORD hittedPart, MafiaSDK::I3D_frame* targetFrame) -> int {
  33.         printf("Human: [0x%X] got hit by %X, ang got %f damage!\n", (DWORD)human, (DWORD)atacker, damage);
  34.         return 0;
  35.     });
  36.  
  37.     MafiaSDK::C_human_Hooks::Hook_Use_Actor([](MafiaSDK::C_human* human, MafiaSDK::C_actor* actor, int arg1, int arg2, int arg3) {
  38.         printf("Human: [0x%X] used actor: %X (%d, %d, %d)\n", (DWORD)human, (DWORD)actor, arg1, arg2, arg3);
  39.     });
  40.  
  41.     MafiaSDK::C_human_Hooks::Hook_Do_ThrowCocotFromCar([](MafiaSDK::C_human* human, MafiaSDK::C_car* car, int seatId) {
  42.         printf("Human: [0x%X] is throwing fagot from %X at seat %d\n", (DWORD)human, (DWORD)car, seatId);
  43.     });
  44.  
  45.     MafiaSDK::C_human_Hooks::Hook_SetPoseNormal([](MafiaSDK::C_human* human, S_vector pose) {
  46.         auto localPlayer = MafiaSDK::GetMission()->GetGame()->GetLocalPlayer();
  47.         if (localPlayer == human)
  48.         {
  49.             printf("Your pose is: %f %f %f\n", pose.x, pose.y, pose.z);
  50.         }
  51.     });
  52.  
  53.     MafiaSDK::C_human_Hooks::Hook_SetPoseAimed([](MafiaSDK::C_human* human, S_vector pose) {
  54.         auto localPlayer = MafiaSDK::GetMission()->GetGame()->GetLocalPlayer();
  55.         if (localPlayer == human)
  56.         {
  57.             printf("Your aim pose is: %f %f %f\n", pose.x, pose.y, pose.z);
  58.         }
  59.     });
  60.  
  61.     /* ------------------ C_human Hooks ------------------ */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement