diff --git a/src/backend/commands/player/kick/end_session_kick.cpp b/src/backend/commands/player/kick/end_session_kick.cpp index bd401c25..de269eff 100644 --- a/src/backend/commands/player/kick/end_session_kick.cpp +++ b/src/backend/commands/player/kick/end_session_kick.cpp @@ -21,7 +21,7 @@ namespace big return; if (!scripts::force_host("freemode"_J)) { - g_notification_service->push_error("END_KICK"_T.data(), "BACKEND_END_SESSION_KICK_FORCE_SCRIPT_HOST_FAILED"_T.data()); + g_notification_service.push_error("END_KICK"_T.data(), "BACKEND_END_SESSION_KICK_FORCE_SCRIPT_HOST_FAILED"_T.data()); return; } diff --git a/src/backend/commands/player/kick/host_kick.cpp b/src/backend/commands/player/kick/host_kick.cpp index 9330ef4d..281aecdd 100644 --- a/src/backend/commands/player/kick/host_kick.cpp +++ b/src/backend/commands/player/kick/host_kick.cpp @@ -18,7 +18,7 @@ namespace big return; if (!g_player_service->get_self()->is_host()) { - g_notification_service->push_error("HOST_KICK"_T.data(), "BACKEND_HOST_KICK_FAILED"_T.data()); + g_notification_service.push_error("HOST_KICK"_T.data(), "BACKEND_HOST_KICK_FAILED"_T.data()); return; } @@ -27,4 +27,4 @@ namespace big }; host_kick g_host_kick("hostkick", "HOST_KICK", "HOST_KICK_DESC", 0, false); -} \ No newline at end of file +} diff --git a/src/backend/commands/player/kick/script_host_kick.cpp b/src/backend/commands/player/kick/script_host_kick.cpp index d66330e5..b6dbc96f 100644 --- a/src/backend/commands/player/kick/script_host_kick.cpp +++ b/src/backend/commands/player/kick/script_host_kick.cpp @@ -21,7 +21,7 @@ namespace big return; if (!scripts::force_host("freemode"_J)) { - g_notification_service->push_error("Kick", "Force script host failed!"); + g_notification_service.push_error("Kick", "Force script host failed!"); return; } diff --git a/src/backend/commands/player/toxic/turn_into_beast.cpp b/src/backend/commands/player/toxic/turn_into_beast.cpp index 1aa70b27..31bfcb7d 100644 --- a/src/backend/commands/player/toxic/turn_into_beast.cpp +++ b/src/backend/commands/player/toxic/turn_into_beast.cpp @@ -23,11 +23,11 @@ namespace big { if (!NETWORK::NETWORK_IS_PLAYER_A_PARTICIPANT_ON_SCRIPT(id, "am_launcher", -1)) { - g_notification_service->push_error("TURN_INTO_BEAST"_T.data(), "BACKEND_TURN_INTO_BEAST_CANNOT_START_AM_LAUNCHER"_T.data()); + g_notification_service.push_error("TURN_INTO_BEAST"_T.data(), "BACKEND_TURN_INTO_BEAST_CANNOT_START_AM_LAUNCHER"_T.data()); return; } - g_notification_service->push("TURN_INTO_BEAST"_T.data(), "BACKEND_TURN_INTO_BEAST_STARTING"_T.data()); + g_notification_service.push("TURN_INTO_BEAST"_T.data(), "BACKEND_TURN_INTO_BEAST_STARTING"_T.data()); scripts::start_launcher_script(47); @@ -35,7 +35,7 @@ namespace big { if (i >= 1000) { - g_notification_service->push_error("TURN_INTO_BEAST"_T.data(), "BACKEND_TURN_INTO_BEAST_FAILED"_T.data()); + g_notification_service.push_error("TURN_INTO_BEAST"_T.data(), "BACKEND_TURN_INTO_BEAST_FAILED"_T.data()); return; } @@ -48,7 +48,7 @@ namespace big if (!scripts::force_host("am_hunt_the_beast"_J)) { - g_notification_service->push_error("TURN_INTO_BEAST"_T.data(), "BACKEND_TURN_INTO_BEAST_FAILED_CONTROL"_T.data()); + g_notification_service.push_error("TURN_INTO_BEAST"_T.data(), "BACKEND_TURN_INTO_BEAST_FAILED_CONTROL"_T.data()); return; } @@ -89,7 +89,7 @@ namespace big { if (i >= 7000) { - g_notification_service->push_error("TURN_INTO_BEAST"_T.data(), "BACKEND_TURN_INTO_BEAST_FAILED"_T.data()); + g_notification_service.push_error("TURN_INTO_BEAST"_T.data(), "BACKEND_TURN_INTO_BEAST_FAILED"_T.data()); return; } @@ -100,7 +100,7 @@ namespace big if (!scripts::force_host("am_hunt_the_beast"_J)) { - g_notification_service->push_error("TURN_INTO_BEAST"_T.data(), "BACKEND_TURN_INTO_BEAST_FAILED_CONTROL"_T.data()); + g_notification_service.push_error("TURN_INTO_BEAST"_T.data(), "BACKEND_TURN_INTO_BEAST_FAILED_CONTROL"_T.data()); return; } diff --git a/src/backend/commands/player/vehicle/boost_vehicle.cpp b/src/backend/commands/player/vehicle/boost_vehicle.cpp index 9a6b0f43..685a669e 100644 --- a/src/backend/commands/player/vehicle/boost_vehicle.cpp +++ b/src/backend/commands/player/vehicle/boost_vehicle.cpp @@ -14,7 +14,7 @@ namespace big Ped ped = PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(player->id()); if (!PED::IS_PED_IN_ANY_VEHICLE(ped, true)) { - g_notification_service->push_warning("TOXIC"_T.data(), "ERROR_PLAYER_IS_NOT_IN_VEHICLE"_T.data()); + g_notification_service.push_warning("TOXIC"_T.data(), "ERROR_PLAYER_IS_NOT_IN_VEHICLE"_T.data()); } else { @@ -26,11 +26,11 @@ namespace big } else { - g_notification_service->push_warning("TOXIC"_T.data(), "ERROR_FAILED_TO_TAKE_CONTROL"_T.data()); + g_notification_service.push_warning("TOXIC"_T.data(), "ERROR_FAILED_TO_TAKE_CONTROL"_T.data()); } } } }; boost_vehicle g_boost_vehicle("boostveh", "BACKEND_BOOST_VEHICLE", "BACKEND_BOOST_VEHICLE_DESC", 0); -} \ No newline at end of file +} diff --git a/src/backend/commands/player/vehicle/burst_tyres.cpp b/src/backend/commands/player/vehicle/burst_tyres.cpp index 338f6866..828af186 100644 --- a/src/backend/commands/player/vehicle/burst_tyres.cpp +++ b/src/backend/commands/player/vehicle/burst_tyres.cpp @@ -15,7 +15,7 @@ namespace big if (!PED::IS_PED_IN_ANY_VEHICLE(ped, true)) { - g_notification_service->push_warning("TOXIC"_T.data(), "ERROR_PLAYER_IS_NOT_IN_VEHICLE"_T.data()); + g_notification_service.push_warning("TOXIC"_T.data(), "ERROR_PLAYER_IS_NOT_IN_VEHICLE"_T.data()); } else { diff --git a/src/backend/commands/player/vehicle/close_doors.cpp b/src/backend/commands/player/vehicle/close_doors.cpp index 0cdb2330..a793dfa9 100644 --- a/src/backend/commands/player/vehicle/close_doors.cpp +++ b/src/backend/commands/player/vehicle/close_doors.cpp @@ -14,7 +14,7 @@ namespace big if (!PED::IS_PED_IN_ANY_VEHICLE(ped, true)) { - g_notification_service->push_warning("TOXIC"_T.data(), "ERROR_PLAYER_IS_NOT_IN_VEHICLE"_T.data()); + g_notification_service.push_warning("TOXIC"_T.data(), "ERROR_PLAYER_IS_NOT_IN_VEHICLE"_T.data()); } else { @@ -26,11 +26,11 @@ namespace big } else { - g_notification_service->push_warning("TOXIC"_T.data(), "ERROR_FAILED_TO_TAKE_CONTROL"_T.data()); + g_notification_service.push_warning("TOXIC"_T.data(), "ERROR_FAILED_TO_TAKE_CONTROL"_T.data()); } } } }; close_doors g_close_doors("closedoors", "BACKEND_CLOSE_VEHICLE_DOORS", "BACKEND_CLOSE_VEHICLE_DOORS_DESC", 0); -} \ No newline at end of file +} diff --git a/src/backend/commands/player/vehicle/downgrade_vehicle.cpp b/src/backend/commands/player/vehicle/downgrade_vehicle.cpp index d3428636..34711f84 100644 --- a/src/backend/commands/player/vehicle/downgrade_vehicle.cpp +++ b/src/backend/commands/player/vehicle/downgrade_vehicle.cpp @@ -16,7 +16,7 @@ namespace big if (!PED::IS_PED_IN_ANY_VEHICLE(ped, true)) { - g_notification_service->push_warning("TOXIC"_T.data(), "ERROR_PLAYER_IS_NOT_IN_VEHICLE"_T.data()); + g_notification_service.push_warning("TOXIC"_T.data(), "ERROR_PLAYER_IS_NOT_IN_VEHICLE"_T.data()); } else { @@ -34,4 +34,4 @@ namespace big }; downgrade_vehicle g_downgrade_vehicle("downgradeveh", "BACKEND_DOWNGRADE_VEHICLE", "BACKEND_DOWNGRADE_VEHICLE_DESC", 0); -} \ No newline at end of file +} diff --git a/src/backend/commands/player/vehicle/flip_180.cpp b/src/backend/commands/player/vehicle/flip_180.cpp index e7cb7153..73002ed2 100644 --- a/src/backend/commands/player/vehicle/flip_180.cpp +++ b/src/backend/commands/player/vehicle/flip_180.cpp @@ -18,7 +18,7 @@ namespace big if (!PED::IS_PED_IN_ANY_VEHICLE(player_ped, true)) { - g_notification_service->push_warning("TOXIC"_T.data(), "ERROR_PLAYER_IS_NOT_IN_VEHICLE"_T.data()); + g_notification_service.push_warning("TOXIC"_T.data(), "ERROR_PLAYER_IS_NOT_IN_VEHICLE"_T.data()); } else { @@ -41,4 +41,4 @@ namespace big }; flip_180 g_flip_180("flip180", "BACKEND_FLIP", "BACKEND_FLIP_DESC", 0); -} \ No newline at end of file +} diff --git a/src/backend/commands/player/vehicle/flying_vehicle.cpp b/src/backend/commands/player/vehicle/flying_vehicle.cpp index ccb27b49..3e4d0c97 100644 --- a/src/backend/commands/player/vehicle/flying_vehicle.cpp +++ b/src/backend/commands/player/vehicle/flying_vehicle.cpp @@ -15,7 +15,7 @@ namespace big if (!PED::IS_PED_IN_ANY_VEHICLE(ent, true)) { - g_notification_service->push_warning("TOXIC"_T.data(), "ERROR_PLAYER_IS_NOT_IN_VEHICLE"_T.data()); + g_notification_service.push_warning("TOXIC"_T.data(), "ERROR_PLAYER_IS_NOT_IN_VEHICLE"_T.data()); } else { @@ -30,4 +30,4 @@ namespace big }; flying_vehicle g_flying_vehicle("flyingveh", "BACKEND_FLYING_VEHICLE", "BACKEND_FLYING_VEHICLE_DESC", 0); -} \ No newline at end of file +} diff --git a/src/backend/commands/player/vehicle/kill_engine.cpp b/src/backend/commands/player/vehicle/kill_engine.cpp index 83ef224c..97d6b18b 100644 --- a/src/backend/commands/player/vehicle/kill_engine.cpp +++ b/src/backend/commands/player/vehicle/kill_engine.cpp @@ -13,7 +13,7 @@ namespace big Ped ped = PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(player->id()); if (!PED::IS_PED_IN_ANY_VEHICLE(ped, true)) { - g_notification_service->push_warning("TOXIC"_T.data(), "ERROR_PLAYER_IS_NOT_IN_VEHICLE"_T.data()); + g_notification_service.push_warning("TOXIC"_T.data(), "ERROR_PLAYER_IS_NOT_IN_VEHICLE"_T.data()); } else { @@ -25,11 +25,11 @@ namespace big } else { - g_notification_service->push_warning("TOXIC"_T.data(), "ERROR_FAILED_TO_TAKE_CONTROL"_T.data()); + g_notification_service.push_warning("TOXIC"_T.data(), "ERROR_FAILED_TO_TAKE_CONTROL"_T.data()); } } } }; kill_engine g_kill_engine("killengine", "BACKEND_KILL_VEHICLE_ENGINE", "BACKEND_KILL_VEHICLE_ENGINE_DESC", 0); -} \ No newline at end of file +} diff --git a/src/backend/commands/player/vehicle/lock_doors.cpp b/src/backend/commands/player/vehicle/lock_doors.cpp index 6d20ae6f..2962281e 100644 --- a/src/backend/commands/player/vehicle/lock_doors.cpp +++ b/src/backend/commands/player/vehicle/lock_doors.cpp @@ -14,7 +14,7 @@ namespace big Ped ped = PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(player->id()); if (!PED::IS_PED_IN_ANY_VEHICLE(ped, true)) { - g_notification_service->push_warning("TOXIC"_T.data(), "ERROR_PLAYER_IS_NOT_IN_VEHICLE"_T.data()); + g_notification_service.push_warning("TOXIC"_T.data(), "ERROR_PLAYER_IS_NOT_IN_VEHICLE"_T.data()); } else { @@ -27,4 +27,4 @@ namespace big }; lock_vehicle g_lock_vehicle("lockveh", "BACKEND_LOCK_VEHICLE", "BACKEND_LOCK_VEHICLE_DESC", 0); -} \ No newline at end of file +} diff --git a/src/backend/commands/player/vehicle/open_doors.cpp b/src/backend/commands/player/vehicle/open_doors.cpp index 35525605..82cc3b29 100644 --- a/src/backend/commands/player/vehicle/open_doors.cpp +++ b/src/backend/commands/player/vehicle/open_doors.cpp @@ -14,7 +14,7 @@ namespace big Ped ped = PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(player->id()); if (!PED::IS_PED_IN_ANY_VEHICLE(ped, true)) { - g_notification_service->push_warning("TOXIC"_T.data(), "ERROR_PLAYER_IS_NOT_IN_VEHICLE"_T.data()); + g_notification_service.push_warning("TOXIC"_T.data(), "ERROR_PLAYER_IS_NOT_IN_VEHICLE"_T.data()); } else { @@ -29,11 +29,11 @@ namespace big } else { - g_notification_service->push_warning("TOXIC"_T.data(), "ERROR_FAILED_TO_TAKE_CONTROL"_T.data()); + g_notification_service.push_warning("TOXIC"_T.data(), "ERROR_FAILED_TO_TAKE_CONTROL"_T.data()); } } } }; open_doors g_open_doors("opendoors", "BACKEND_OPEN_VEHICLE_DOORS", "BACKEND_OPEN_VEHICLE_DOORS_DESC", 0); -} \ No newline at end of file +} diff --git a/src/backend/commands/player/vehicle/remote_control_vehicle.cpp b/src/backend/commands/player/vehicle/remote_control_vehicle.cpp index 9e1f95a9..aeb027b6 100644 --- a/src/backend/commands/player/vehicle/remote_control_vehicle.cpp +++ b/src/backend/commands/player/vehicle/remote_control_vehicle.cpp @@ -15,9 +15,9 @@ namespace big if (veh == 0) { if (g.player.spectating) - g_notification_service->push_warning("REMOTE_CONTROL"_T.data(), "ERROR_PLAYER_IS_NOT_IN_VEHICLE"_T.data()); + g_notification_service.push_warning("REMOTE_CONTROL"_T.data(), "ERROR_PLAYER_IS_NOT_IN_VEHICLE"_T.data()); else - g_notification_service->push_warning("REMOTE_CONTROL"_T.data(), std::format("{} {}", "ERROR_PLAYER_IS_NOT_IN_VEHICLE"_T, "BACKEND_REMOTE_CONTROL_VEHICLE_SPECTATE"_T).c_str()); + g_notification_service.push_warning("REMOTE_CONTROL"_T.data(), std::format("{} {}", "ERROR_PLAYER_IS_NOT_IN_VEHICLE"_T, "BACKEND_REMOTE_CONTROL_VEHICLE_SPECTATE"_T).c_str()); return; } @@ -27,4 +27,4 @@ namespace big }; remote_control_vehicle g_remote_control_vehicle("rcplayer", "BACKEND_REMOTE_CONTROL_VEHICLE", "BACKEND_REMOTE_CONTROL_VEHICLE_DESC", 0, false); -} \ No newline at end of file +} diff --git a/src/backend/commands/player/vehicle/special_ability.cpp b/src/backend/commands/player/vehicle/special_ability.cpp index cd824feb..0f980903 100644 --- a/src/backend/commands/player/vehicle/special_ability.cpp +++ b/src/backend/commands/player/vehicle/special_ability.cpp @@ -15,7 +15,7 @@ namespace big Ped ped = PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(player->id()); if (!PED::IS_PED_IN_ANY_VEHICLE(ped, true)) { - g_notification_service->push_warning("TOXIC"_T.data(), "ERROR_PLAYER_IS_NOT_IN_VEHICLE"_T.data()); + g_notification_service.push_warning("TOXIC"_T.data(), "ERROR_PLAYER_IS_NOT_IN_VEHICLE"_T.data()); } else { @@ -28,4 +28,4 @@ namespace big vehicle_special_ability<1> g_special_boost_vehicle("svehboost", "BACKEND_SPECIAL_ABILITY_BOOST", "BACKEND_SPECIAL_ABILITY_BOOST_DESC", 0); vehicle_special_ability<3> g_special_shunt_left("sshuntleft", "BACKEND_SPECIAL_ABILITY_LEFT", "BACKEND_SPECIAL_ABILITY_LEFT_DESC", 0); vehicle_special_ability<2> g_special_shunt_right("sshuntright", "BACKEND_SPECIAL_ABILITY_RIGHT", "BACKEND_SPECIAL_ABILITY_RIGHT_DESC", 0); -} \ No newline at end of file +} diff --git a/src/backend/commands/player/vehicle/stop_vehicle.cpp b/src/backend/commands/player/vehicle/stop_vehicle.cpp index dd6bccc0..c74ba66b 100644 --- a/src/backend/commands/player/vehicle/stop_vehicle.cpp +++ b/src/backend/commands/player/vehicle/stop_vehicle.cpp @@ -13,7 +13,7 @@ namespace big Ped ped = PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(player->id()); if (!PED::IS_PED_IN_ANY_VEHICLE(ped, true)) { - g_notification_service->push_warning("TOXIC"_T.data(), "ERROR_PLAYER_IS_NOT_IN_VEHICLE"_T.data()); + g_notification_service.push_warning("TOXIC"_T.data(), "ERROR_PLAYER_IS_NOT_IN_VEHICLE"_T.data()); } else { @@ -25,11 +25,11 @@ namespace big } else { - g_notification_service->push_warning("TOXIC"_T.data(), "ERROR_FAILED_TO_TAKE_CONTROL"_T.data()); + g_notification_service.push_warning("TOXIC"_T.data(), "ERROR_FAILED_TO_TAKE_CONTROL"_T.data()); } } } }; stop_vehicle g_stop_vehicle("stopveh", "BACKEND_STOP_VEHICLE", "BACKEND_STOP_VEHICLE_DESC", 0); -} \ No newline at end of file +} diff --git a/src/backend/commands/player/vehicle/unlock_doors.cpp b/src/backend/commands/player/vehicle/unlock_doors.cpp index 9dfdacb7..87e12036 100644 --- a/src/backend/commands/player/vehicle/unlock_doors.cpp +++ b/src/backend/commands/player/vehicle/unlock_doors.cpp @@ -14,7 +14,7 @@ namespace big Ped ped = PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(player->id()); if (!PED::IS_PED_IN_ANY_VEHICLE(ped, true)) { - g_notification_service->push_warning("VEHICLE"_T.data(), "ERROR_PLAYER_IS_NOT_IN_VEHICLE"_T.data()); + g_notification_service.push_warning("VEHICLE"_T.data(), "ERROR_PLAYER_IS_NOT_IN_VEHICLE"_T.data()); } else { @@ -27,4 +27,4 @@ namespace big }; unlock_vehicle g_unlock_vehicle("unlockveh", "BACKEND_UNLOCK_DOORS", "BACKEND_UNLOCK_DOORS_DESC", 0); -} \ No newline at end of file +} diff --git a/src/backend/commands/player/vehicle/upgrade_vehicle.cpp b/src/backend/commands/player/vehicle/upgrade_vehicle.cpp index 1cb7accb..96fc1f23 100644 --- a/src/backend/commands/player/vehicle/upgrade_vehicle.cpp +++ b/src/backend/commands/player/vehicle/upgrade_vehicle.cpp @@ -17,7 +17,7 @@ namespace big if (!PED::IS_PED_IN_ANY_VEHICLE(ped, true)) { - g_notification_service->push_warning("TOXIC"_T.data(), "ERROR_PLAYER_IS_NOT_IN_VEHICLE"_T.data()); + g_notification_service.push_warning("TOXIC"_T.data(), "ERROR_PLAYER_IS_NOT_IN_VEHICLE"_T.data()); } else { @@ -27,4 +27,4 @@ namespace big }; upgrade_vehicle g_upgrade_vehicle("upgradeveh", "MAX_VEHICLE", "BACKEND_UPGRADE_VEHICLE_DESC", 0); -} \ No newline at end of file +} diff --git a/src/backend/commands/session/wipe_session.cpp b/src/backend/commands/session/wipe_session.cpp index be66f76f..50a6dbd8 100644 --- a/src/backend/commands/session/wipe_session.cpp +++ b/src/backend/commands/session/wipe_session.cpp @@ -15,8 +15,8 @@ namespace big { player_mgr->RemovePlayer(plyr->get_net_game_player()); } - g_notification_service->push("EMPTY_SESSION"_T.data(), "BACKEND_WIPE_SESSION_COMPLETE"_T.data()); + g_notification_service.push("EMPTY_SESSION"_T.data(), "BACKEND_WIPE_SESSION_COMPLETE"_T.data()); } }; empty_session g_empty_session("emptysession", "EMPTY_SESSION", "BACKEND_WIPE_SESSION_DESC", 0); -} \ No newline at end of file +} diff --git a/src/backend/commands/spawn/spawn_vehicle.cpp b/src/backend/commands/spawn/spawn_vehicle.cpp index f7ec4755..3dba2f35 100644 --- a/src/backend/commands/spawn/spawn_vehicle.cpp +++ b/src/backend/commands/spawn/spawn_vehicle.cpp @@ -42,7 +42,7 @@ namespace big if (veh == 0) { - g_notification_service->push_error("GUI_TAB_SPAWN_VEHICLE"_T.data(), "UNABLE_TO_SPAWN_VEHICLE"_T.data()); + g_notification_service.push_error("GUI_TAB_SPAWN_VEHICLE"_T.data(), "UNABLE_TO_SPAWN_VEHICLE"_T.data()); } else { diff --git a/src/backend/context/default_command_context.cpp b/src/backend/context/default_command_context.cpp index 146973b8..c3535ec8 100644 --- a/src/backend/context/default_command_context.cpp +++ b/src/backend/context/default_command_context.cpp @@ -14,11 +14,11 @@ namespace big void default_command_context::report_output(const std::string& output) const { - g_notification_service->push("BACKEND_COMMAND"_T.data(), output); + g_notification_service.push("BACKEND_COMMAND"_T.data(), output); } void default_command_context::report_error(const std::string& error) const { - g_notification_service->push_error("BACKEND_COMMAND"_T.data(), error); + g_notification_service.push_error("BACKEND_COMMAND"_T.data(), error); } -} \ No newline at end of file +} diff --git a/src/backend/looped/self/super_hero_fly.cpp b/src/backend/looped/self/super_hero_fly.cpp index e832c28d..5ae2ed57 100644 --- a/src/backend/looped/self/super_hero_fly.cpp +++ b/src/backend/looped/self/super_hero_fly.cpp @@ -391,7 +391,7 @@ namespace big virtual void on_enable() override { - g_notification_service->push("SUPER_HERO_FLY"_T.data(), "SUPER_HERO_FLY_ENABLE_NOTIFICATION"_T.data()); + g_notification_service.push("SUPER_HERO_FLY"_T.data(), "SUPER_HERO_FLY_ENABLE_NOTIFICATION"_T.data()); } virtual void on_disable() override diff --git a/src/backend/looped/self/toggle_passive.cpp b/src/backend/looped/self/toggle_passive.cpp index a3a5c83d..84bbccc0 100644 --- a/src/backend/looped/self/toggle_passive.cpp +++ b/src/backend/looped/self/toggle_passive.cpp @@ -19,7 +19,7 @@ namespace big { on_disable(); g.self.passive = false; - g_notification_service->push_warning("PASSIVE"_T.data(), "BACKEND_LOOPED_SELF_TOGGLE_PASSIVE_DISABLED_PASSIVE_MODE_MESSAGE"_T.data()); + g_notification_service.push_warning("PASSIVE"_T.data(), "BACKEND_LOOPED_SELF_TOGGLE_PASSIVE_DISABLED_PASSIVE_MODE_MESSAGE"_T.data()); return; } *g_tunables_service->get_tunable(-29732167) = 0; // End Passive Time = 0s diff --git a/src/backend/looped/vehicle/auto_drive.cpp b/src/backend/looped/vehicle/auto_drive.cpp index 31c81feb..ad58eca8 100644 --- a/src/backend/looped/vehicle/auto_drive.cpp +++ b/src/backend/looped/vehicle/auto_drive.cpp @@ -29,7 +29,7 @@ namespace big { current_destination = AutoDriveDestination::STOPPED; changing_driving_styles = false; - g_notification_service->push_warning("AUTO_DRIVE"_T.data(), "PLAYER_INFO_NO_VEHICLE"_T.data()); + g_notification_service.push_warning("AUTO_DRIVE"_T.data(), "PLAYER_INFO_NO_VEHICLE"_T.data()); } else if (current_driving_flag != driving_style_flags[g.vehicle.auto_drive_style] || current_speed != g.vehicle.auto_drive_speed) { @@ -77,11 +77,11 @@ namespace big if (to_waypoint && !does_waypoint_exist) { - g_notification_service->push_warning("AUTO_DRIVE"_T.data(), "TELEPORT_NO_WAYPOINT_SET"_T.data()); + g_notification_service.push_warning("AUTO_DRIVE"_T.data(), "TELEPORT_NO_WAYPOINT_SET"_T.data()); } else { - g_notification_service->push_warning("AUTO_DRIVE"_T.data(), "BACKEND_LOOPED_VEHICLE_AUTO_DRIVE_STOPPED"_T.data()); + g_notification_service.push_warning("AUTO_DRIVE"_T.data(), "BACKEND_LOOPED_VEHICLE_AUTO_DRIVE_STOPPED"_T.data()); } started = false; diff --git a/src/backend/looped/vehicle/turn_signals.cpp b/src/backend/looped/vehicle/turn_signals.cpp index edd2f668..ec2914b3 100644 --- a/src/backend/looped/vehicle/turn_signals.cpp +++ b/src/backend/looped/vehicle/turn_signals.cpp @@ -125,7 +125,7 @@ namespace big virtual void on_enable() override { - g_notification_service->push("TURN_SIGNALS"_T.data(), "BACKEND_LOOPED_VEHICLE_TURN_SIGNALS_HELP"_T.data()); + g_notification_service.push("TURN_SIGNALS"_T.data(), "BACKEND_LOOPED_VEHICLE_TURN_SIGNALS_HELP"_T.data()); } virtual void on_tick() override diff --git a/src/backend/looped/weapons/cage_gun.cpp b/src/backend/looped/weapons/cage_gun.cpp index 9c9223c0..111d4efa 100644 --- a/src/backend/looped/weapons/cage_gun.cpp +++ b/src/backend/looped/weapons/cage_gun.cpp @@ -24,7 +24,7 @@ namespace big } else { - g_notification_service->push_error("CUSTOM_WEAPONS"_T.data(), "BACKEND_LOOPED_WEAPONS_CAGE_GUN_NO_ENTITY_FOUND"_T.data()); + g_notification_service.push_error("CUSTOM_WEAPONS"_T.data(), "BACKEND_LOOPED_WEAPONS_CAGE_GUN_NO_ENTITY_FOUND"_T.data()); } } } diff --git a/src/backend/looped/weapons/delete_gun.cpp b/src/backend/looped/weapons/delete_gun.cpp index 5b0ddade..8548595f 100644 --- a/src/backend/looped/weapons/delete_gun.cpp +++ b/src/backend/looped/weapons/delete_gun.cpp @@ -20,7 +20,7 @@ namespace big { if (ENTITY::IS_ENTITY_A_PED(entity) && PED::IS_PED_A_PLAYER(entity)) { - g_notification_service->push_error("CUSTOM_WEAPONS"_T.data(), "BACKEND_LOOPED_WEAPONS_DELETE_GUN_PLAYER"_T.data()); + g_notification_service.push_error("CUSTOM_WEAPONS"_T.data(), "BACKEND_LOOPED_WEAPONS_DELETE_GUN_PLAYER"_T.data()); } else { @@ -29,7 +29,7 @@ namespace big if (dist > 500) { - g_notification_service->push_error("CUSTOM_WEAPONS"_T.data(), "BACKEND_LOOPED_WEAPONS_DELETE_GUN_TOO_FAR"_T.data()); + g_notification_service.push_error("CUSTOM_WEAPONS"_T.data(), "BACKEND_LOOPED_WEAPONS_DELETE_GUN_TOO_FAR"_T.data()); } else { @@ -38,13 +38,13 @@ namespace big entity::delete_entity(entity); } else - g_notification_service->push_error("CUSTOM_WEAPONS"_T.data(), "TELEPORT_FAILED_TO_TAKE_CONTROL"_T.data()); + g_notification_service.push_error("CUSTOM_WEAPONS"_T.data(), "TELEPORT_FAILED_TO_TAKE_CONTROL"_T.data()); } } } else { - g_notification_service->push_error("CUSTOM_WEAPONS"_T.data(), "BACKEND_LOOPED_WEAPONS_CAGE_GUN_NO_ENTITY_FOUND"_T.data()); + g_notification_service.push_error("CUSTOM_WEAPONS"_T.data(), "BACKEND_LOOPED_WEAPONS_CAGE_GUN_NO_ENTITY_FOUND"_T.data()); } } } diff --git a/src/backend/looped/weapons/gravity_gun.cpp b/src/backend/looped/weapons/gravity_gun.cpp index 4d228c2a..3d1b926b 100644 --- a/src/backend/looped/weapons/gravity_gun.cpp +++ b/src/backend/looped/weapons/gravity_gun.cpp @@ -65,7 +65,7 @@ namespace big { if (ENTITY::IS_ENTITY_A_PED(ent_to_add) && PED::IS_PED_A_PLAYER(ent_to_add)) { - g_notification_service->push_warning("CUSTOM_WEAPONS"_T.data(), "BACKEND_LOOPED_WEAPONS_GRAVITY_GUN_PLAYER"_T.data()); + g_notification_service.push_warning("CUSTOM_WEAPONS"_T.data(), "BACKEND_LOOPED_WEAPONS_GRAVITY_GUN_PLAYER"_T.data()); } else { @@ -79,7 +79,7 @@ namespace big if (temp_dist > 500) { - g_notification_service->push_warning("CUSTOM_WEAPONS"_T.data(), "BACKEND_LOOPED_WEAPONS_DELETE_GUN_TOO_FAR"_T.data()); + g_notification_service.push_warning("CUSTOM_WEAPONS"_T.data(), "BACKEND_LOOPED_WEAPONS_DELETE_GUN_TOO_FAR"_T.data()); } else { @@ -87,7 +87,7 @@ namespace big { TASK::SET_HIGH_FALL_TASK(ent_to_add, 0, 0, 0); - g_notification_service->push_warning("CUSTOM_WEAPONS"_T.data(), "BACKEND_LOOPED_WEAPONS_GRAVITY_GUN_SET"_T.data()); + g_notification_service.push_warning("CUSTOM_WEAPONS"_T.data(), "BACKEND_LOOPED_WEAPONS_GRAVITY_GUN_SET"_T.data()); } ents.push_back(ent_to_add); @@ -121,7 +121,7 @@ namespace big ents.clear(); - g_notification_service->push_success("CUSTOM_WEAPONS"_T.data(), "BACKEND_LOOPED_WEAPONS_GRAVITY_GUN_UNSET"_T.data()); + g_notification_service.push_success("CUSTOM_WEAPONS"_T.data(), "BACKEND_LOOPED_WEAPONS_GRAVITY_GUN_UNSET"_T.data()); } } } diff --git a/src/backend/looped/weapons/repair_gun.cpp b/src/backend/looped/weapons/repair_gun.cpp index d81068c0..0c10da64 100644 --- a/src/backend/looped/weapons/repair_gun.cpp +++ b/src/backend/looped/weapons/repair_gun.cpp @@ -24,15 +24,15 @@ namespace big } else { - g_notification_service->push_warning("BACKEND_LOOPED_WEAPONS_REPAIR_GUN"_T.data(), "VEHICLE_INVALID"_T.data()); + g_notification_service.push_warning("BACKEND_LOOPED_WEAPONS_REPAIR_GUN"_T.data(), "VEHICLE_INVALID"_T.data()); } } else { - g_notification_service->push_warning("BACKEND_LOOPED_WEAPONS_REPAIR_GUN"_T.data(), "BACKEND_LOOPED_WEAPONS_CAGE_GUN_NO_ENTITY_FOUND"_T.data()); + g_notification_service.push_warning("BACKEND_LOOPED_WEAPONS_REPAIR_GUN"_T.data(), "BACKEND_LOOPED_WEAPONS_CAGE_GUN_NO_ENTITY_FOUND"_T.data()); } } } } } -} \ No newline at end of file +} diff --git a/src/backend/looped/weapons/steal_vehicle_gun.cpp b/src/backend/looped/weapons/steal_vehicle_gun.cpp index 1493fe2b..6ba79c36 100644 --- a/src/backend/looped/weapons/steal_vehicle_gun.cpp +++ b/src/backend/looped/weapons/steal_vehicle_gun.cpp @@ -31,12 +31,12 @@ namespace big } else { - g_notification_service->push_warning("BACKEND_LOOPED_WEAPONS_STEAL_VEHICLE_GUN"_T.data(), "VEHICLE_INVALID"_T.data()); + g_notification_service.push_warning("BACKEND_LOOPED_WEAPONS_STEAL_VEHICLE_GUN"_T.data(), "VEHICLE_INVALID"_T.data()); } } else { - g_notification_service->push_warning("BACKEND_LOOPED_WEAPONS_STEAL_VEHICLE_GUN"_T.data(), "BACKEND_LOOPED_WEAPONS_CAGE_GUN_NO_ENTITY_FOUND"_T.data()); + g_notification_service.push_warning("BACKEND_LOOPED_WEAPONS_STEAL_VEHICLE_GUN"_T.data(), "BACKEND_LOOPED_WEAPONS_CAGE_GUN_NO_ENTITY_FOUND"_T.data()); } } } diff --git a/src/backend/looped/world/nearby/auto_disarm.cpp b/src/backend/looped/world/nearby/auto_disarm.cpp index 249e929f..24040598 100644 --- a/src/backend/looped/world/nearby/auto_disarm.cpp +++ b/src/backend/looped/world/nearby/auto_disarm.cpp @@ -11,7 +11,7 @@ namespace big virtual void on_enable() override { - g_notification_service->push("Auto disarm", "Nearby hostile peds will be disarmed"); + g_notification_service.push("Auto disarm", "Nearby hostile peds will be disarmed"); } virtual void on_tick() override diff --git a/src/backend/reactions/interloper_reaction.cpp b/src/backend/reactions/interloper_reaction.cpp index 4546aee9..21d057e6 100644 --- a/src/backend/reactions/interloper_reaction.cpp +++ b/src/backend/reactions/interloper_reaction.cpp @@ -49,10 +49,10 @@ namespace big if (notify) { - g_notification_service->push_warning("PROTECTIONS"_T.data(), + g_notification_service.push_warning("PROTECTIONS"_T.data(), std::vformat(g_translation_service.get_translation(m_notify_message), std::make_format_args(attacker->get_name(), victim->get_name()))); } process_common(attacker); } -} \ No newline at end of file +} diff --git a/src/backend/reactions/reaction.cpp b/src/backend/reactions/reaction.cpp index bfd51844..607d2bf3 100644 --- a/src/backend/reactions/reaction.cpp +++ b/src/backend/reactions/reaction.cpp @@ -75,7 +75,7 @@ namespace big if (notify) { - g_notification_service->push_warning("PROTECTIONS"_T.data(), + g_notification_service.push_warning("PROTECTIONS"_T.data(), std::vformat(g_translation_service.get_translation(m_notify_message), std::make_format_args(player->get_name()))); } diff --git a/src/hooks/info/get_network_event_data.cpp b/src/hooks/info/get_network_event_data.cpp index e5a06c05..f4bd962e 100644 --- a/src/hooks/info/get_network_event_data.cpp +++ b/src/hooks/info/get_network_event_data.cpp @@ -64,11 +64,11 @@ namespace big g_fiber_pool->queue_job([] { session::join_session(gta_util::get_network()->m_last_joined_session.m_session_info); }); - g_notification_service->push_warning("KICKED"_T.data(), "You have been desync kicked. Rejoining previous session..."); + g_notification_service.push_warning("KICKED"_T.data(), "You have been desync kicked. Rejoining previous session..."); } else { - g_notification_service->push_warning("KICKED"_T.data(), "USER_DESYNC_KICKED"_T.data()); + g_notification_service.push_warning("KICKED"_T.data(), "USER_DESYNC_KICKED"_T.data()); } break; } diff --git a/src/hooks/player_management/assign_physical_index.cpp b/src/hooks/player_management/assign_physical_index.cpp index 056a5eeb..68b59fde 100644 --- a/src/hooks/player_management/assign_physical_index.cpp +++ b/src/hooks/player_management/assign_physical_index.cpp @@ -41,7 +41,7 @@ namespace big if (g.notifications.player_leave.notify) { - g_notification_service->push("PLAYER_LEFT"_T.data(), + g_notification_service.push("PLAYER_LEFT"_T.data(), std::vformat("PLAYER_LEFT_INFO"_T, std::make_format_args(net_player_data->m_name, player->m_player_id, @@ -60,7 +60,7 @@ namespace big { if (admin_rids.contains(net_player_data->m_gamer_handle.m_rockstar_id)) { - g_notification_service->push_warning("POTENTIAL_ADMIN_FOUND"_T.data(), + g_notification_service.push_warning("POTENTIAL_ADMIN_FOUND"_T.data(), std::format("{} {}", net_player_data->m_name, "PLAYER_DETECTED_AS_ADMIN"_T)); LOG(WARNING) << net_player_data->m_name << " (" << net_player_data->m_gamer_handle.m_rockstar_id << ") has been detected as an admin"; @@ -82,7 +82,7 @@ namespace big if (g.notifications.player_join.notify) { - g_notification_service->push("PLAYER_JOINED"_T.data(), + g_notification_service.push("PLAYER_JOINED"_T.data(), std::vformat("PLAYER_JOINED_INFO"_T, std::make_format_args(net_player_data->m_name, player->m_player_id, @@ -109,7 +109,7 @@ namespace big if (strcmp(plyr->get_name(), entry->name.data())) { - g_notification_service->push("PLAYERS"_T.data(), + g_notification_service.push("PLAYERS"_T.data(), std::format("{} {}: {}", entry->name, "PLAYER_CHANGED_NAME"_T, plyr->get_name())); entry->name = plyr->get_name(); g_player_database_service->save(); @@ -133,14 +133,14 @@ namespace big { if ((plyr->is_friend() && g.session.allow_friends_into_locked_session) || plyr->is_trusted) { - g_notification_service->push_success("LOBBY_LOCK"_T.data(), + g_notification_service.push_success("LOBBY_LOCK"_T.data(), std::vformat("LOBBY_LOCK_ALLOWED"_T.data(), std::make_format_args(plyr->get_net_data()->m_name))); } else { dynamic_cast(command::get("multikick"_J))->call(plyr, {}); - g_notification_service->push_warning("LOBBY_LOCK"_T.data(), + g_notification_service.push_warning("LOBBY_LOCK"_T.data(), std::vformat("LOBBY_LOCK_DENIED"_T.data(), std::make_format_args(plyr->get_net_data()->m_name))); } } diff --git a/src/hooks/player_management/network_player_mgr.cpp b/src/hooks/player_management/network_player_mgr.cpp index f116efda..7551fda6 100644 --- a/src/hooks/player_management/network_player_mgr.cpp +++ b/src/hooks/player_management/network_player_mgr.cpp @@ -13,7 +13,7 @@ namespace big if (g.notifications.network_player_mgr_init.log) LOG(INFO) << "CNetworkPlayerMgr#init got called, we're probably entering a session."; if (g.notifications.network_player_mgr_init.notify) - g_notification_service->push("NETWORK_PLAYER_MGR"_T.data(), "NETWORK_PLAYER_MGR_INIT"_T.data()); + g_notification_service.push("NETWORK_PLAYER_MGR"_T.data(), "NETWORK_PLAYER_MGR_INIT"_T.data()); bool result = g_hooking->get_original()(_this, a2, a3, a4); @@ -32,7 +32,7 @@ namespace big if (g.notifications.network_player_mgr_shutdown.log) LOG(INFO) << "CNetworkPlayerMgr#shutdown got called, we're probably leaving our session."; if (g.notifications.network_player_mgr_shutdown.notify) - g_notification_service->push("NETWORK_PLAYER_MGR"_T.data(), "NETWORK_PLAYER_MGR_DESTROY"_T.data()); + g_notification_service.push("NETWORK_PLAYER_MGR"_T.data(), "NETWORK_PLAYER_MGR_DESTROY"_T.data()); g.session.trust_session = false; g_hooking->get_original()(_this); diff --git a/src/hooks/protections/allocate_memory_reliable.cpp b/src/hooks/protections/allocate_memory_reliable.cpp index 063f4ea9..1bd0b9a7 100644 --- a/src/hooks/protections/allocate_memory_reliable.cpp +++ b/src/hooks/protections/allocate_memory_reliable.cpp @@ -73,8 +73,8 @@ namespace big if (memory) return memory; - g_notification_service->push_error("Protections", "The network message allocator is out of memory"); // this never reaches here but why not + g_notification_service.push_error("Protections", "The network message allocator is out of memory"); // this never reaches here but why not return nullptr; } -} \ No newline at end of file +} diff --git a/src/hooks/protections/handle_join_request.cpp b/src/hooks/protections/handle_join_request.cpp index ef51ec41..bbb8ab58 100644 --- a/src/hooks/protections/handle_join_request.cpp +++ b/src/hooks/protections/handle_join_request.cpp @@ -16,7 +16,7 @@ namespace big CMsgJoinResponse response{}; response.m_status_code = player->block_join_reason; g_pointers->m_gta.m_write_join_response_data(&response, ctx->m_join_response_data, 512, &ctx->m_join_response_size); - g_notification_service->push("BLOCK_JOIN"_T.data(), + g_notification_service.push("BLOCK_JOIN"_T.data(), std::vformat("BLOCK_JOIN_INFO"_T, std::make_format_args(player->name))); return false; } @@ -25,4 +25,4 @@ namespace big return g_hooking->get_original()(network, session, player_info, ctx, is_transition_session); } } -} \ No newline at end of file +} diff --git a/src/hooks/protections/receive_net_message.cpp b/src/hooks/protections/receive_net_message.cpp index 54b48911..2b1f4b25 100644 --- a/src/hooks/protections/receive_net_message.cpp +++ b/src/hooks/protections/receive_net_message.cpp @@ -118,7 +118,7 @@ namespace big { if (g.session.log_chat_messages) spam::log_chat(message, player, spam_reason, is_team); - g_notification_service->push("PROTECTIONS"_T.data(), + g_notification_service.push("PROTECTIONS"_T.data(), std::format("{} {}", player->get_name(), "IS_A_SPAMMER"_T.data())); player->is_spammer = true; if (g.session.kick_chat_spammers @@ -166,7 +166,7 @@ namespace big if (player->m_host_migration_rate_limit.exceeded_last_process()) { session::add_infraction(player, Infraction::TRIED_KICK_PLAYER); - g_notification_service->push_error("PROTECTIONS"_T.data(), + g_notification_service.push_error("PROTECTIONS"_T.data(), std::vformat("OOM_KICK"_T, std::make_format_args(player->get_name()))); } return true; @@ -209,7 +209,7 @@ namespace big if (reason == KickReason::VOTED_OUT) { - g_notification_service->push_warning("PROTECTIONS"_T.data(), "YOU_HAVE_BEEN_KICKED"_T.data()); + g_notification_service.push_warning("PROTECTIONS"_T.data(), "YOU_HAVE_BEEN_KICKED"_T.data()); return true; } @@ -225,7 +225,7 @@ namespace big if (player->m_radio_request_rate_limit.exceeded_last_process()) { session::add_infraction(player, Infraction::TRIED_KICK_PLAYER); - g_notification_service->push_error("PROTECTIONS"_T.data(), + g_notification_service.push_error("PROTECTIONS"_T.data(), std::vformat("OOM_KICK"_T, std::make_format_args(player->get_name()))); player->block_radio_requests = true; } diff --git a/src/hooks/protections/receive_pickup.cpp b/src/hooks/protections/receive_pickup.cpp index 9bf80f16..000c4737 100644 --- a/src/hooks/protections/receive_pickup.cpp +++ b/src/hooks/protections/receive_pickup.cpp @@ -6,10 +6,10 @@ namespace big { if (g.protections.receive_pickup) { - g_notification_service->push_error("PROTECTIONS"_T.data(), "Blocked pickup"); + g_notification_service.push_error("PROTECTIONS"_T.data(), "Blocked pickup"); return false; } return g_hooking->get_original()(object, unk, ped); } -} \ No newline at end of file +} diff --git a/src/hooks/protections/received_event.cpp b/src/hooks/protections/received_event.cpp index 9f3c2d6f..2e63ac01 100644 --- a/src/hooks/protections/received_event.cpp +++ b/src/hooks/protections/received_event.cpp @@ -355,7 +355,7 @@ namespace big && player->m_player_info->m_ped && player->m_player_info->m_ped->m_net_object && ownerNetId != player->m_player_info->m_ped->m_net_object->m_object_id && !offset_object) { - g_notification_service->push_error("WARNING"_T.data(), + g_notification_service.push_error("WARNING"_T.data(), std::vformat("BLAMED_FOR_EXPLOSION"_T, std::make_format_args(player->get_name(), reinterpret_cast(entity)->m_player_info->m_net_player_data.m_name))); @@ -615,7 +615,7 @@ namespace big if (g_local_player && g_local_player->m_net_object && g_local_player->m_net_object->m_object_id == net_id) { weapon_item weapon = g_gta_data_service->weapon_by_hash(hash); - g_notification_service->push_warning("PROTECTIONS"_T.data(), + g_notification_service.push_warning("PROTECTIONS"_T.data(), std::format("{} {} {}.", source_player->get_name(), "REMOVE_WEAPON_ATTEMPT_MESSAGE"_T, weapon.m_display_name)); g_pointers->m_gta.m_send_event_ack(event_manager, source_player, target_player, event_index, event_handled_bitset); return; @@ -632,7 +632,7 @@ namespace big if (g_local_player && g_local_player->m_net_object && g_local_player->m_net_object->m_object_id == net_id) { weapon_item weapon = g_gta_data_service->weapon_by_hash(hash); - g_notification_service->push_warning("PROTECTIONS"_T.data(), + g_notification_service.push_warning("PROTECTIONS"_T.data(), std::format("{} {} {}.", source_player->get_name(), "GIVE_WEAPON_ATTEMPT_MESSAGE"_T, weapon.m_display_name)); g_pointers->m_gta.m_send_event_ack(event_manager, source_player, target_player, event_index, event_handled_bitset); return; diff --git a/src/hooks/protections/script_event_handler.cpp b/src/hooks/protections/script_event_handler.cpp index b9d252f2..91b0e609 100644 --- a/src/hooks/protections/script_event_handler.cpp +++ b/src/hooks/protections/script_event_handler.cpp @@ -20,7 +20,7 @@ namespace big LOG(WARNING) << "BLOCKED_SCRIPT_EVENT From: " << player_name << " Event Type: " << protection_type; if (should_notify) - g_notification_service->push_warning("Script Event Protection", + g_notification_service.push_warning("Script Event Protection", std::format("From: {}\nEvent Type: {}", player_name.data(), protection_type.data())); } diff --git a/src/hooks/protections/send_non_physical_player_data.cpp b/src/hooks/protections/send_non_physical_player_data.cpp index c54a9912..aabf422e 100644 --- a/src/hooks/protections/send_non_physical_player_data.cpp +++ b/src/hooks/protections/send_non_physical_player_data.cpp @@ -16,7 +16,7 @@ namespace big if (plyr && plyr->block_join && *g_pointers->m_gta.m_is_session_started) { data->m_bubble_id = 10; - g_notification_service->push("BLOCK_JOIN"_T.data(), std::vformat("BLOCK_JOIN_PREVENT_PLAYER_JOIN"_T, std::make_format_args(plyr->get_name()))); + g_notification_service.push("BLOCK_JOIN"_T.data(), std::vformat("BLOCK_JOIN_PREVENT_PLAYER_JOIN"_T, std::make_format_args(plyr->get_name()))); } bool result = g_hooking->get_original()(player, message, flags, a4, a5); @@ -25,4 +25,4 @@ namespace big return result; } -} \ No newline at end of file +} diff --git a/src/hooks/script/gta_thread_kill.cpp b/src/hooks/script/gta_thread_kill.cpp index c5deaaa3..f5cd8f20 100644 --- a/src/hooks/script/gta_thread_kill.cpp +++ b/src/hooks/script/gta_thread_kill.cpp @@ -11,7 +11,7 @@ namespace big LOG(INFO) << "Script Thread '" << thread->m_name << "' terminated (" << thread->m_exit_message << ")."; if (g.notifications.gta_thread_kill.notify) - g_notification_service->push("Script Thread Termination", + g_notification_service.push("Script Thread Termination", std::format("Script Thread '{}' terminated.", thread->m_name)); if (thread == g.m_hunt_the_beast_thread) diff --git a/src/hooks/script/gta_thread_start.cpp b/src/hooks/script/gta_thread_start.cpp index db7da41a..60a294b6 100644 --- a/src/hooks/script/gta_thread_start.cpp +++ b/src/hooks/script/gta_thread_start.cpp @@ -12,7 +12,7 @@ namespace big if (g.notifications.gta_thread_kill.log) LOG(INFO) << "Script Thread '" << name << "' started."; if (g.notifications.gta_thread_kill.notify) - g_notification_service->push("Script Thread Startup", std::format("Script Thread '{}' started.", name)); + g_notification_service.push("Script Thread Startup", std::format("Script Thread '{}' started.", name)); } return new_thread; diff --git a/src/lua/bindings/gui.cpp b/src/lua/bindings/gui.cpp index a55b2a4e..4aa3f270 100644 --- a/src/lua/bindings/gui.cpp +++ b/src/lua/bindings/gui.cpp @@ -251,7 +251,7 @@ namespace lua::gui // Shows a message to the user with the given title and message. static void show_message(const std::string& title, const std::string& message) { - big::g_notification_service->push(title, message); + big::g_notification_service.push(title, message); } // Lua API: Function @@ -262,7 +262,7 @@ namespace lua::gui // Shows a warning to the user with the given title and message. static void show_warning(const std::string& title, const std::string& message) { - big::g_notification_service->push_warning(title, message); + big::g_notification_service.push_warning(title, message); } // Lua API: Function @@ -273,7 +273,7 @@ namespace lua::gui // Shows an error to the user with the given title and message. static void show_error(const std::string& title, const std::string& message) { - big::g_notification_service->push_error(title, message); + big::g_notification_service.push_error(title, message); } // Lua API: Function @@ -373,4 +373,4 @@ namespace lua::gui tab_ut["add_input_string"] = &tab::add_input_string; tab_ut["add_imgui"] = &tab::add_imgui; } -} \ No newline at end of file +} diff --git a/src/main.cpp b/src/main.cpp index 3e0203fc..84fb819a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -210,7 +210,6 @@ BOOL APIENTRY DllMain(HMODULE hmod, DWORD reason, PVOID) auto context_menu_service_instance = std::make_unique(); auto custom_text_service_instance = std::make_unique(); auto mobile_service_instance = std::make_unique(); - auto notification_service_instance = std::make_unique(); auto pickup_service_instance = std::make_unique(); auto player_service_instance = std::make_unique(); auto gta_data_service_instance = std::make_unique(); @@ -228,6 +227,9 @@ BOOL APIENTRY DllMain(HMODULE hmod, DWORD reason, PVOID) auto xml_maps_service_instance = std::make_unique(); LOG(INFO) << "Registered service instances..."; + g_notification_service.initialise(); + LOG(INFO) << "Finished initialising services."; + g_script_mgr.add_script(std::make_unique