mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-01-10 03:08:57 +08:00
fix(TriggerScriptEvent): Function definition was incorrect
This commit is contained in:
parent
1f8b57c290
commit
f711af3803
@ -13,7 +13,7 @@ namespace big::functions
|
|||||||
|
|
||||||
using get_net_game_player = CNetGamePlayer*(Player player);
|
using get_net_game_player = CNetGamePlayer*(Player player);
|
||||||
|
|
||||||
using trigger_script_event = void(int event_group, int* args, int arg_count, int player_bits);
|
using trigger_script_event = void(int event_group, int64_t* args, int arg_count, int player_bits);
|
||||||
|
|
||||||
using increment_stat_event = bool(uint64_t net_event_struct, int64_t sender, int64_t a3);
|
using increment_stat_event = bool(uint64_t net_event_struct, int64_t sender, int64_t a3);
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ namespace big
|
|||||||
{
|
{
|
||||||
if (ImGui::BeginTabItem("Script Events"))
|
if (ImGui::BeginTabItem("Script Events"))
|
||||||
{
|
{
|
||||||
static int* args;
|
static int64_t* args;
|
||||||
static int event_arg_count = 1;
|
static int event_arg_count = 1;
|
||||||
static int previous_arg_count;
|
static int previous_arg_count;
|
||||||
static int event_player_bits;
|
static int event_player_bits;
|
||||||
@ -24,8 +24,8 @@ namespace big
|
|||||||
|
|
||||||
if (event_arg_count != previous_arg_count)
|
if (event_arg_count != previous_arg_count)
|
||||||
{
|
{
|
||||||
int* temp_args = new int[event_arg_count] {0};
|
int64_t* temp_args = new int64_t[event_arg_count] {0};
|
||||||
memcpy(temp_args, args, sizeof(int) * std::min(event_arg_count, previous_arg_count));
|
memcpy(temp_args, args, sizeof(int64_t) * std::min(event_arg_count, previous_arg_count));
|
||||||
|
|
||||||
delete[] args;
|
delete[] args;
|
||||||
args = temp_args;
|
args = temp_args;
|
||||||
@ -42,7 +42,7 @@ namespace big
|
|||||||
|
|
||||||
char input_arg_name[20];
|
char input_arg_name[20];
|
||||||
sprintf(input_arg_name, "###input_dynamic_arg_%d", i);
|
sprintf(input_arg_name, "###input_dynamic_arg_%d", i);
|
||||||
ImGui::InputInt(input_arg_name, &args[i]);
|
ImGui::InputScalar(input_arg_name, ImGuiDataType_S64, &args[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
|
@ -30,7 +30,7 @@ namespace big::toxic
|
|||||||
inline void bounty_player(Player target, int amount)
|
inline void bounty_player(Player target, int amount)
|
||||||
{
|
{
|
||||||
const size_t arg_count = 22;
|
const size_t arg_count = 22;
|
||||||
int args[arg_count] = {
|
int64_t args[arg_count] = {
|
||||||
(int)eRemoteEvent::Bounty,
|
(int)eRemoteEvent::Bounty,
|
||||||
0, // doesn't matter of we set this to something else, the TRIGGER_SCRIPT_EVENT routine will set it to our player id anyways
|
0, // doesn't matter of we set this to something else, the TRIGGER_SCRIPT_EVENT routine will set it to our player id anyways
|
||||||
target,
|
target,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user