How can I script this highlight?

Here i want to know how I can create this highlighting stuff:


Thanks for your help

By using these:

Edit: and this SetEntityDrawOutline - FiveM Natives @ Cfx.re Docs

Thank you! I will try this out soon :slight_smile:

It should be noted when using this that these are meant for FxDK, so you might experience crashes. You should also make sure you don’t use this on peds (it will crash your game).

Oh okay, are there any alternatives that I can use to bypass this problem? Because I would like to do it on Peds too

@AvarianKnight is right. While these natives can be used in a live environment, they are not meant for it.

I personally use them in a test script and so far the only crashes I experienced are with peds or having more than 1-2 outlines active at the same time. They seem stable (on my system) 100% of the time when using only one outline on an object/vehicle at a given time.

Can you give an example code? I cant get it to work with my vehicle

SetEntityDrawOutlineColor(10, 170, 210, 200) -- set color
SetEntityDrawOutlineShader(1)                -- set shader
SetEntityDrawOutline(entity, true)           -- toggle it on the entity (not inside loop, just once)
1 Like