πΏInstallation
Discover how to install your script.
β’ STEP 1: DEPENDENCIES
Make sure you have this resources installed in your server!
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
Add this line in the server.cfg
setr inventory:weaponmismatch false
β’ STEP 4: 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
Last updated