2021-10-15 11:30:37 +02:00
|
|
|
#pragma once
|
2022-01-04 23:10:27 +01:00
|
|
|
#include "gta/enums.hpp"
|
2021-10-15 11:30:37 +02:00
|
|
|
#include "natives.hpp"
|
|
|
|
#include "script_global.hpp"
|
|
|
|
#include "system.hpp"
|
|
|
|
|
|
|
|
namespace big::toxic
|
|
|
|
{
|
|
|
|
inline void blame_explode_coord(Player to_blame, Vector3 pos, eExplosionType explosion_type, float damage, bool is_audible, bool is_invisible, float camera_shake)
|
|
|
|
{
|
|
|
|
system::patch_blame(true);
|
|
|
|
FIRE::ADD_OWNED_EXPLOSION(
|
|
|
|
PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(to_blame),
|
|
|
|
pos.x, pos.y, pos.z,
|
|
|
|
(int)explosion_type,
|
|
|
|
damage,
|
|
|
|
is_audible,
|
|
|
|
is_invisible,
|
|
|
|
camera_shake
|
|
|
|
);
|
|
|
|
system::patch_blame(false);
|
|
|
|
}
|
|
|
|
|
|
|
|
inline void blame_explode_player(Player to_blame, Player target, eExplosionType explosion_type, float damage, bool is_audible, bool is_invisible, float camera_shake)
|
|
|
|
{
|
|
|
|
Vector3 coords = ENTITY::GET_ENTITY_COORDS(PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(target), true);
|
|
|
|
blame_explode_coord(to_blame, coords, explosion_type, damage, is_audible, is_invisible, camera_shake);
|
|
|
|
}
|
|
|
|
|
2022-01-04 22:33:56 +01:00
|
|
|
inline void bounty_player(Player target, int amount)
|
2021-10-15 11:30:37 +02:00
|
|
|
{
|
|
|
|
const size_t arg_count = 22;
|
2022-02-04 18:40:21 +01:00
|
|
|
int64_t args[arg_count] = {
|
2021-12-22 16:04:52 +01:00
|
|
|
(int)eRemoteEvent::Bounty,
|
2022-01-04 22:33:56 +01:00
|
|
|
0, // doesn't matter of we set this to something else, the TRIGGER_SCRIPT_EVENT routine will set it to our player id anyways
|
2021-12-22 16:04:52 +01:00
|
|
|
target,
|
2022-01-04 22:33:56 +01:00
|
|
|
0, // set by player or NPC?
|
2022-02-04 18:36:15 +01:00
|
|
|
amount,
|
2021-12-22 16:04:52 +01:00
|
|
|
0, 1, 0, 0, 0, 0, 0, 0,
|
|
|
|
0, 0, 0, 0, 0, 0, 0,
|
2022-01-04 22:33:56 +01:00
|
|
|
*script_global(1921036).at(9).as<int*>(),
|
|
|
|
*script_global(1921036).at(10).as<int*>()
|
2021-10-15 11:30:37 +02:00
|
|
|
};
|
|
|
|
|
2021-12-22 16:04:52 +01:00
|
|
|
g_pointers->m_trigger_script_event(1, args, arg_count, -1);
|
2021-10-15 11:30:37 +02:00
|
|
|
}
|
|
|
|
}
|