From 47fd538a7b36c96b9f125a0442298153691f68c6 Mon Sep 17 00:00:00 2001 From: Vortrex <3858226+VortrexFTW@users.noreply.github.com> Date: Sun, 13 Feb 2022 19:32:11 -0600 Subject: [PATCH] Infinite run cmd for admin --- scripts/client/server.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/scripts/client/server.js b/scripts/client/server.js index 189a5442..a74df6f0 100644 --- a/scripts/client/server.js +++ b/scripts/client/server.js @@ -40,6 +40,7 @@ function addAllNetworkHandlers() { addNetworkEventHandler("vrr.interior", setLocalPlayerInterior); addNetworkEventHandler("vrr.minuteDuration", setMinuteDuration); addNetworkEventHandler("vrr.showJobRouteLocation", showJobRouteLocation); + addNetworkEventHandler("vrr.hideJobRouteLocation", hideJobRouteLocation); addNetworkEventHandler("vrr.snow", setSnowState); addNetworkEventHandler("vrr.health", setLocalPlayerHealth); addNetworkEventHandler("vrr.enterPropertyKey", setEnterPropertyKey); @@ -98,6 +99,7 @@ function addAllNetworkHandlers() { addNetworkEventHandler("vrr.showLogin", showLoginGUI); addNetworkEventHandler("vrr.logLevel", setLogLevel); + addNetworkEventHandler("vrr.infiniteRun", setLocalPlayerInfiniteRun); } // =========================================================================== @@ -285,4 +287,14 @@ function setLogLevel(level) { logLevel = level; } +// =========================================================================== + +function setLocalPlayerInfiniteRun(state) { + if(localPlayer != null) { + if(getGame() == VRR_GAME_GTA_III || getGame() == VRR_GAME_GTA_VC) { + game.SET_PLAYER_NEVER_GETS_TIRED(game.GET_PLAYER_ID(), boolToInt(state)); + } + } +} + // =========================================================================== \ No newline at end of file