I’m trying to make a toggle for overhead player names but I’m fairly new to lua and trying to convert it from lua to C sharp has given me some problems, if anyone has any tips or is willing to help me I’d appreciate it, the other route I was willing to go was using the c# application to just call a lua event but iv never done it and can’t really find anything on the topic.
this is what i have and it works however it just shows my name above my head and not anyone elses, im using Citizen.FX, and NativeUI references.
int ped = GetPlayerPed(PlayerId());
int gamerTagID = CreateMpGamerTag(ped, GetPlayerName(PlayerId()), false, false, "", 0);
SetMpGamerTagVisibility(gamerTagID, 0, true);
I also see a couple of threads on the forum when searching for CreateMpGamerTag. Perhaps you will find some valuable information there too. The most common way I see overhead player names being drawn is with drawing text in 3d space. I.e. https://pastebin.com/xxYAjj9T
So where “test” is is the name above the head correct? So if there a function in citizen.core like “GetPlayerName” or something do not everyone’s name will be test? Also I’ll look into the rest of the post in a bit at work right now.
also i saw drawing it in 3D however its in LUA
I have it working but it doesnt show others names only mine.
int ped = GetPlayerPed(PlayerId());
int gamerTagID = CreateMpGamerTag(ped, GetPlayerName(PlayerId()), false, false, "", 0);
SetMpGamerTagVisibility(gamerTagID, 0, true);
any input on above code? cause its using GetPlayerPed but picking up my ID and it shows my name above my head but no one elses, iv tried GetPlayerPed(-1); – For All clients and that didnt work so im kinda stuck where i have it only showing on my screen my name and it does the same for everyone else as well.