Skip to content

Instantly share code, notes, and snippets.

@JeViCo
Created September 2, 2023 10:01
Show Gist options
  • Save JeViCo/5d73c40408c1ab7b6ce7ed38e0cb80d4 to your computer and use it in GitHub Desktop.
Save JeViCo/5d73c40408c1ab7b6ce7ed38e0cb80d4 to your computer and use it in GitHub Desktop.
Телепорт по xyz координатам
addCommandHandler("tpTo", function(player, _, x, y, z)
local x = tonumber(string.gsub(x, ",", ""), 10)
local y = tonumber(string.gsub(y, ",", ""), 10)
local z = tonumber(string.gsub(z, ",", ""), 10)
if (not x) or (not y) or (not z) then
return
end
if (player.vehicle) then
setElementPosition(player.vehicle, x, y, z)
else
setElementPosition(player, x, y, z)
end
end)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment