Common Issue
To fix common issue by respawning, weapon loadout, etc.
Most issue can fix by clamp any script with ArenaAPI export
This example try to clamp custom roleplay revive script by add ArenaAPI:IsPlayerInAnyArena()
And also work with custom HUD like block weapon hotbar or speedo.
Citizen.CreateThread(fuunction()
while true do
if not exports.ArenaAPI:IsPlayerInAnyArena() then -- Don't check player dead while in lobby game
if IsPedDeadOrDying(PlayerPedId()) then
IsDeath = true
end
end
Citizen.Wait(0)
end
end)Citizen.CreateThread(fuunction()
while true do
if not exports.ArenaAPI:IsPlayerInAnyArena() then -- Don't toggle speedo while in lobby game
if IsPedInAnyVehicle(PlayerPedId(), false)
ShowSpeedo()
else
HideSpeedo()
end
end
Citizen.Wait(0)
end
end)Custom Death Script
When your custom death script triggered it can block your client input or play screen effect that can make lobby game unplayable.
For example it's a script called qb-ambulancejob
Find how is dead can triggered
Most script using isDead = true
It is in function OnDeath() then find how it trigger
Learn by look at the code patten on code highlighting.
es_extended/blob/master/client/modules/death.lua
esx_ambulancejob/client/main.lua
vMenu
For vMenu you need to make Respawn As Default MP Character to disable by default. Because it make you respawn out side vehicle. Set server command. (vMenu/config/permissions.cfg)
basic-gamemode
For game basic-gamemode disable auto respawn. In [script_name]/config/client/event.lua
Custom Weapon Loadout
Some of roleplay base script has a custom weapon loadout that can make in lobby weapon disappear. You need to find how that script remove your weapon from game lobby.
For example it's a script called ox_inventory
Search for all files find something like RemoveWeaponFromPed or RemoveAllPedWeapons that is how the script can remove your weapon.
Scroll up and find block of code and clamp it by ArenaAPI
Custom HUD
In [script_name]/config/client/event.lua you can put this event to any your scripts to do some thing when lobby started and ended like hide roleplay HUD.
Last updated