Merge branch 'gtaiv' into 1.4.0-prep
This commit is contained in:
@@ -207,11 +207,11 @@ function removePlayerFromVehicle(client) {
|
||||
// ===========================================================================
|
||||
|
||||
function setPlayerSkin(client, skinIndex) {
|
||||
logToConsole(LOG_DEBUG, `Setting ${getPlayerDisplayForConsole(client)}'s skin to ${getGameData().skins[getGame()][skinIndex][0]} (Index: ${skinIndex}, Name: ${getGameData().skins[getGame()][skinIndex][1]})`);
|
||||
logToConsole(LOG_DEBUG, `Setting ${getPlayerDisplayForConsole(client)}'s skin to ${getGameConfig().skins[getGame()][skinIndex][0]} (Index: ${skinIndex}, Name: ${getGameConfig().skins[getGame()][skinIndex][1]})`);
|
||||
if(getGame() == VRR_GAME_GTA_IV) {
|
||||
triggerNetworkEvent("vrr.localPlayerSkin", client, getGameData().skins[getGame()][skinIndex][0]);
|
||||
triggerNetworkEvent("vrr.localPlayerSkin", client, getGameConfig().skins[getGame()][skinIndex][0]);
|
||||
} else {
|
||||
client.player.modelIndex = getGameData().skins[getGame()][skinIndex][0];
|
||||
client.player.modelIndex = getGameConfig().skins[getGame()][skinIndex][0];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -429,7 +429,7 @@ function createGameObject(modelIndex, position) {
|
||||
if(!isGameFeatureSupported("objects")) {
|
||||
return false;
|
||||
}
|
||||
return game.createObject(getGameData().objects[getGame()][modelIndex][0], position);
|
||||
return game.createObject(getGameConfig().objects[getGame()][modelIndex][0], position);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -451,7 +451,7 @@ function destroyGameElement(element) {
|
||||
// ===========================================================================
|
||||
|
||||
function isMeleeWeapon(weaponId, gameId = getServerGame()) {
|
||||
return (getGameData().meleeWeapons[gameId].indexOf(weaponId) != -1);
|
||||
return (getGameConfig().meleeWeapons[gameId].indexOf(weaponId) != -1);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -539,7 +539,7 @@ function setVehicleColours(vehicle, colour1, colour2, colour3 = -1, colour4 = -1
|
||||
// ===========================================================================
|
||||
|
||||
function createGameVehicle(modelIndex, position, heading) {
|
||||
return game.createVehicle(getGameData().vehicles[getGame()][modelIndex][0], position, heading);
|
||||
return game.createVehicle(getGameConfig().vehicles[getGame()][modelIndex][0], position, heading);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -590,7 +590,7 @@ function setPlayerFightStyle(client, fightStyleId) {
|
||||
return false;
|
||||
}
|
||||
|
||||
setEntityData(getPlayerElement(client), "vrr.fightStyle", [getGameData().fightStyles[getServerGame()][fightStyleId][1][0], getGameData().fightStyles[getServerGame()][fightStyleId][1][1]]);
|
||||
setEntityData(getPlayerElement(client), "vrr.fightStyle", [getGameConfig().fightStyles[getServerGame()][fightStyleId][1][0], getGameConfig().fightStyles[getServerGame()][fightStyleId][1][1]]);
|
||||
forcePlayerToSyncElementProperties(null, getPlayerElement(client));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user