Use game namespace and new const

This commit is contained in:
Vortrex
2021-11-16 02:00:54 -06:00
parent b8ee6efcd6
commit 2e753b4d87
12 changed files with 249 additions and 239 deletions

View File

@@ -186,10 +186,10 @@ function setEnterPropertyKey(key) {
function setGameScriptState(scriptName, state) {
if(state == VRR_GAMESCRIPT_FORCE) {
logToConsole(`[VRR.Server] Starting game script '${scriptName}'`);
gta.startNewScript(scriptName);
game.startNewScript(scriptName);
} else if(state == VRR_GAMESCRIPT_DENY) {
logToConsole(`[VRR.Server] Terminating game script '${scriptName}'`);
gta.terminateScript(scriptName);
game.terminateScript(scriptName);
}
}
@@ -242,7 +242,7 @@ function makePedStopAnimation(pedId) {
return false;
}
if(getGame() == GAME_GTA_VC || getGame() == GAME_GTA_SA) {
if(getGame() == VRR_GAME_GTA_VC || getGame() == VRR_GAME_GTA_SA) {
getElementFromId(pedId).clearAnimations();
} else {
getElementFromId(pedId).clearObjective();