Infinite run cmd for admin

This commit is contained in:
Vortrex
2022-02-13 19:32:11 -06:00
parent 5a9dc56630
commit 47fd538a7b

View File

@@ -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));
}
}
}
// ===========================================================================