Skip to content

Instantly share code, notes, and snippets.

View VIRUXE's full-sized avatar

Flávio Pereira VIRUXE

View GitHub Profile

Cursor's Memory Bank

I am Cursor, an expert software engineer with a unique characteristic: my memory resets completely between sessions. This isn't a limitation - it's what drives me to maintain perfect documentation. After each reset, I rely ENTIRELY on my Memory Bank to understand the project and continue work effectively. I MUST read ALL memory bank files at the start of EVERY task - this is not optional.

Memory Bank Structure

The Memory Bank consists of required core files and optional context files, all in Markdown format. Files build upon each other in a clear hierarchy:

flowchart TD
@VIRUXE
VIRUXE / InstallDotNet452.ps1
Last active June 12, 2024 16:08
Download and Install .NET Framework 4.5.2 (required for C# development on FiveM)
Write-Host "Downloading .NET Framework 4.5.2..."
$outputFile = "dotNetFramework452.exe"
Try {
Invoke-WebRequest -Uri "https://go.microsoft.com/fwlink/?linkid=397673&clcid=0x409" -OutFile $outputFile
If (Test-Path $outputFile) {
Write-Host "Download complete. Installing..."
Start-Process $outputFile -Args "/quiet /norestart" -Wait
Write-Host ".NET Framework 4.5.2 installed successfully."
} Else {
@ihyajb
ihyajb / carscaleform.lua
Created December 26, 2023 19:02
carscaleform.lua
--* idc if you use this in public / private script *--
--* But if you use *most / all* of my code credit would be nice 💖 *--
local MaxCars = 20 --Max is a HARD CAP OF 20, only make this number lower!
local function func_7050(string)
local scaleform = RequestScaleformMovie(string)
repeat
Wait(100)
until HasScaleformMovieLoaded(scaleform)
return scaleform
@tabarra
tabarra / README.md
Created April 19, 2023 06:52
Listing FiveM/GTA5 vehicle model classes/types that diverge.

If you need to spawn a vehicle on the server side, you can use CreateVehicleServerSetter(), but the issue is that you need the vehicle type, but on the server there is no native to get it from a vehicle model.
In txAdmin this was initially "solved" by getting the vehicle class on the client and sending that to the server use it as a type when creating the vehicle. The logic used on the client is to check for the class on the vehClassNamesEnum table and assuming automobile for classes not on that table.

Later it was noticed that the server needs "type" instead of "class", and there is also no GetVehicleTypeFromName() on the client.
To solve this issue, it was created a lookup table to fix mismatched types.

This gist shows how to generate that table.
This must be run every now and then since new vehicles are added to the game on new DLC releases.

@userMacieG
userMacieG / engine.lua
Last active March 22, 2024 12:19
Turn engine on and off via key (ox_lib)
lib.onCache('ped', function(value)
SetPedConfigFlag(value, 241, true) -- PED_FLAG_DISABLE_STOPPING_VEHICLE_ENGINE
SetPedConfigFlag(value, 429, true) -- PED_FLAG_DISABLE_STARTING_VEHICLE_ENGINE
end)
lib.addKeybind({
name = 'engine',
description = 'Engine',
defaultKey = 'Y',
onPressed = function(self)
@xXTurnerLP
xXTurnerLP / tp.lua
Last active February 25, 2024 19:42
FiveM Precise waypoint teleport script. Always teleports at the top most level, so if you mark a building it will teleport to the top of that building (No permissions, client side)
RegisterCommand("tp", function(source, args, rawCommand)
local waypointBlip = GetFirstBlipInfoId(GetWaypointBlipEnumId())
local blipPos = GetBlipInfoIdCoord(waypointBlip) -- GetGpsWaypointRouteEnd(false, 0, 0)
local z = GetHeightmapTopZForPosition(blipPos.x, blipPos.y)
local _, gz = GetGroundZFor_3dCoord(blipPos.x, blipPos.y, z, true)
SetEntityCoords(PlayerPedId(), blipPos.x, blipPos.y, z, true, false, false, false)
FreezeEntityPosition(PlayerPedId(), true)
@tabarra
tabarra / admins.json
Last active February 28, 2025 05:58
Temporary admins file for txAdmin, please add it to txData/admins.json. The password is masterpassword123.
[
{
"name": "txmaster",
"master": true,
"password_temporary": true,
"password_hash": "$2a$12$JterWfFQx1abyi.OBKTIW.mOiHl7wrlyaTnz21SmygI20qO2xIdu2",
"providers": {},
"permissions": []
}
]
local scopes = {}
AddEventHandler("playerEnteredScope", function(data)
local playerEntering, player = data["player"], data["for"]
if not scopes[player] then
scopes[player] = {}
end
scopes[player][playerEntering] = true
@nathanctech
nathanctech / proxy-nginx-fxserver.md
Created May 1, 2020 14:23
FXServer Reverse Proxy

Proxying FiveM Connections using Nginx

As of server version 2377, support was added to FiveM to run a custom streaming proxy similar to cfx.re, but proxying the data connection (UDP) as well. This can be accomplished very easily with nginx acting as a proxy, and you can combine the caching proxy with it.

Requirements

  • Nginx 1.17+ (1.16 absolute minimum, guide tested on 1.17)
  • Server with reasonable network bandwidth (500mbps uplink strongly suggested)
  • FXserver version 2377 or later
  • SSL certificate for the domain you're using (highly recommended)
This file has been truncated, but you can view the full file.
/*
Just to begin with, i've never taken any credit of parts that were created by Astro (Denver) aka
Denver the creator of PEN1.
Valhalla Gaming Comunity has indeed paid me for this very script you are about to read, where they
only paid for the systems and parts that were created by me.
They received this script a few months ago, and their server owner is trying to rip me off.
Due to this fact + i'm not scripting anymore, i release this script so that everyone can use it.
Credits to Astro.
Credits to Tratulla for his 2 .ini Functions.