Skip to content

Instantly share code, notes, and snippets.

View VIRUXE's full-sized avatar

Flávio Pereira VIRUXE

View GitHub Profile
@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
@VIRUXE
VIRUXE / get-fxserver-resources.ps1
Last active June 20, 2025 09:38
Fetch a comma-separated resource list from a FiveM server
try {
$serverCode = $args[0]
if (-not $serverCode) { $serverCode = Read-Host -Prompt 'Please enter the server code' }
$json = Invoke-RestMethod -Uri "https://servers-frontend.fivem.net/api/servers/single/$serverCode"
$serverResources = $json.Data.resources | Sort-Object
Write-Host "Server resources:"
@VIRUXE
VIRUXE / gh_source_repos.php
Created June 18, 2024 14:13
Enumerate source repos and gists for one or multiple user accounts on GitHub
<?php
if (!isset($_GET['username']) && !isset($_GET['usernames'])) {
echo "Usage: gh_source_repos.php?username(s)=username1,username2,...";
exit();
}
$usernames = [];
if (isset($_GET['username']) || isset($_GET['usernames'])) $usernames = array_merge($usernames, explode(",", ($_GET['usernames'] ?? $_GET['username'])));
@VIRUXE
VIRUXE / hts-ectune-colors.ps1
Last active June 17, 2024 10:32
Change your HTS colors for the ones used in eCtune
<#
17-06-2024 VIRUXE - https://flaviopereira.dev
This script replaces current Honda Tuning Suite (https://discord.hondatuningsuite.com) colors with the ones originally used in eCtune.
! eCtune was created by Frank van Koppen
#>
$properties = @{
"TraceColor" = "RGB[-8355585]"