Skip to content

Instantly share code, notes, and snippets.

addEventHandler("onClientClick", root, function(button, state, _,_,_,_,_, element)
if (button ~= "left") or (state ~= "up") then
return
end
if (isElement(element)) then
local x, y, z = getElementPosition(element)
local _, _, rot = getElementRotation(element)
outputConsole(inspect{x, y, z, rot})
end
local recording = false
local dist = 0
local time = 0
local position
local timer
function updateDist()
dist = dist + getDistanceBetweenPoints3D(position, me.vehicle.position)
position = me.vehicle.position
@JeViCo
JeViCo / tpTo.lua
Created September 2, 2023 10:01
Телепорт по 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
@JeViCo
JeViCo / private-fork.md
Last active August 19, 2023 18:33
Creating private fork of public repo
  1. Create empty private repo
  2. Bare clone a public repo, and mirror push it to the private repo.
git clone --bare https://github.com/exampleuser/public_repo.git
cd public_repo.git
git push --mirror https://github.com/yourname/private_repo.git
  1. Register remote repository with public repositoryPermalink
git clone https://github.com/yourname/private_repo.git