Closed PVRAMID closed 7 months ago
How is the server registering the me command?
How is the server registering the me command?
Using register command.
I assume the handler is grabbing the raw command variable and stripping the first two characters, what if you strip 'me ' that works in our case
I'm not sure who this was directed at, however;
blah
omitting the /me
does not work./me
, me
or F8 me
is not supported on the serverI just cant understand how the Streamdeck plugin would allow e emoteName
to work, but doesn't allow me MeText
to work?
Is there something hardcoded into the plugin that looks for me
?
What's even more confusing, is that inside the plugin, I send the command me Testing
and inside the server it outputs me Testing
therefore it looks like when sending me
the plugin is potentially actually sending me me Testing
, or the server for some reason is appending another me
to the original me
but only when the plugin sends it.
Very confusing.
@FlawwsX - I don't suppose you'd be happy to send the snippet of code where the me
command is registered?
So I did another test, running two commands concurrently, just to see what happens.
e medic; me Checks ~r~Injuries~s~, looks for ~r~wounds~s~ and ~r~bleeding~s~
Result: https://i.pvramid.gg/vvTyD-Uneven-1111.gif
I also did a test with a wait
e medic; wait 250; me Checks ~r~Injuries~s~, looks for ~r~wounds~s~ and ~r~bleeding~s~
Result: https://i.pvramid.gg/4PU8s-Wise-1111.gif
Strangely enough, I get the output
e Checks Injuries, looks for wounds and bleeding
Where I expected
me Checks Injuries, looks for wounds and bleeding
So I did another test, running two commands concurrently, just to see what happens.
e medic; me Checks ~r~Injuries~s~, looks for ~r~wounds~s~ and ~r~bleeding~s~
Result: https://i.pvramid.gg/vvTyD-Uneven-1111.gif I also did a test with a waite medic; wait 250; me Checks ~r~Injuries~s~, looks for ~r~wounds~s~ and ~r~bleeding~s~
Result: https://i.pvramid.gg/4PU8s-Wise-1111.gifStrangely enough, I get the output
e Checks Injuries, looks for wounds and bleeding
Where I expectedme Checks Injuries, looks for wounds and bleeding
I would suggest they use something like this to process it, this is our /me
handler which works well, their implementation of "stripping the first 2 characters" is causing issues both in the plugin but also when chaining commands. Your input above is /me xx
with a space at the start, FiveM is handling this and sending it to the me
command register, which is then taking the full raw command (which includes the space), strips off the first 2 characters then displays that. So it is stripping the space and the m, leaving the e and the rest of the string.
This approach just strips me
from the string instead:
RegisterCommand('me', function(source, args, raw)
local text = string.gsub(raw, "me ", "")
text = string.gsub(text, "ME ", "")
TriggerServerEvent('utils:shareMeDisplay', text)
end)
This is not infallible however, if a user types /Me
or /mE
, maybe a regex would be more suitable.
I presume there's no update that can be pushed so users of the plugin don't have to rely on developers being willing to change their codebase for the few? I imagine that the plugin could be updated to cater for these types of issues? :D
RegisterCommand("me", function(source, args, rawCommand)
local msg = rawCommand:sub(3)
local plyPed = GetPlayerPed(source)
TriggerClientEvent('3dme:triggerDisplay', -1, msg, NetworkGetNetworkIdFromEntity(plyPed))
end, false)
This is how we do it!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
I'm using version 1.1.0 of the FXCommands Plugin downloaded through the Elgato Marketplace for: Streamdeck MK2
I've created a command where On Press it executes
me Testing
However when executing this in the server it displays "me Testing" where the expected result should be "Testing"
On the server I'm playing, you can run a /me command though different methods.
me Hello
/me Hello
me Hello
However ALL of these combinations will produce the same output through the Streamdeck plugin as shown above.
Using Emotes however, works completely fine, emotes in this server are executed by the following methods;
e sleep
/e sleep
e sleep