Skip to content

Shootable players in vehicle doesn't work #10

Description

@MrGriefs

Players still cannot shoot each other whilst in a vehicle.

framework/client.lua

Lines 224 to 240 in 0a5dc4a

-- set players in vehicle shootable
Citizen.CreateThread(function()
while true do
Citizen.Wait(1)
local ped = PlayerPedId()
if IsPedInAnyVehicle(ped) then
local veh = GetVehiclePedIsIn(ped)
local seats = GetVehicleModelNumberOfSeats(veh)
for i = 1, seats do
local vehPed = GetPedInVehicleSeat(veh, i - 2)
if vehPed ~= 0 then
SetPedCanBeShotInVehicle(vehPed, true)
end
end
end
end
end)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions