Skip to content

Instantly share code, notes, and snippets.

@TomGrobbe
TomGrobbe / dbclick-images.js
Created June 10, 2022 12:23
Open images in a new tab if you double click on them (does not support mobile devices).
document.addEventListener("dblclick", function (ev) {
if (ev.target.localName === "img") {
window.open(ev.target.currentSrc, "_blank");
}
});
--[[ SCALEFORM FUNCTIONS LIST
int RequestScaleformMovie(scalename)
bool HasScaleformMovieLoaded(scale)
bool HasNamedScaleformMovieLoaded(scalename)
bool BeginScaleformMovieMethodN(funcname) -- global frontend menu scaleforms (not needed in most cases)
bool BeginScaleformMovieMethodV(funcname) -- global frontend menu scaleforms (not needed in most cases)
@TomGrobbe
TomGrobbe / data.cs
Created February 9, 2019 13:04
weapon hashes > labels & weapon component hashes > labels
#region weapon names
public static readonly Dictionary<string, string> weaponNames = new Dictionary<string, string>()
{
{ "weapon_advancedrifle", GetLabelText("WT_RIFLE_ADV") },
{ "weapon_appistol", GetLabelText("WT_PIST_AP") },
{ "weapon_assaultrifle", GetLabelText("WT_RIFLE_ASL") },
{ "weapon_assaultrifle_mk2", GetLabelText("WT_RIFLE_ASL2") },
{ "weapon_assaultshotgun", GetLabelText("WT_SG_ASL") },
{ "weapon_assaultsmg", GetLabelText("WT_MG_ASL") },
{ "weapon_autoshotgun", GetLabelText("WT_AUTOSHOT") },
@TomGrobbe
TomGrobbe / crossmap.c
Created January 7, 2019 21:53
GTA V Crossmap / Translation table (Arena Wars DLC)
// Translation table by Vespura 07-January-2019. Arena Wars DLC.
{ 0x6EB5F71AA68F2E8E, 0xD75A4240F0AD8613 },
{ 0xC90D2DCACD56184C, 0x4659F4154D948B01 },
{ 0xE6CC9F3BA0FB9EF1, 0xB1FDFCECA75CE4A7 },
{ 0xFC04745FBE67C19A, 0xD4DD82067BC13449 },
{ 0xD62A67D26D9653E6, 0x90488A740F13CBEC },
{ 0xC5BC038960E9DB27, 0x932A1FC570019F52 },
{ 0x5F0F0C783EB16C04, 0x2106996673968125 },
{ 0xF86AA3C56BA31381, 0xC9933A95740692F1 },
@TomGrobbe
TomGrobbe / WeaponComponentNames.cs
Created December 27, 2018 18:56
All weapon component spawn names and their labels (localized names).
#region weapon component names
public static readonly Dictionary<string, string> weaponComponentNames = new Dictionary<string, string>()
{
["COMPONENT_PISTOL_CLIP_01"] = GetLabelText("WCT_CLIP1"),
["COMPONENT_PISTOL_CLIP_02"] = GetLabelText("WCT_CLIP2"),
["COMPONENT_PISTOL_VARMOD_LUXE"] = GetLabelText("WCT_VAR_GOLD"),
["COMPONENT_PISTOL50_CLIP_01"] = GetLabelText("WCT_CLIP1"),
["COMPONENT_PISTOL50_CLIP_02"] = GetLabelText("WCT_CLIP2"),
["COMPONENT_PISTOL50_VARMOD_LUXE"] = GetLabelText("WCT_VAR_SIL"),
["COMPONENT_COMBATPISTOL_CLIP_01"] = GetLabelText("WCT_CLIP1"),
@TomGrobbe
TomGrobbe / WeaponNames.cs
Created December 27, 2018 18:54
Weapon spawn names and their labels (localized names).
#region weapon names
public static readonly Dictionary<string, string> weaponNames = new Dictionary<string, string>()
{
{ "weapon_advancedrifle", GetLabelText("WT_RIFLE_ADV") },
{ "weapon_appistol", GetLabelText("WT_PIST_AP") },
{ "weapon_assaultrifle", GetLabelText("WT_RIFLE_ASL") },
{ "weapon_assaultrifle_mk2", GetLabelText("WT_RIFLE_ASL2") },
{ "weapon_assaultshotgun", GetLabelText("WT_SG_ASL") },
{ "weapon_assaultsmg", GetLabelText("WT_MG_ASL") },
{ "weapon_autoshotgun", GetLabelText("WT_AUTOSHOT") },
@TomGrobbe
TomGrobbe / README.md
Created January 9, 2018 14:41
Custom scrolling text in GTA V.

Scrolling text

Made by Vespura Note that this is not the best way to acchieve this effect. Rather it's a simple solution that works. You can view a preview of it here: (note that the numbers show above the scrolling text are just there for demonstration purposes, they won't be there if yo use the example code from the file above) If the link above doesn't work, copy it from here: https://www.devtesting.pizza/hi/i/01ed834.mp4

@TomGrobbe
TomGrobbe / __resource.lua
Last active November 8, 2018 17:03
Camping resource
resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937'
client_script 'client.lua'
@TomGrobbe
TomGrobbe / particle-command.lua
Created December 27, 2017 18:12
Particle spawner
RegisterCommand('particle', function(source, args, rawCommand)
local dict = args[1]
local name = args[2]
local loop = tostring(args[3])
if dict == nil or name == nil then
Citizen.Trace('[Particles] Invalid arguments.')
TriggerEvent('chatMessage', '', {255,255,255}, '[Particles] ^8Error: ^1Invalid arguments.')
else
RequestNamedPtfxAsset(dict)