[Release] Optimized player IDs above head

This script is based off this script that puts player source IDs above players’ heads.
https://pastebin.com/xxYAjj9T Credits to MrDaGree (He has given me permission)

It is highly unoptimized however, it can spike from ~0.30ms to ~1.20ms.
I have optimized it to ~0.02-0.03ms.


or https://pastebin.com/rc38JH6g

Example:

(Feel free to make PRs)
Enjoy! And lets make FiveM servers less laggy

30 Likes

You should include a __resource.lua into the download

Also maybe a direct download for non- GitHub users

Otherwise looking good, by looking at the code :stuck_out_tongue:

2 Likes

Sure thing, have added __resource.lua and a direct link

3 Likes

Maybe use SetDrawOrigin() instead of World3dToScreen2d() as the one you are using is always a frame behind

1 Like

Would you mind if I use this optimisation in my iteration of this code?

1 Like

Go for it

4 Likes

my guy robbster

1 Like

any screenshots?

Any ss? Its only ID?

1 Like

Very nice snippet, thanks very much for sharing!

2 Likes

Can we add player names too :?

nice :slight_smile:

1 Like

can we add the role play name instead their steam names?

How do you make this show your own id?

can we add the role play name instead their steam names?

This will depend on the framework you are using

How do you make this show your own id?

Just remove this if statement if GetPlayerPed(id) ~= GetPlayerPed(-1) then

i use esx how to do that ?

You do the same thing obviously…

is there a way i can have it only show with a hot key toggle on/off?

13 Likes

I second this! Would be nice to show on key command

5 Likes