RegisterCommand('me', function(source, args)
local text = '' -- edit here if you want to change the language : EN: the person / FR: la personne
for i = 1,#args do
text = text .. ' ' .. args[i]
end
text = text .. ' '
TriggerServerEvent('3dme:shareDisplay', text)
end)
RegisterCommand('me', function(source, args)
local text = '' -- edit here if you want to change the language : EN: the person / FR: la personne
for i = 1,#args do
text = text .. ' ' .. args[i]
end
text = text .. ' '
TriggerServerEvent('3dme:shareDisplay', text)
end)
Has anyone been able to get the text to display over the player that sent the message? I have been tweaking this script for a few, and this is the only thing that’s stumping me. Right now the text displays over the client no matter who sends it, I’d love to have it display over the ped that sent it. Or am I mistaken and that is way beyond the scope of this script?
EDIT: Correction, after more troubleshooting, it appears this script in it’s base form does what I want. It was only when I tried implementing RP names that it stopped working that way.
EDIT2: So I guess my new question is more about how I could get roleplay names working properly. I think that people that are having the issue wherein everyone can see the text server wide are attempting to integrate the version you posted with identity integration, because that is where I started when I was trying to get RP names working.
Can you please also add “do” command? With other colors that “me”? I tried to modify the script so i can edit the colors of diffrent commands but it’s pretty hard to modify it that way. (kinda new to lua, still getting used to it )
@Elio It was the quick RP name implementation that you added that I started with. I changed some things and tested, it works correctly for the client, but all /me text appears over the clients head, even when posted by another player. I think it has something to do with the fact that the implementation is occurring on the server side instead of client. I tried to rewrite the ESX implementation to see if I could get it to work, but I got pulled away to other things. I’m currently using the resource without RP names and I like it, but I’d love to figure it out at some point. If you have thoughts, I would gladly help test; or if not, I will probably work on it again at some point soon.
Edit: it’s worth mentioning that I tested your version unmodified with the same result.
@Elio Just finished modifying your version of the script. I added a simple config file to it so people can modify it on the spot, as well as a second command “do”. I will credit you as an original creator tho since i used a portion of your script. If you want i can post it on git so anyone can download it.