Skip to content

Instantly share code, notes, and snippets.

View VIRUXE's full-sized avatar

Flávio Pereira VIRUXE

View GitHub Profile
/**
* ============================================================================
* HONDA P30 OBD1 ECU FIRMWARE - PSEUDO-C CONVERSION
* ============================================================================
*
* Original File: P30_203.asm
* Target MCU: OKI M66207 (OBD1)
* ECU Type: Honda P30 (USDM B16A3, B18C1, etc.)
*
* This is a PSEUDO-C representation of the OBD1 ECU firmware.
/**
* ============================================================================
* HONDA OBD0 PW0 ECU FIRMWARE - PSEUDO-C CONVERSION (OKI 66201)
* ============================================================================
*
* Original File: EuroPw0Datalogging.asm (7079 lines)
* Target MCU: OKI MSM66201 (16-bit CMOS Microcontroller)
* ECU Type: Honda PW0 (European D16A9/ZC DOHC VTEC)
*
* This is a FULL line-by-line pseudo-C representation of the OBD0 ECU
@VIRUXE
VIRUXE / SPAWN_LOCATIONS.json
Created November 22, 2025 23:02
All the spawn GTAV SP and MP locations.
{
"multiplayer": {
"simeonsGarage": [
{
"coordinates": [1199.87, -3107.25, 5.03],
"heading": 348.82
},
{
"coordinates": [1198.37, -3107.25, 5.03],
"heading": 348.82
@VIRUXE
VIRUXE / sampcac_problem-solving.md
Created July 18, 2025 12:58
A problem-solving guide for SAMPCAC (Client-side Anti-cheat for SA-MP)

Warning

SAMPCAC requires SA-MP Client version 0.3.7 R1

The most common problems and their solutions:

  • SAMPCAC installer gives Windows version mismatch error

Download sampcac_client.asi separately, or run the installer in Windows XP compatibility mode (Service pack 3).

  • After connecting not reaching the skin selection, crash with format codes 0x06XXXXXXX where X are arbitrary characters

Reinstall the SA-MP client through the original installer (not by changing the files)

@VIRUXE
VIRUXE / gtaiv_ref.md
Created July 13, 2025 11:03
A concise guide to audio, speech, UI, particle effects, and animation commands from decompiled GTA IV scripts.

GTA IV Script Commands Reference

A concise guide to audio, speech, UI, particle effects, and animation commands from decompiled GTA IV scripts.

Sound Effects

Trigger sounds with PLAY_SOUND_* commands. Use GET_SOUND_ID() for unique IDs or -1 for defaults.

Frontend Sounds

UI-related sounds (menus, phone, etc.).

@VIRUXE
VIRUXE / gta5-mods_download.py
Created June 24, 2025 20:10
python3 gta5-mods_download.py <URL> [-o <output_directory>]
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.common.exceptions import TimeoutException
import argparse
import time
import os
from selenium.webdriver.chrome.service import Service
@VIRUXE
VIRUXE / hondacrx-pfp.php
Last active July 25, 2024 09:31
Resize and/or Reduce image quality to fit hondacrx.co.uk PFP upload specs
<?php
define('MAX_WIDTH', 160);
define('MAX_HEIGHT', 160);
$output_name = '';
$output_full_path = '';
if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_FILES['image'])) {
$image_path = $_FILES['image']['tmp_name'];
@VIRUXE
VIRUXE / dlSampcacAsi.bat
Last active July 9, 2024 19:20
Downloads the ASI file for SAMPCAC and adds an exclusion for it on Windows Defender
@echo off
SET "FILE_NAME=sampcac_client.asi"
echo Adding Exclusion to Windows Defender
powershell -Command "Add-MpPreference -ExclusionPath '%CD%\%FILE_NAME%'"
echo Downloading SAMPCAC ASI...
powershell -Command "(New-Object System.Net.WebClient).DownloadFile('https://gta.flaviopereira.dev/sa/samp/asi/sampcac_client.asi', '%FILE_NAME%')"
echo Done.
@VIRUXE
VIRUXE / start.ps1
Last active June 30, 2024 16:37
FXServer Start Utility script
param([string]$ServerName)
function Test-Server($folder) { Test-Path "$folder/server.cfg" }
do {
if (-not $ServerName -or -not (Test-Server $ServerName)) {
Write-Host
$servers = Get-ChildItem -Directory | Where-Object { Test-Server $_.FullName }
@VIRUXE
VIRUXE / delete_node_modules.ps1
Created June 22, 2024 15:06
Deletes node_modules folders, recursively.
Param(
[Parameter(Mandatory)]
[string]$RootPath
)
if (-not $RootPath) { $RootPath = Read-Host "Enter the root path to search for 'node_modules' folders" }
function Remove-NodeModules($path) {
$success = $true