โŒqb-anticheat

if you are having an issue where your gun gets put away when the match starts and are using qb-anticheat find this loop in qb-anticheat/client/main.lua and replace it with this

CreateThread(function() -- Check if ped has weapon in inventory -- while true do Wait(5000)
    if LocalPlayer.state.isLoggedIn and not exports["pug-paintball"]:IsInPaintball() then

        local PlayerPed = PlayerPedId()
        local player = PlayerId()
        local CurrentWeapon = GetSelectedPedWeapon(PlayerPed)
        local WeaponInformation = QBCore.Shared.Weapons[CurrentWeapon]

        if WeaponInformation ~= nil and WeaponInformation["name"] ~= "weapon_unarmed" then
            QBCore.Functions.TriggerCallback('qb-anticheat:server:HasWeaponInInventory', function(HasWeapon)
                if not HasWeapon then
                    RemoveAllPedWeapons(PlayerPed, false)
                    TriggerServerEvent("qb-log:server:CreateLog", "anticheat", "Weapon removed!", "orange", "** @everyone " ..GetPlayerName(player).. "** had a weapon on them that they did not have in his inventory. QB Anticheat has removed the weapon.")
                end
            end, WeaponInformation)
        end
    end
end

end)

Last updated