Skip to content

Instantly share code, notes, and snippets.

View VIRUXE's full-sized avatar

Flávio Pereira VIRUXE

View GitHub Profile
@VIRUXE
VIRUXE / phpbb_to_flarum.php
Last active September 28, 2022 01:03
Convert a phpBB database to a Flarum database
<?php
/*
// Original script by robrotheram from discuss.flarum.org
// Modified by VIRUXE
*/
set_time_limit(0);
ini_set('memory_limit', -1);
ini_set("log_errors", 1);
@VIRUXE
VIRUXE / cl_disablenpcpickups.lua
Created February 18, 2022 01:37
Disable NPC Pickups in FiveM
local pickups = {`PICKUP_AMMO_BULLET_MP`,`PICKUP_AMMO_FIREWORK`,`PICKUP_AMMO_FLAREGUN`,`PICKUP_AMMO_GRENADELAUNCHER`,`PICKUP_AMMO_GRENADELAUNCHER_MP`,`PICKUP_AMMO_HOMINGLAUNCHER`,`PICKUP_AMMO_MG`,`PICKUP_AMMO_MINIGUN`,`PICKUP_AMMO_MISSILE_MP`,`PICKUP_AMMO_PISTOL`,`PICKUP_AMMO_RIFLE`,`PICKUP_AMMO_RPG`,`PICKUP_AMMO_SHOTGUN`,`PICKUP_AMMO_SMG`,`PICKUP_AMMO_SNIPER`,`PICKUP_ARMOUR_STANDARD`,`PICKUP_CAMERA`,`PICKUP_CUSTOM_SCRIPT`,`PICKUP_GANG_ATTACK_MONEY`,`PICKUP_HEALTH_SNACK`,`PICKUP_HEALTH_STANDARD`,`PICKUP_MONEY_CASE`,`PICKUP_MONEY_DEP_BAG`,`PICKUP_MONEY_MED_BAG`,`PICKUP_MONEY_PAPER_BAG`,`PICKUP_MONEY_PURSE`,`PICKUP_MONEY_SECURITY_CASE`,`PICKUP_MONEY_VARIABLE`,`PICKUP_MONEY_WALLET`,`PICKUP_PARACHUTE`,`PICKUP_PORTABLE_CRATE_FIXED_INCAR`,`PICKUP_PORTABLE_CRATE_UNFIXED`,`PICKUP_PORTABLE_CRATE_UNFIXED_INCAR`,`PICKUP_PORTABLE_CRATE_UNFIXED_INCAR_SMALL`,`PICKUP_PORTABLE_CRATE_UNFIXED_LOW_GLOW`,`PICKUP_PORTABLE_DLC_VEHICLE_PACKAGE`,`PICKUP_PORTABLE_PACKAGE`,`PICKUP_SUBMARINE`,`PICKUP_VEHICLE_ARMOUR_STANDARD`,`PICKUP_VE
@VIRUXE
VIRUXE / compile_vehicles.py
Last active November 22, 2022 19:59
FiveM - Compile a list of vehicles into a json file by reading their folders
"""
THIS IS NOW DEPRECATED, IN FAVOR OF THIS RESOURCE: https://github.com/VIRUXE/fivem-vehicle_loader
Author: VIRUXE
GitHub: https://gist.github.com/VIRUXE/9c56435627604338ad9c8a506648f7a8
This script compiles all the vehicles in the cwd onto a json file. To be used with my resource, that installs the vehicles into the game.
It will create a file called vehicles.json in the cwd (if it's not created already),
@VIRUXE
VIRUXE / dlc_labels.py
Last active December 19, 2022 00:02
GTA V DLC internal names and their labels
dlc_labels = {
'mpbeach': 'Beach Bum',
'mpvalentines': 'Valentine\'s Day Massacre',
'mpbusiness': 'Business',
'mpbusiness2': 'High Life',
'mphipster': 'I\'m Not A Hipster',
'mpindependence': 'Independence Day',
'mppilot': 'San Andreas Flight School',
'mplts': 'Last Team Standing',
'mpchristmas2': 'Festive Surprise',
@VIRUXE
VIRUXE / vehicle_dlcs.json
Last active January 16, 2023 22:50
GTA V Vehicle DLC internal names, by modelid
{
"akula" : "mpchristmas2017",
"alkonost" : "mpheist4",
"alpha" : "mpbusiness",
"alphaz1" : "mpsmuggler",
"annihilator2" : "mpheist4",
"apc" : "mpgunrunning",
"arbitergt" : "mpg9ec",
"ardent" : "mpgunrunning",
"asbo" : "mpheist3",
@VIRUXE
VIRUXE / scrape_gtabase_vehicles.py
Last active January 6, 2023 21:39
Scrape a GTA V Vehicle page from GTABase.com to make ready for database insertion
############################################################################################################
# Author: VIRUXE
# github.com/VIRUXE
# Scrape GTA V vehicle data from https://www.gtabase.com/grand-theft-auto-v/vehicles/
############################################################################################################
import sys
import os
from decouple import config
import requests
@VIRUXE
VIRUXE / sharkcards.py
Last active January 5, 2023 00:28
Some stats on GTA V Online Shark Cards monetary value
import random
cards = {
"tiger shark": {"price": 3.19, "cash": 250_000},
"bullshark" : {"price": 5.99, "cash": 600_000},
"great white": {"price": 11.99, "cash": 1_500_000},
"whale" : {"price": 30.99, "cash": 4_250_000},
"megalodon" : {"price": 59.99, "cash": 10_000_000},
}
@VIRUXE
VIRUXE / gtabase_search_scrape.py
Created January 6, 2023 22:01
Scrape GTABase's GTA V Vehicle URLs using their search form
import requests
import time
import json
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
base_url = "https://www.gtabase.com/grand-theft-auto-v/vehicles/"
options = Options()
@VIRUXE
VIRUXE / samplayers.py
Created January 16, 2023 09:22
Query a SA-MP (San Andreas Multiplayer) server to get info on who joins and leaves
import sys
import time
from samp_client.client import SampClient # pip install samp-client
server = sys.argv[1].split(':')
players = []
with SampClient(server[0], int(server[1])) as client:
max_players = client.get_server_info().max_players
@VIRUXE
VIRUXE / server_log.py
Last active January 16, 2023 22:24
Parse a SA-MP (San Andreas Multiplayer) Scavenge and Survive server log and make it all gay with colours, while viewing it live.
import os
import time
class Colors:
BLACK = "\033[0;30m"
RED = "\033[0;31m"
GREEN = "\033[0;32m"
YELLOW = "\033[0;33m"
BLUE = "\033[0;34m"
MAGENTA = "\033[0;35m"