From 6b73be287b2e7957df6cd6019d0ea1f81d340114 Mon Sep 17 00:00:00 2001 From: Vortrex <3858226+VortrexFTW@users.noreply.github.com> Date: Sat, 23 Jul 2022 04:19:03 -0500 Subject: [PATCH] Some fixes for paintball --- scripts/server/paintball.js | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/scripts/server/paintball.js b/scripts/server/paintball.js index 74e4615c..80e58f8a 100644 --- a/scripts/server/paintball.js +++ b/scripts/server/paintball.js @@ -132,10 +132,24 @@ function respawnPlayerForPaintBall(client) { despawnPlayer(client); let businessId = getPlayerData(client).paintBallBusiness; - let spawnId = getRandom(0, getBusinessData(businessId).paintBallSpawns.length - 1); + //let spawnId = getRandom(0, getBusinessData(businessId).paintBallSpawns.length - 1); + //spawnPlayer(client, getBusinessData(businessId).paintBallSpawns[spawnId], 0.0, getPlayerSkin(client), getBusinessData(businessId).exitInterior, getBusinessData(businessId).exitPosition, getBusinessData(businessId).exitDimension); - spawnPlayer(client, getBusinessData(businessId).paintBallSpawns[spawnId], 0.0, getPlayerSkin(client), getBusinessData(businessId).exitInterior, getBusinessData(businessId).exitPosition, getBusinessData(businessId).exitDimension); + spawnPlayer(client, getBusinessData(businessId).exitPosition, 0.0, getPlayerSkin(client), getBusinessData(businessId).exitInterior, getBusinessData(businessId).exitDimension); + if (isFadeCameraSupported()) { + fadeCamera(client, true, 0.5); + } + updatePlayerSpawnedState(client, true); + makePlayerStopAnimation(client); + setPlayerControlState(client, true); + resetPlayerBlip(client); logToConsole(LOG_DEBUG, `[VRR.PaintBall]: Respawned ${getPlayerDisplayForConsole(client)} for paintball successfully`); } +// =========================================================================== + +function isPlayerInPaintBall(client) { + return getPlayerData(client).inPaintBall; +} + // =========================================================================== \ No newline at end of file