[Release] /me but the text is 3D printed

Add that server side :

TriggerClientEvent('chat:addMessage', -1, {
  color = { 255, 255, 255},
  multiline = true,
  args = { "(/ME) " … GetPlayerName(source) … " (" … source … ") : " … "* the person" … TableToString(args) … " *" }
})

Or something like that.

I tried adding it but it only shows in chat and not in 3d

RegisterCommand(‘me’, function(source, args)
local text = “* " … Languages[Config.language].prefix … table.concat(args, " “) … " "
TriggerClientEvent(‘3dme:shareDisplay’, -1, text, source)
TriggerClientEvent(‘chat:addMessage’, -1, {color = { 255, 255, 255}, multiline = true, args = { “(/ME) " … GetPlayerName(source) … " (” … source … ") : " … "
the person” … TableToString(args) … " *” }
})

end)

i have problem with color in chat above head red but in chat white

You can customize the color of the text : Color of the text config.lua : line 6 color = { r = 230, g = 230, b = 230, a = 255 }.

But in chat no above head, i want color in chat

My bad, take a look at that : Chat Formatting // Colors, Bold, Underline.

Since latest artifact, everybody can see it

Are you using the latest 3dme update ?

To be honest, i dont think so. I use this for 6 months already

Hi, I’m a little bit stuck here and i wanted to know if someone knows how i can resolve this problem, so i used this resource to force an automatic message (The person pulls his phone out) when the player uses his phone (by clicking on ~/²) AND by using the animation used when you pull out the phone. This works perfectly but when i try to put the phone away (by clicking on ~/²) , the same message from earlier appears

here is the script i’m using :

Citizen.CreateThread(function()
	while true do
        Citizen.Wait(0)
		local playerPed = PlayerPedId()
			if IsEntityPlayingAnim(playerPed, 'cellphone_text_out', 'idle', 3) ~= 1 and IsControlJustPressed(0,243) then
                    TriggerServerEvent('3dme:shareDisplay3', text)
        end
	    end
    end)

what i want to do is use a specific message when the person pulls her phone out and another message when she “ranges” it.

any ideas on how i can do that ?

A better idea would be to add the trigger where you handle the keypress to pull up the phone.

Hi! I messed with the script a bit and tried to display the 3d text like seen in the gif, but the rectangle is moving around with the player. Do you know what I can do, that the rectangle doesn’t move around like that?

gif: https://gyazo.com/da37e2e06142b31abe90d3f0c5e3907f

Did you add the rectangle yourself or are you using an older version ? If you added it yourself, please share your code.

Anyone knows what could be the issue that no 3d printed output appears when I use

TriggerServerEvent('3dme:shareDisplay', 'Test ')

in another ressource client.lua?

EDIT: 3dme script is working fine with /me command

The trigger needs to be on the server side. For example :

RegisterServerEvent('trunkOpened')
AddEventHandler('trunkOpened', function()
	local Source = source
	local text = "* the person opened the trunk of the car *"
	TriggerClientEvent('3dme:shareDisplay', -1, text, Source)
end)
1 Like

I have an error on the version 2.2 in the server.lua at the line 5.

-- ## 3dme : server side

-- Command
RegisterCommand('me', function(source, args)
    local text = "* " .. Languages[Config.language].prefix .. table.concat(args, " ") .. " *"
    TriggerClientEvent('3dme:shareDisplay', -1, text, source)
end)

The line 5 is
local text = "* " .. Languages[Config.language].prefix .. table.concat(args, " ") .. " *"

i don’t find the error… Somoene can help me please ?

Tank’s for your help

What’s the error ? Have you made any modifications to the files ?

This is the two errors i have, The fist when i start the script, the second when i write /me test

This is the line 88 and 89 of the client.lua

local LANGUAGE = Config.language

TriggerEvent(‘chat:addSuggestion’, ‘/’ … Languages[LANGUAGE].commandName, Languages[LANGUAGE].commandDescription, Languages[LANGUAGE].commandSuggestion)

And i didn’t modify anything, i just download and install it

Looks like the config file has an error or its doesn’t get loaded. Full logs would help.

It’s solved, i don’t know how…

But thank’s for help !