Yeah I’ve heard that. I have no idea why. I have a script to restart the script on start.
Great idea. Will try this out later
Thanks for the quick reply. Can I download it somewhere?
I restarted the resource and rejoined the server to find out that it stopped working again. There is something in this resource that belongs to the client script.
Ok I found it. You initialize the ped in the config. The ped doesn’t exist when you load in the server so the playerped variable will return nill when someone joins the server.
hey man, i just remove the setting.lua and add do these changes to the cl_misc and its working now without need to restart server or script. it will start working when server come online
local sc0tt_driveby = {}
local driveby_player = PlayerId()
local sc0tt_driveby_driveby = true -- can anybody shoot?
local sc0tt_driveby_driver = false -- can driver shoot?
local sc0tt_driveby_rear = false -- can shoot behind?
local sc0tt_driveby_dist = -8.0 -- how far behind the ped is the cut off point? (the closer it is, the less backwards they will be able to shoot)
-- stop shooting behind you fucks
function lookingBehind()
local coordA = GetEntityCoords(GetPlayerPed(-1), 1)
local coordB = GetOffsetFromEntityInWorldCoords(GetPlayerPed(-1), 0.0, sc0tt_driveby_dist, 0.0)
--DrawMarker(1,coordB,0,0,0,0,0,0,1.001,1.0001,0.4001,0,155,255,175,0,0,0,0)
local onScreen,_x,_y=World3dToScreen2d(coordB.x,coordB.y,coordB.z)
return onScreen
end
Util.Tick(function()
if IsPedInAnyVehicle( GetPlayerPed(-1)) then
local canshoot = true
if sc0tt_driveby_driver == false then
local veh = GetVehiclePedIsIn(GetPlayerPed(-1),false)
if GetPedInVehicleSeat(veh, -1) == GetPlayerPed(-1) then
canshoot = false -- no shooty shooty driver
end
end
if sc0tt_driveby_driveby == false then
canshoot = false -- no shooty shooty ever
end
if canshoot and not sc0tt_driveby_rear then
canshoot = not lookingBehind()
end
SetPlayerCanDoDriveBy(driveby_player, canshoot)
end
end)
SetPlayerCanDoDriveBy(driveby_player, true)
check my last replay try if it works
this worked
Thanks! This has been added into the main GitHub.
How could I whitelist the PD job for this?
Excellent
I am trying to install this but it won’t work. Where do I put the files at in my server?