Don't enable HUD on game start
This commit is contained in:
@@ -285,26 +285,21 @@ function enterVehicleAsPassenger() {
|
|||||||
|
|
||||||
function giveLocalPlayerWeapon(weaponId, ammo, active) {
|
function giveLocalPlayerWeapon(weaponId, ammo, active) {
|
||||||
logToConsole(LOG_DEBUG, `[VRR.Utilities] Giving weapon ${weaponId} with ${ammo} ammo`);
|
logToConsole(LOG_DEBUG, `[VRR.Utilities] Giving weapon ${weaponId} with ${ammo} ammo`);
|
||||||
localPlayer.giveWeapon(weaponId, ammo, active);
|
|
||||||
forceWeaponAmmo = localPlayer.getWeaponAmmunition(getWeaponSlot(weaponId));
|
|
||||||
forceWeaponClipAmmo = localPlayer.getWeaponClipAmmunition(getWeaponSlot(weaponId));
|
|
||||||
forceWeapon = weaponId;
|
forceWeapon = weaponId;
|
||||||
}
|
|
||||||
|
|
||||||
// ===========================================================================
|
|
||||||
|
|
||||||
function giveLocalPlayerWeapon(weaponId, ammo, active) {
|
|
||||||
logToConsole(LOG_DEBUG, `[VRR.Utilities] Giving weapon ${weaponId} with ${ammo} ammo`);
|
|
||||||
if(getGame() == VRR_GAME_MAFIA_ONE) {
|
if(getGame() == VRR_GAME_MAFIA_ONE) {
|
||||||
localPlayer.giveWeapon(weaponId, 0, ammo);
|
localPlayer.giveWeapon(weaponId, 0, ammo);
|
||||||
forceWeaponAmmo = 0;
|
forceWeaponAmmo = 0;
|
||||||
forceWeaponClipAmmo = ammo;
|
forceWeaponClipAmmo = ammo;
|
||||||
} else {
|
} else {
|
||||||
localPlayer.giveWeapon(weaponId, ammo, active);
|
localPlayer.giveWeapon(weaponId, ammo, active);
|
||||||
|
if(getGame() < VRR_GAME_GTA_IV) {
|
||||||
forceWeaponAmmo = localPlayer.getWeaponAmmunition(getWeaponSlot(weaponId));
|
forceWeaponAmmo = localPlayer.getWeaponAmmunition(getWeaponSlot(weaponId));
|
||||||
forceWeaponClipAmmo = localPlayer.getWeaponClipAmmunition(getWeaponSlot(weaponId));
|
forceWeaponClipAmmo = localPlayer.getWeaponClipAmmunition(getWeaponSlot(weaponId));
|
||||||
|
} else {
|
||||||
|
forceWeaponAmmo = ammo;
|
||||||
|
forceWeaponClipAmmo = ammo;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
forceWeapon = weaponId;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
@@ -620,12 +615,16 @@ function forceLocalPlayerEquippedWeaponItem() {
|
|||||||
if(forceWeapon != 0) {
|
if(forceWeapon != 0) {
|
||||||
if(localPlayer.weapon != forceWeapon) {
|
if(localPlayer.weapon != forceWeapon) {
|
||||||
localPlayer.weapon = forceWeapon;
|
localPlayer.weapon = forceWeapon;
|
||||||
|
if(getGame() <= VRR_GAME_GTA_IV) {
|
||||||
localPlayer.setWeaponClipAmmunition(getWeaponSlot(forceWeapon), forceWeaponClipAmmo);
|
localPlayer.setWeaponClipAmmunition(getWeaponSlot(forceWeapon), forceWeaponClipAmmo);
|
||||||
localPlayer.setWeaponAmmunition(getWeaponSlot(forceWeapon), forceWeaponAmmo);
|
localPlayer.setWeaponAmmunition(getWeaponSlot(forceWeapon), forceWeaponAmmo);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if(getGame() <= VRR_GAME_GTA_IV) {
|
||||||
forceWeaponClipAmmo = localPlayer.getWeaponClipAmmunition(getWeaponSlot(forceWeapon));
|
forceWeaponClipAmmo = localPlayer.getWeaponClipAmmunition(getWeaponSlot(forceWeapon));
|
||||||
forceWeaponAmmo = localPlayer.getWeaponAmmunition(getWeaponSlot(forceWeapon));
|
forceWeaponAmmo = localPlayer.getWeaponAmmunition(getWeaponSlot(forceWeapon));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if(localPlayer.weapon > 0) {
|
if(localPlayer.weapon > 0) {
|
||||||
localPlayer.clearWeapons();
|
localPlayer.clearWeapons();
|
||||||
@@ -840,10 +839,10 @@ function setUpInitialGame() {
|
|||||||
natives.setDisplayPlayerNameAndIcon(natives.getPlayerId(), false);
|
natives.setDisplayPlayerNameAndIcon(natives.getPlayerId(), false);
|
||||||
natives.removeTemporaryRadarBlipsForPickups();
|
natives.removeTemporaryRadarBlipsForPickups();
|
||||||
natives.setPickupsFixCars(false);
|
natives.setPickupsFixCars(false);
|
||||||
natives.displayCash(true);
|
natives.displayCash(false);
|
||||||
natives.displayAmmo(true);
|
natives.displayAmmo(false);
|
||||||
natives.displayHud(true);
|
natives.displayHud(false);
|
||||||
natives.displayAreaName(true);
|
natives.displayAreaName(false);
|
||||||
natives.setPoliceRadarBlips(false);
|
natives.setPoliceRadarBlips(false);
|
||||||
|
|
||||||
natives.requestAnims("DANCING");
|
natives.requestAnims("DANCING");
|
||||||
|
|||||||
Reference in New Issue
Block a user