From a3fe0f87082e363c8d6987589ba9cd5542fd5db0 Mon Sep 17 00:00:00 2001 From: Vortrex <3858226+VortrexFTW@users.noreply.github.com> Date: Sun, 17 Jul 2022 04:25:24 -0500 Subject: [PATCH] Unlimited ammo for paintball + clear weps when leaving --- scripts/server/paintball.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/server/paintball.js b/scripts/server/paintball.js index fa154214..74e4615c 100644 --- a/scripts/server/paintball.js +++ b/scripts/server/paintball.js @@ -76,6 +76,7 @@ function startPaintBall(client) { function stopPaintBall(client) { logToConsole(LOG_DEBUG, `[VRR.PaintBall]: Stopping paintball for ${getPlayerDisplayForConsole(client)} ...`); + clearPlayerWeapons(client); deletePaintBallItems(client); restorePlayerTempLockerItems(client); logToConsole(LOG_DEBUG, `[VRR.PaintBall]: Stopped paintball for ${getPlayerDisplayForConsole(client)} successfully`); @@ -86,7 +87,7 @@ function stopPaintBall(client) { function givePlayerPaintBallItems(client) { logToConsole(LOG_DEBUG, `[VRR.PaintBall]: Giving ${getPlayerDisplayForConsole(client)} paintball items ...`); for (let i in paintBallItems) { - let itemId = createItem(paintBallItems[i], value, AGRP_ITEM_OWNER_PLAYER, getPlayerCurrentSubAccount(client).databaseId); + let itemId = createItem(paintBallItems[i], 999999, AGRP_ITEM_OWNER_PLAYER, getPlayerCurrentSubAccount(client).databaseId); getItemData(itemId).needsSaved = false; getItemData(itemId).databaseId = -1; // Make sure it doesnt save let freeSlot = getPlayerFirstEmptyHotBarSlot(client); @@ -117,7 +118,7 @@ function cacheAllPaintBallItemTypes() { for (let i in paintBallItemNames[getGame()]) { let itemTypeId = getItemTypeFromParams(paintBallItemNames[getGame()][i]); if (itemTypeId != -1 && getItemTypeData(itemTypeId) != false) { - paintBallItems.push(getItemTypeData(itemTypeId)); + paintBallItems.push(itemTypeId); } }