This commit is contained in:
Vortrex
2023-02-08 18:04:27 -06:00
parent 77114a14a3
commit bacdc063d4
62 changed files with 645 additions and 645 deletions

View File

@@ -8,14 +8,14 @@
// ===========================================================================
function setLocalPlayerFrozenState(state) {
logToConsole(LOG_DEBUG, `[AGRP.Utilities] Setting frozen state to ${state}`);
logToConsole(LOG_DEBUG, `[V.RP.Utilities] Setting frozen state to ${state}`);
gui.showCursor(state, !state);
}
// ===========================================================================
function setLocalPlayerControlState(controlState, cursorState = false) {
logToConsole(LOG_DEBUG, `[AGRP.Utilities] Setting control state to ${controlState} (Cursor: ${cursorState})`);
logToConsole(LOG_DEBUG, `[V.RP.Utilities] Setting control state to ${controlState} (Cursor: ${cursorState})`);
controlsEnabled = controlState;
game.setPlayerControl(controlState);
if (getGame() == V_GAME_GTA_III || getGame() == V_GAME_GTA_VC) {
@@ -29,7 +29,7 @@ function setLocalPlayerControlState(controlState, cursorState = false) {
// ===========================================================================
function fadeLocalCamera(state, duration, colour) {
logToConsole(LOG_DEBUG, `[AGRP.Utilities] Fading camera ${(state) ? "in" : "out"} for ${time}ms`);
logToConsole(LOG_DEBUG, `[V.RP.Utilities] Fading camera ${(state) ? "in" : "out"} for ${time}ms`);
cameraFadeDuration = duration;
cameraFadeStart = sdl.ticks;
@@ -48,7 +48,7 @@ function removeLocalPlayerFromVehicle() {
// ===========================================================================
function restoreLocalCamera() {
logToConsole(LOG_DEBUG, `[AGRP.Utilities] Camera restored`);
logToConsole(LOG_DEBUG, `[V.RP.Utilities] Camera restored`);
if (isGameFeatureSupported("customCamera")) {
game.restoreCamera(true);
}
@@ -57,7 +57,7 @@ function restoreLocalCamera() {
// ===========================================================================
function setLocalCameraLookAt(cameraPosition, cameraLookAt) {
logToConsole(LOG_DEBUG, `[AGRP.Utilities] Set camera to look at [${cameraLookAt.x}, ${cameraLookAt.y}, ${cameraLookAt.z}] from [${cameraPosition.x}, ${cameraPosition.y}, ${cameraPosition.z}]`);
logToConsole(LOG_DEBUG, `[V.RP.Utilities] Set camera to look at [${cameraLookAt.x}, ${cameraLookAt.y}, ${cameraLookAt.z}] from [${cameraPosition.x}, ${cameraPosition.y}, ${cameraPosition.z}]`);
if (isCustomCameraSupported()) {
game.setCameraLookAt(cameraPosition, cameraLookAt, true);
}
@@ -66,15 +66,15 @@ function setLocalCameraLookAt(cameraPosition, cameraLookAt) {
// ===========================================================================
function clearLocalPlayerOwnedPeds() {
logToConsole(LOG_DEBUG, `[AGRP.Utilities] Clearing all self-owned peds ...`);
logToConsole(LOG_DEBUG, `[V.RP.Utilities] Clearing all self-owned peds ...`);
clearSelfOwnedPeds();
logToConsole(LOG_DEBUG, `[AGRP.Utilities] All self-owned peds cleared`);
logToConsole(LOG_DEBUG, `[V.RP.Utilities] All self-owned peds cleared`);
};
// ===========================================================================
function setCityAmbienceState(state, clearElements = false) {
logToConsole(LOG_DEBUG, `[AGRP.Utilities] Ambient civilians and traffic ${(state) ? "enabled" : "disabled"}`);
logToConsole(LOG_DEBUG, `[V.RP.Utilities] Ambient civilians and traffic ${(state) ? "enabled" : "disabled"}`);
game.setTrafficEnabled(state);
if (getMultiplayerMod() == V_MPMOD_GTAC) {
@@ -134,7 +134,7 @@ function enterVehicleAsPassenger() {
// ===========================================================================
function giveLocalPlayerWeapon(weaponId, ammo, active) {
logToConsole(LOG_DEBUG, `[AGRP.Utilities] Giving weapon ${weaponId} with ${ammo} ammo`);
logToConsole(LOG_DEBUG, `[V.RP.Utilities] Giving weapon ${weaponId} with ${ammo} ammo`);
forceWeapon = weaponId;
if (getGame() == V_GAME_MAFIA_ONE) {
localPlayer.giveWeapon(weaponId, 0, ammo);
@@ -155,7 +155,7 @@ function giveLocalPlayerWeapon(weaponId, ammo, active) {
// ===========================================================================
function clearLocalPlayerWeapons(clearData) {
logToConsole(LOG_DEBUG, `[AGRP.Utilities] Clearing weapons`);
logToConsole(LOG_DEBUG, `[V.RP.Utilities] Clearing weapons`);
localPlayer.clearWeapons();
if (clearData == true) {
forceWeapon = 0;
@@ -173,7 +173,7 @@ function getClosestVehicle(pos) {
// ===========================================================================
function setLocalPlayerPosition(position) {
logToConsole(LOG_DEBUG, `[AGRP.Utilities] Setting position to ${position.x}, ${position.y}, ${position.z}`);
logToConsole(LOG_DEBUG, `[V.RP.Utilities] Setting position to ${position.x}, ${position.y}, ${position.z}`);
if (typeof localPlayer.velocity != "undefined") {
localPlayer.velocity = toVector3(0.0, 0.0, 0.0);
}
@@ -186,7 +186,7 @@ function setLocalPlayerPosition(position) {
// ===========================================================================
function setLocalPlayerHeading(heading) {
logToConsole(LOG_DEBUG, `[AGRP.Utilities] Setting heading to ${heading}`);
logToConsole(LOG_DEBUG, `[V.RP.Utilities] Setting heading to ${heading}`);
if (typeof localPlayer.heading != "undefined") {
localPlayer.heading = heading;
}
@@ -195,7 +195,7 @@ function setLocalPlayerHeading(heading) {
// ===========================================================================
function setLocalPlayerInterior(interior) {
logToConsole(LOG_DEBUG, `[AGRP.Utilities] Setting interior to ${interior}`);
logToConsole(LOG_DEBUG, `[V.RP.Utilities] Setting interior to ${interior}`);
if (getMultiplayerMod() == V_MPMOD_GTAC) {
if (!isGTAIV()) {
localPlayer.interior = interior;
@@ -224,7 +224,7 @@ function setLocalPlayerInterior(interior) {
// ===========================================================================
function setSnowState(falling, ground, forceGround) {
logToConsole(LOG_DEBUG, `[AGRP.Utilities] Setting falling snow to ${falling} and ground snow to ${ground}`);
logToConsole(LOG_DEBUG, `[V.RP.Utilities] Setting falling snow to ${falling} and ground snow to ${ground}`);
snowing = falling;
//snow.force = ground;
//if (forceGround == true) {
@@ -244,7 +244,7 @@ function setLocalPlayerHealth(health) {
// ===========================================================================
function playPedSpeech(pedName, speechId) {
logToConsole(LOG_DEBUG, `[AGRP.Utilities] Making ${pedName}'s ped talk (${speechId})`);
logToConsole(LOG_DEBUG, `[V.RP.Utilities] Making ${pedName}'s ped talk (${speechId})`);
if (getMultiplayerMod() == V_MPMOD_GTAC) {
game.SET_CHAR_SAY(int, int);
}
@@ -253,7 +253,7 @@ function playPedSpeech(pedName, speechId) {
// ===========================================================================
function clearLocalPedState() {
logToConsole(LOG_DEBUG, `[AGRP.Utilities] Clearing local ped state`);
logToConsole(LOG_DEBUG, `[V.RP.Utilities] Clearing local ped state`);
localPlayer.clearObjective();
}
@@ -267,7 +267,7 @@ function getWeaponSlot(weaponId) {
function setLocalPlayerDrunkEffect(amount, duration) {
if (getMultiplayerMod() == V_MPMOD_GTAC) {
logToConsole(LOG_DEBUG, `[AGRP.Utilities] Drunk effect set to ${amount} for ${duration} ms`);
logToConsole(LOG_DEBUG, `[V.RP.Utilities] Drunk effect set to ${amount} for ${duration} ms`);
drunkEffectAmount = 0;
drunkEffectDurationTimer = setInterval(function () {
drunkEffectAmount = drunkEffectAmount;
@@ -319,7 +319,7 @@ function clearSelfOwnedVehicles() {
// ===========================================================================
function setMouseCameraState(state) {
logToConsole(LOG_DEBUG, `[AGRP.Utilities] ${(state) ? "Enabled" : "Disabled"} mouse camera`);
logToConsole(LOG_DEBUG, `[V.RP.Utilities] ${(state) ? "Enabled" : "Disabled"} mouse camera`);
mouseCameraEnabled = state;
SetStandardControlsEnabled(!mouseCameraEnabled);
}
@@ -327,28 +327,28 @@ function setMouseCameraState(state) {
// ===========================================================================
function toggleMouseCursor() {
logToConsole(LOG_DEBUG, `[AGRP.Utilities] ${(!gui.cursorEnabled) ? "Enabled" : "Disabled"} mouse cursor`);
logToConsole(LOG_DEBUG, `[V.RP.Utilities] ${(!gui.cursorEnabled) ? "Enabled" : "Disabled"} mouse cursor`);
gui.showCursor(!gui.cursorEnabled, gui.cursorEnabled);
}
// ===========================================================================
function toggleMouseCursor() {
logToConsole(LOG_DEBUG, `[AGRP.Utilities] ${(!gui.cursorEnabled) ? "Enabled" : "Disabled"} mouse cursor`);
logToConsole(LOG_DEBUG, `[V.RP.Utilities] ${(!gui.cursorEnabled) ? "Enabled" : "Disabled"} mouse cursor`);
setMouseCameraState(!mouseCameraEnabled);
}
// ===========================================================================
function setPlayerWeaponDamageEvent(clientName, eventType) {
logToConsole(LOG_DEBUG, `[AGRP.Utilities] Set ${clientName} damage event type to ${eventType}`);
logToConsole(LOG_DEBUG, `[V.RP.Utilities] Set ${clientName} damage event type to ${eventType}`);
weaponDamageEvent[clientName] = eventType;
}
// ===========================================================================
function setPlayerWeaponDamageEnabled(clientName, state) {
logToConsole(LOG_DEBUG, `[AGRP.Utilities] ${(state) ? "Enabled" : "Disabled"} damage from ${clientName}`);
logToConsole(LOG_DEBUG, `[V.RP.Utilities] ${(state) ? "Enabled" : "Disabled"} damage from ${clientName}`);
weaponDamageEnabled[clientName] = state;
}
@@ -472,7 +472,7 @@ function getVehicleForNetworkEvent(vehicle) {
// ===========================================================================
function setMinuteDuration(minuteDuration) {
logToConsole(LOG_DEBUG, `[AGRP.Utilities] Setting minute duration to ${minuteDuration}ms`);
logToConsole(LOG_DEBUG, `[V.RP.Utilities] Setting minute duration to ${minuteDuration}ms`);
if (isTimeSupported()) {
game.time.minuteDuration = minuteDuration;
@@ -617,7 +617,7 @@ function updateLocalPlayerMoney() {
// ===========================================================================
function setLocalPlayerMoney(amount) {
logToConsole(LOG_DEBUG, `[AGRP.Utilities] Setting local player money`);
logToConsole(LOG_DEBUG, `[V.RP.Utilities] Setting local player money`);
localPlayerMoney = amount;
updateLocalPlayerMoney();
}