Biyei Store
  • โ„น๏ธInformation
    • ๐Ÿ‘‹Welcome
    • ๐Ÿ”FiveM Asset Escrow System
  • ๐ŸงพScripts
    • ๐Ÿ”ซVip Weapons
      • ๐Ÿ’ฟInstallation
      • โš™๏ธConfiguration
      • โš’๏ธCommon issues
    • ๐Ÿ†Arenas PvP
      • ๐Ÿ’ฟInstallation
      • โš™๏ธConfiguration
      • โฌ†๏ธExports
      • ๐ŸŽ’Statesbags
      • โš’๏ธCommon issues
    • ๐Ÿ”ซSkin Changer
      • ๐Ÿ’ฟInstallation
      • โš™๏ธConfiguration
      • โš’๏ธCommon issues
    • โœ…SafeZones
      • ๐Ÿ’ฟInstallation
      • โš™๏ธConfiguration
      • ๐ŸŽ’Statebags
      • โš’๏ธCommon issues
    • ๐Ÿ“›Red Zones
      • ๐Ÿ’ฟInstallation
      • โš™๏ธConfiguration
      • โš’๏ธCommon issues
    • โญPartner Code System
      • ๐Ÿ’ฟInstallation
      • โš™๏ธConfiguration
      • โš’๏ธCommon issues
    • ๐Ÿ“Announcement System
      • ๐Ÿ’ฟInstallation
      • โš™๏ธConfiguration
      • โš’๏ธCommon issues
    • ๐Ÿช™Coins + Reward System
      • ๐Ÿ’ฟInstallation
      • โš™๏ธConfiguration
      • โš’๏ธCommon issues
    • ๐ŸšจDefcon Alert
      • ๐Ÿ’ฟInstallation
      • โš™๏ธConfiguration
      • โš’๏ธCommon issues
    • ๐ŸจDepartment
      • ๐Ÿ’ฟInstallation
      • โš™๏ธConfiguration
      • โš’๏ธCommon issues
    • ๐Ÿ“ฆCustom Box Creator
      • ๐Ÿ’ฟInstallation
      • โš™๏ธConfiguration
      • โš’๏ธCommon issues
    • ๐Ÿ‘ทโ€โ™€๏ธMultipleJobs
      • ๐Ÿ’ฟInstallation
      • โš™๏ธConfiguration
      • โš’๏ธCommon issues
  • ๐ŸŒŒOld Scripts
    • ๐Ÿš˜xVehicleRent
      • ๐Ÿ’ฟInstallation
      • โš™๏ธConfiguration
      • โš’๏ธCommon issues
    • ๐Ÿ‘ทโ€โ™€๏ธxMultipleJobs
      • ๐Ÿ’ฟInstallation
      • โš™๏ธConfiguration
      • โš’๏ธCommon issues
    • โš›๏ธxStorm
      • ๐Ÿ’ฟInstallation
      • โš™๏ธConfiguration
      • โš’๏ธCommon issues
    • โฌ†๏ธxLift
      • ๐Ÿ’ฟInstallation
      • โš™๏ธConfiguration
      • โš’๏ธCommon issues
    • ๐Ÿ”ซhPaintball
      • ๐Ÿ’ฟInstallation
      • โš™๏ธConfiguration
      • โš’๏ธCommon issues
    • ๐Ÿš—hVehicleShop
      • ๐Ÿ’ฟInstallation
      • โš™๏ธConfiguration
      • โš’๏ธCommon issues
Powered by GitBook
On this page
  • โ€ข STEP 1: DEPENDENCIES
  • โ€ข STEP 2: START ORDER
  • โ€ข STEP 3: FOR OX_INVENTORY
  • โ€ข STEP 4: INSTALL SQL
  • โ€ข STEP 5: FOR IMPROVE REVIVE FUNCTION
  • โ€ข STEP 6: Add function InMatch in your inventory
  1. Scripts
  2. Arenas PvP

Installation

Discover how to install your script.

PreviousArenas PvPNextConfiguration

Last updated 3 months ago

โ€ข STEP 1: DEPENDENCIES

Make sure you have this resources installed in your server!

  1. ESX or QB-CORE

โ€ข STEP 2: START ORDER

ensure biyei_utils
ensure biyei_arenas

Don't rename resource or you will get error (credits).

โ€ข STEP 3: FOR OX_INVENTORY

If you don't have ox_inventory ignore this step

Add this line in the server.cfg

setr inventory:weaponmismatch false

โ€ข STEP 4: INSTALL SQL

Important install SQL

CREATE TABLE IF NOT EXISTS `biyei_arenas` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `player` varchar(150) DEFAULT NULL,
  `username` varchar(150) DEFAULT NULL,
  `deaths` int(11) DEFAULT 0,
  `kills` int(11) DEFAULT 0,
  `score` int(11) DEFAULT 0,
  `wins` int(11) DEFAULT 0,
  `losses` int(11) DEFAULT 0,
  PRIMARY KEY (`id`),
  UNIQUE KEY `Columna 2` (`player`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

CREATE TABLE IF NOT EXISTS `biyei_arenas_players` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `player` varchar(150) NOT NULL DEFAULT '0',
  `status` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`),
  UNIQUE KEY `player` (`player`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

โ€ข STEP 5: FOR IMPROVE REVIVE FUNCTION

RegisterNetEvent('esx_ambulancejob:revive')
AddEventHandler('esx_ambulancejob:revive', function()
  local playerPed = PlayerPedId()
  local coords = GetEntityCoords(playerPed)
  TriggerServerEvent('esx_ambulancejob:setDeathStatus', false)
  -- local inMatchGame = exports.biyei_arenas:InMatch() or exports.biyei_arenas:InRankedMatch()
  local inMatchGame = LocalPlayer.state.InMatch or LocalPlayer.state.InRankedMatch
  DoScreenFadeOut(800)
  while not IsScreenFadedOut() do
    Wait(50)
  end

  local formattedCoords = {x = ESX.Math.Round(coords.x, 1), y = ESX.Math.Round(coords.y, 1), z = ESX.Math.Round(coords.z, 1)}

  RespawnPed(playerPed, formattedCoords, 0.0)
  isDead = false
  ClearTimecycleModifier()
  SetPedMotionBlur(playerPed, false)
  ClearExtraTimecycleModifier()
  EndDeathCam() 
  DoScreenFadeIn(800)
end)

โ€ข STEP 6: Add function InMatch in your inventory

For ox_inventory or another inventory disable open in match

-- Open Inventory
-- ox_inventory/client.lua
local function canOpenInventory()
   if exports.biyei_arenas:InMatch() or exports.biyei_arenas:InRankedMatch() then
     return shared.info('cannot open inventory', '(in match)')
   end
   return true
end


--- Use Item
local function canUseItem(isAmmo)
   local ped = cache.ped
   if exports.biyei_arenas:InMatch() or exports.biyei_arenas:InRankedMatch() then
      return shared.info('cannot open inventory', '(in match)')
   end
end

Biyei Utils
๐Ÿงพ
๐Ÿ†
๐Ÿ’ฟ
Page cover image