3dme with character name

Hello, I want to help with 3dme script… I want in 3dme character name - (Example:) John Don: MESSAGE.
Help please.
Thank you.

what framework do you use? esx, vrp …

I using ESX

You can create an empty variable on the client that requests the name of the user from the server, then you just have to add the name to the / me. Doing it this way only makes one request to the server per user and will avoid hundreds of unnecessary calls to the server.

Server side:

function GetCharacterName(source)
	local result = MySQL.Sync.fetchAll('SELECT firstname, lastname FROM users WHERE identifier = @identifier', {
		['@identifier'] = GetPlayerIdentifiers(source)[1]
	})

	if result[1] and result[1].firstname and result[1].lastname then
		return ('%s %s'):format(result[1].firstname, result[1].lastname)
	else
		return GetPlayerName(source)
	end
end

So this code i will put into client and how have to look me;do commands

that’s how I got it now

If you share the resource with me, I can try to do it

3dme1.rar (33.4 KB) Try it, please.

See if you can fix it up please because I need this too

So, nothing?

I have looked at the code from my mobile, it should be very easy to do. If I don’t get home very late, I will send it today, otherwise I will upload it tomorrow afternoon.

Okay, thx :slight_smile:

any updates?

I just got home, if you are in such a hurry you can try on your own, otherwise I will post it shortly.

Here you have it, sorry for the wait, yesterday I was very busy.
3dme1.rar (33.3 KB)
Img (/me):

Img (/do):

It’s okay like that?
Possibly the client code can be optimized a bit, but I have not touched it, I have only made changes on the server side

1 Like

Yes bro. Thx :slight_smile:

1 Like