Are you using the latest version ? It should’ve been fixed.
Indeed, I did not checked the latest version patched the issue with OneSync Infinity
How can i automatize this script, i mean, like when you open the truck with the G key, and it prints to the chat: /me [Leo Smith] has opened the trunk or /do [Leo Smith] has been shot in the leg or if you press F1 cellphone /me [Leo Smith] is bringing up his cellphone.
On the server side, you can use TriggerClientEvent('3dme:shareDisplay', -1, text, source)
with text being the text to display and source the server-id of the player on which you want the text to appear.
Okay it’s solved
Can you show me an example please?
Let’s say someone just opened the trunk of a car, you will have to trigger an event from the client to the server. We will call this event trunkOpened
.
Now, I will give the details of this event (server side) :
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)
I just figured out earlyer, i didn’t readed the docs… xD
Thanks btw!
How to display players name and id in chat before me message? Like in photo
Replace line 29 of the server.lua
by this :
local text = GetPlayerName(source) .. " (" .. source .. ") : " .. "* the person" .. TableToString(args) .. " *"
Thanks, but how to display the entered command and player id?
The string to achieve such a thing is :
"(/ME) " .. GetPlayerName(source) .. " (" .. source .. ") : " .. "* the person" .. TableToString(args) .. " *"
You will have to take a look at older versions to see how to print the message in the chat.
Lots of respect for your responses man, I’ve learned a lot just by scrolling through here. It seems you have along the way as well
if i don’t need to use /me just type and enter. text will show above my charactor. how can i do???
Replace lines 28 to 31 (server.lua
) by this :
AddEventHandler('chatMessage', function(_source, _author, _text)
local text = "* the person" .. _text .. " *"
TriggerClientEvent('3dme:shareDisplay', -1, text, _source)
end)
thank u <3
How to add me, 3d and in the chat??? sorry for my english