Players still cannot shoot each other whilst in a vehicle.
|
-- 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) |
Players still cannot shoot each other whilst in a vehicle.
framework/client.lua
Lines 224 to 240 in 0a5dc4a