Skip to content

Instantly share code, notes, and snippets.

View ilya-pirogov's full-sized avatar

Ilya Pirogov ilya-pirogov

View GitHub Profile
@ilya-pirogov
ilya-pirogov / egps.lua
Last active October 30, 2023 07:16 — forked from SquidLord/egps.lua
egps: A* pathfinding library for Minecraft ComputerCraft turtles.
-- This library provide high level turtle movement functions.
--
-- Before being able to use them, you should start the GPS with egps.startGPS()
-- then get your current location with egps.setLocationFromGPS().
-- egps.forward(), egps.back(), egps.up(), egps.down(), egps.turnLeft(), egps.turnRight()
-- replace the standard turtle functions.
-- If you need to use the standard functions, you
-- should call egps.setLocationFromGPS() again before using any egps functions.
-- Gist at: https://gist.github.com/SquidLord/4741746
+ cat /proc/meminfo
MemTotal: 16380188 kB
MemFree: 5078732 kB
MemAvailable: 7298544 kB
Buffers: 197704 kB
Cached: 2314136 kB
SwapCached: 108680 kB
Active: 7717128 kB
Inactive: 2753152 kB
Active(anon): 6676140 kB
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CitizenFX.Core;
using CitizenFX.Core.Native;
using CitizenFX.Core.UI;
using JetBrains.Annotations;
TriggerEvent('skinchanger:loadDefaultModel', sex, function()
-- сюда поместить код который должен быть исполнен когда дефолтный скин загрузится
end)
Citizen.CreztrThread(function()
local vehicle
while true
local newVehicle = GetVehicle(...)
if newVehicle ~= vehicle then
-- переменная изменилась
end
local CurrentAction
-- цикл для проверки что мы внутри маркера
Citizen.CreateThread(function()
local ped = GetPlayerPed(-1)
local coords = GetEntityCoords(playerPed)
while true do
Wait(50) -- кадлые 50 фреймов поскольку GetDistanceBetweenCoords тяжелая операция
if GetDistanceBetweenCoords(coords, Config.MarkerSet.x, Config.MarkerSet.y, Config.MarkerSet.z, true) < Config.MarkerSize.x then
if CurrentAction ~= nil then
if IsPedInAnyVehicle(playerPed, false) then
-- тут твой код
else
-- оригинальный код
end
end
{
"height":"150",
"impression_group":"6ebbc172-57c8-4f24-968e-905e1a309bda",
"analytics":[
],
"width":"100%",
"cookie_syncs":[
],
#!/usr/bin/env bash
set -e -o xtrace
VERSION=$MINECRAFT_VERSION-$FORGE_VERSION-$MINECRAFT_VERSION
FORGE_INSTALLER=forge-$VERSION-installer.jar
FORGE_UNIVERSAL=forge-$VERSION-universal.jar
echo eula=true > eula.txt