[Release] Scammer's Script Collection (09/03/17)

Regarding the NoDriveBy script

I would like to ask if my understanding is correct. (I know there might be parts when you say duh, it’s literally there but bear with me)

In regards to the script, by default, it allows players to shoot out from the passenger seat.

When it goes to the other chunk of codes…

The first IF statement
I believe, from my understanding, that when there’s a person in a car, it checks if a person is in the main driver seat of the vehicle (basically the driver seat), it does not allow the civilian in the driver seat to shoot.

If I want to allow this, I’ll need to change SetPlayerCanDoDriveBy(PlayerId(), false) to SetPlayerCanDoDriveBy(PlayerId(), true).

The first ELSEIF statement
This basically re-iterates my first point that the passenger of the vehicle is able to shoot.

The first ELSE statement
If the requirement doesn’t meet either of the requirements for some reason, they’re not able to shoot.

-- 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)

The main question
Now if I understand this correctly, this means there are variables pre-set for me to use?

At least from what I learned in school, things like GetVehiclePedIsIn and GetPlayerPed are pre-defined functions that has already been made to intake certain variables.

If my theory is correct, then is there a list of pre-defined functions somewhere that I can use? and if my theory is wrong, could I be enlightened on how it works?

My objective
I’m trying to code out a scenario whereby I allow the driver to do a shootout but only with a specific weapon.

So with that, my thoughts would be something along the line of this:

if GetPedInVehicleSeat(car, -1) == playerPed and GetPedWeapon() == “WEAPON_MARKSMANPISTOL”:
SetPlayerCanDoDriveBy(PlayerID(), true)

In wordings, if the person in the driver seat is present and they’re holding a weapon called a marksman pistol, it allows them to shoot with that weapon. I don’t know GetPedWeapon() is an actual function but seeing the naming methods that has been put out, I’m just throwing something that sounds like how I think it would appear.

Thanks in advance,
Marty

That script is actually suppose to prevent people from shooting out of there vehicles, if it isnt doing that then it is broken, i used it on my server a long time ago.

Why are you posting this here? what is the problem? does it have to do with this script? if not make a topic in technical support and fill out the support template.

Why isn’t the no drive-by v2 script working?

it is for me

20charrrrrrrr

Hi there, Scammer. What would I need to do to get the player to show up in the legend on the right of the map, like it works in retail?

Can someone help with the No Drive-By V2. I am wanting to create a blacklist for say if this vehicle is in the blacklist then you can shoot from it. But if its not in the blacklist then you can’t.

I think you mean whitelist, a blacklist is used to restrict specific things, not allow them.

Not exactly. A blacklist can be used just like a whitelist. Just like the code at the bottom of this Vehicle Air Control . Tried to use the same code on the Drive By script but after 3hrs of trying to get it to work i couldn’t figure out. Was wondering if there was anybody our there who can help me get something to work.

thank you for this collection

Awesome

does anyone have a script to ban ip sir?

Yes please fix godmode

can i use " Player Blips and Above Head Display" only for admin???

Why No Drive Bys don’t work for players who connect after script was loaded?

hello @pongo1231 the no god mode doesnt work i added it in and it still dosent let people kill on and anthore

Is Player Blips and Above Head Display still work? i tried it & it does not display player in map

Awesome!

you know this is 3 years old right?

nice one