Hi, This is the command i have in my es_extended/server/commands… Mine is set to superadmin only but you can change that.
TriggerEvent('es:addGroupCommand', 'tp', 'superadmin', function(source, args, user)
local x = tonumber(args[1])
local y = tonumber(args[2])
local z = tonumber(args[3])
if x and y and z then
TriggerClientEvent('esx:teleport', source, {
x = x,
y = y,
z = z
})
else
TriggerClientEvent('chatMessage', source, "SYSTEM", {255, 0, 0}, "Invalid coordinates!")
end
end, function(source, args, user)
TriggerClientEvent('chat:addMessage', source, { args = { '^1SYSTEM', 'Insufficient Permissions.' } })
end, {help = "Teleport to coordinates", params = {{name = "x", help = "X coords"}, {name = "y", help = "Y coords"}, {name = "z", help = "Z coords"}}})
