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


#155

The IP whitelist V2 still doesn’t seem to work for me. I’ve changed the “placeholder” for my ip and everything works fine. But if i change the “placeholder” to any other ip, and i try to join the server gives this error in the console and i’m still able to join (without my ip being whitelisted)

Error running system event handling function for resource WhitelistIP: citizen:/scripting/lua/scheduler.lua:39: Failed to execute thread: server.lua:30: attempt to call a nil value (method 'Split')
stack traceback:
        server.lua:30: in function 'stringSplit'
        server.lua:18: in upvalue 'handler'
        citizen:/scripting/lua/scheduler.lua:124: in function <citizen:/scripting/lua/scheduler.lua:123>
stack traceback:
        [C]: in function 'error'
        citizen:/scripting/lua/scheduler.lua:39: in field 'CreateThreadNow'
        citizen:/scripting/lua/scheduler.lua:123: in function <citizen:/scripting/lua/scheduler.lua:92>

#156

how do i remove the blip from the minimap only but keep the blip above the head?


#157

As of right now pretty much the only solution is the disable scripthook on your server.


#158

Okay so when I try to put the whitelist zip in nothing happens with my server I can still join and my friends can but I’ve not changed anything inside of the whitelistIP folder and files does anyone know how I can make this work ???


#159

The script is broken, idk why but it can’t seem to filter the IP’s/Steam Identifiers correctly.


#160

so for the whitelist do we need to just get everyones’s ipv4 address


#161

Is it possible to make a command to set the time? Something like /time morning?


#162

hey, i modified your model blacklist people to be able to whitelist people from the model blacklist. Could i Release it on fivem’s forum, of course giving you credits?


#163

Still broke, I get this error and it still lets me join.


#164

getting this error

Error running system event handling function for resource WhitelistIP: citizen:/
scripting/lua/scheduler.lua:41: Failed to execute thread: server.lua:30: attempt
to call a nil value (method ‘Split’)
stack traceback:
server.lua:30: in function 'stringSplit’
server.lua:18: in upvalue 'handler’
citizen:/scripting/lua/scheduler.lua:175: in function <citizen:/scriptin
g/lua/scheduler.lua:174>
stack traceback:
[C]: in function 'error’
citizen:/scripting/lua/scheduler.lua:41: in field 'CreateThreadNow’
citizen:/scripting/lua/scheduler.lua:174: in function <citizen:/scriptin
g/lua/scheduler.lua:138>


#165

Replace the Stringsplit function in the server.lua file with

function stringsplit(inputstr, sep)
    if sep == nil then
        sep = "%s"
    end
    local t={} ; i=1
    for str in string.gmatch(inputstr, "([^"..sep.."]+)") do
        t[i] = str
        i = i + 1
    end
    return t
end

#166

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


#167

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.


#169

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.


#170

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


#171

it is for me

20charrrrrrrr


#172

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?


#173

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.


#174

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


#175

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.