A simple anti cheat that uses decoring system in GTA V to block unauthorised car/object spawns

The reason why start DexAC should be at the bottom is it only fires this event once, when the client boots up. So no need for that since it won’t fire a second time unless server owner restarts DexAC.

That’s how mine works too, and I agree with you. But I was told that a Lua injector can have listeners as they join. So I made untracable client events just in case that is true.

LUA Engine inits when you actually join the server… like… your ordinary troll would not be able to do that.

Are there any great pen-testers with C++ knowledge around that would try this out for us? :3

I’m a web pentester. Unfortunately only rough C++ knowledge. :confused: Mainly a PHP guy. But I do plan on testing some stuff client side. I want to see if there’s a way to get the “okay” to experiment without getting a global ban.

@nitrogen I can imagine you hate being tagged buuuut…

is there’s a way to get the “okay” to experiment with cheats to build anti-cheats without getting a global ban?

I sent an email to pr@fivem.net to see what to do.

1 Like

Good idee. i think one anti-cheat who checking the players game before connecting on the serveur if his/her files have a cheat they can’t join the serveur…

Hey dexelir i managed to get it to work for esx.vehicle spawn function (as per your tutorial)
Wondering if i can get some help implementing it to a different script :o

Well try to understand what is going on in my tutorial then you can implement DexAC into every script you want to use. I will give you an another example because I have nothing to do right now xD:

Lets assume that we have a script that only spawns T20 then paints it red. It would look like this:

function createcarformepls()
 local t20VehicleorAnyOtherName = CreateVehicle(GetHashKey("t20"),1.0,1.0,1.0,1.0,false,false)
 SetVehicleCustomPrimaryColour(t20VehicleorAnyOtherName,255,0,0)
end

do you see how CreateVehicle is stored in the local “t20VehicleorAnyOtherName”?

If I want to make this car bypass DexAC, I need to do this:

local decorName = nil
local decorInt = nil
RegisterNetEvent("dexac:HereAreYourDecors")
AddEventHandler("dexac:HereAreYourDecors", function( decorN, decorI)
	decorName = decorN
	decorInt = decorI
end)

function createcarformepls()
 local t20VehicleorAnyOtherName = CreateVehicle(GetHashKey("t20"),1.0,1.0,1.0,1.0,false,false)
 DecorSetInt(t20VehicleorAnyOtherName ,decorName,decorInt)
 SetVehicleCustomPrimaryColour(t20VehicleorAnyOtherName,255,0,0)
end

As you can see I only changed

DecorSetInt(vehicle,decorName,decorInt)

to

DecorSetInt(t20VehicleorAnyOtherName ,decorName,decorInt)

because CreateVehicle has stored the vehicle into the local t20VehicleorAnyOtherName.

Try to understand this example and re-create it for every script you want to use with DexAC.

1 Like

THanks for the reply!
I actually figured this out before your reply, amazing script :slight_smile:

1 Like

Can I bump my thread? Is that even allowed? I don’t know. I shall learn by bumping it.

What even is the point of bumping it, if people are genuinely interested they would either find it by searching or just having it by chance show up somewhere, there’s no real need to bump it especially when the search feature exists.

Well a bloody c*nt sells this piece of crap. I bump it so even an idiot can see&download it.

Hey dexelir! Looking for some help :slight_smile:
trying to integrate this script:
https://forum.cfx.re/t/release-police-interaction-script/
however it seems to be conflicting with dexac, Vehicle seems to disappear when we pull over.
i am trying to find the place to add the code in.
Let me know if you find what it would be

Does this work with VRP?

It works with any framework. You must modify the code in the framework to make it to work, like the OP says.

1 Like

It was more if anyone got it working. I i will this later on.

So if i understand it right with “Put to next line”

Is that
local vehicle = CreateVehicle(model, coords.x, coords.y, coords.z, heading, true, false)
Under or after the code?

I would suggest that you should learn a little bit of LUA first. Before trying to implement such complex-but-not-complex systems into vRP.

Closed on @Dexelir’s request.