[ESX] Useful tool for pick up coords with Discord

WITH THIS SYSTEM YOU CAN TAKE A COORD IN 5 SECONDS!!!

This script allows you to take coordinates through an ESX input and be printed on the discord for easy copying.

All you need is a discord with a channel and the script implemented on the server.

You can create the necessary webhook by clicking on the channel settings. You do not need any bot.
fce24489b22543124c3f7d24fbd7929b

How to use

  1. Download tm1_getcoords and put the script into the server.
  2. Create a webhook in a channel of our discord server.
  3. Replace in the script the webook that comes with yours
  4. You can use /gc for the next format : {x = n1, y = n2, z = n3} and /gc1 for n1,n2,n3 (this is useful for vectors)
  5. You can introduce a name to find the coord in the discord.

An Image of discord with this system.

Gityab

6 Likes

Please don’t use the chatMessage event to handle commands, instead use RegisterCommand native.

@TheIndra Updated

Great Release! Works Fantastic

1 Like

This seems very unnecessarily complicated and could likely be done more efficiently with less than 5 lines of code on the client and server and without requiring ESX. Something like

RegisterCommand('gc', function(source, args, rawCommand)
	local coords = GetEntityCoords(GetPlayerPed(-1))
	TriggerServerEvent('logthisthing', coords.x, coords.y, coords.z)
end, false)

And server side could look like

RegisterServerEvent('logthisthing')
AddEventHandler('logthisthing', function(x, y, z)
	PerformHttpRequest(blablabla with da x y z)
end)

This is a much more simple way to get coords and log them to Discord without requiring other resources.

1 Like

Thanks a lot Dude, Work fine :slight_smile:

1 Like

How can I get permissions? It says Access denied for command :frowning:

3 Likes

You can change this

RegisterCommand("gc", function(source, args, rawCommand)
    local source = source
    TriggerClientEvent('tm1_getcoords', source)
end, true)

RegisterCommand("gc1", function(source, args, rawCommand)
    local source = source
	TriggerClientEvent('tm1_getcoords1', source)
end, true)

for

RegisterCommand("gc", function(source, args, rawCommand)
    local source = source
    TriggerClientEvent('tm1_getcoords', source)
end, false)

RegisterCommand("gc1", function(source, args, rawCommand)
    local source = source
	TriggerClientEvent('tm1_getcoords1', source)
end, false)

Anyway, you can grant yourself permissions through ACE.

Why you don’t register the command directly on server-side? With OneSync you can now use GetEntityCoords(source) on server-side

same.

pls convert qbcore