Created
September 2, 2023 10:01
-
-
Save JeViCo/5d73c40408c1ab7b6ce7ed38e0cb80d4 to your computer and use it in GitHub Desktop.
Телепорт по xyz координатам
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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