fix(TriggerScriptEvent): Function definition was incorrect

This commit is contained in:
Yimura 2022-02-04 18:40:21 +01:00
parent 1f8b57c290
commit f711af3803
3 changed files with 6 additions and 6 deletions

View File

@ -13,7 +13,7 @@ namespace big::functions
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);

View File

@ -9,7 +9,7 @@ namespace big
{
if (ImGui::BeginTabItem("Script Events"))
{
static int* args;
static int64_t* args;
static int event_arg_count = 1;
static int previous_arg_count;
static int event_player_bits;
@ -24,8 +24,8 @@ namespace big
if (event_arg_count != previous_arg_count)
{
int* temp_args = new int[event_arg_count] {0};
memcpy(temp_args, args, sizeof(int) * std::min(event_arg_count, previous_arg_count));
int64_t* temp_args = new int64_t[event_arg_count] {0};
memcpy(temp_args, args, sizeof(int64_t) * std::min(event_arg_count, previous_arg_count));
delete[] args;
args = temp_args;
@ -42,7 +42,7 @@ namespace big
char input_arg_name[20];
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();

View File

@ -30,7 +30,7 @@ namespace big::toxic
inline void bounty_player(Player target, int amount)
{
const size_t arg_count = 22;
int args[arg_count] = {
int64_t args[arg_count] = {
(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
target,