[HELP] NoDriveBy

Hi!

Im kinda new to Dev & moddingpart, so today i tried to get NoDriveBy to work correct, And that wasnt that easy. The problem is that the Passangerguy can Point and reach out the gun, but just for like 1sec max! Then he puts the hand back into the car, and repeating it again, over and over.

Anyone have a tip, how to make the passangerguy to keep hes hand out of the window with both Gun and no gun.

Hope you Hyperdevs understand my bad english.

Posting the code you have already would help us help you.

Theres a script called NoDrive by. Install that it works fine :slight_smile:

– CONFIG –

– Allow passengers to shoot
local passengerDriveBy = true

– CODE –

Citizen.CreateThread(function()
while true do
Wait(1)

	playerPed = GetPlayerPed(-1)
	car = GetVehiclePedIsIn(playerPed, false)
	if car then
		if GetPedInVehicleSeat(car, -1) == playerPed then
			SetPlayerCanDoDriveBy(PlayerId(), false)
		elseif passengerDriveBy then
			SetPlayerCanDoDriveBy(PlayerId(), true)
		else
			SetPlayerCanDoDriveBy(PlayerId(), false)
		end
	end
end

end)

Using this one atm. So finger and shot, but just for like a second then he reach in and reach out with the gun again while i holding Mouse2 down.

Change Wait (1) to Citizen.Wait(0)

I will try that! Thanks alot @ChristopherM :smiley:

Still have same problem =/