Skip to content

Instantly share code, notes, and snippets.

View ImXirvin's full-sized avatar
🥚
why read documentation when you can debug

Xirvin ImXirvin

🥚
why read documentation when you can debug
View GitHub Profile
@ihyajb
ihyajb / hack.lua
Created September 24, 2023 09:18
FBI Server Room Computer Hack
local function CallScaleformMethod(scaleform, method, ...) --? i dont remember where i stole this function from but, credit to them lol
local t
local args = { ... }
BeginScaleformMovieMethod(scaleform, method)
for k, v in ipairs(args) do
t = type(v)
if t == 'string' then
PushScaleformMovieMethodParameterString(v)
elseif t == 'number' then
if string.match(tostring(v), "%.") then
@Rubylium
Rubylium / entity.lua
Created February 18, 2021 17:10
FiveM entity selection using NUI mouse
-- usage: local hit, endCoords, surfaceNormal, entityHit, entityType, direction = ScreenToWorld(flags, toIgnore)
function ScreenToWorld(flags, toIgnore)
local camRot = GetGameplayCamRot(0)
local camPos = GetGameplayCamCoord()
local posX = GetControlNormal(0, 239)
local posY = GetControlNormal(0, 240)
local cursor = vector2(posX, posY)
local cam3DPos, forwardDir = ScreenRelToWorld(camPos, camRot, cursor)
local direction = camPos + forwardDir * raycastLength