#First Person shooting from vehicles

1 messages · Page 1 of 1 (latest)

floral nova
#

add this in any client side lua

I put mine in qbx smallresources

makes the player go into first person POV when shooting from a vehicle
if on a motorcycle they go FP and can not use the throttle

I didnt create this saw it a long time ago and figured id share it here too

--first person vehicle shooting

local VehicleFP = true
local BikeFP = true


if VehicleFP then
    CreateThread(function()
        while true do
            sleep = 1000
            if IsPedInAnyVehicle(PlayerPedId()) then
                sleep = 1
                if IsControlJustPressed(0, 25) then
                    SetFollowVehicleCamViewMode(3)
                elseif IsControlJustReleased(0, 25) then
                    SetFollowVehicleCamViewMode(0)
                end
            end
            Wait(sleep)
        end
    end)
end


if BikeFP then
    CreateThread(function()
        while true do
            sleep = 1000
            local _, weapon = GetCurrentPedWeapon(PlayerPedId())
            local unarmed = `WEAPON_UNARMED`
            if IsPedOnAnyBike(PlayerPedId()) and weapon ~= unarmed then
                sleep = 1
                if IsPlayerFreeAiming(PlayerId()) then
                    --HideHudComponentThisFrame(14)
                    DisableControlAction(1, 71, true) --Key: W (veh_accelerate)
                end
            else
                sleep = 1000
            end
            Wait(sleep)
        end
    end)
end```
fading ether
floral nova
#

Not if you force aim to shoot

fading ether
#

Are there any snippets for that?

floral nova
#

Its a config option in ox inventory pretty sure

fading ether
fading ether
floral nova
#

you have it like this?

setr inventory:aimedfiring true

in ox.cfg

floral nova
#

if your not in a car can you shoot without aiming? cause this works for me

fading ether
floral nova
#

where did you put the snippet?

fading ether
floral nova
fading ether
floral nova
#

i have mine there as well and it works idk what to tell ya bud