Skip to content

Instantly share code, notes, and snippets.

View Local9's full-sized avatar
💭
I may be slow to respond.

127.0.0.1 Local9

💭
I may be slow to respond.
  • Bristol/Cornwall
View GitHub Profile
@Local9
Local9 / Speeches.cs
Created May 10, 2019 15:50 — forked from alexguirre/Speeches.cs
GTA V Speeches List
This file has been truncated, but you can view the full file.
// Speeches List by alexguirre
// Code in C# using RAGEPluginHook
// Usage example:
// Speech.S_M_Y_SWAT_01_WHITE_FULL_01.GENERIC_CURSE_HIGH_03.PlayOn(ped, SpeechModifier.Force);
namespace Put.Your.Namespace.Here
{
using Rage;
@Local9
Local9 / mpstatssetup.xml
Created May 16, 2019 10:52 — forked from rafaellm2/mpstatssetup.xml
mpstatssetup
<!--
#############################################################################################################
#############################################################################################################
#############################################################################################################
READ THIS BEFORE STARTING
READ THIS BEFORE STARTING
READ THIS BEFORE STARTING
READ THIS BEFORE STARTING

Keybase proof

I hereby claim:

  • I am local9 on github.
  • I am tsohlacol (https://keybase.io/tsohlacol) on keybase.
  • I have a public key ASDxwQF618XhLdRlSdtBqfv_nOyOysqm_c0-rNtx79MrAgo

To claim this, I am signing this object:

@Local9
Local9 / NuiWrapper.cs
Last active June 16, 2021 10:57 — forked from manups4e/NuiWrapper.cs
Nui Wrapper
public class NuiManager
{
private bool _hasFocus;
/// <summary>
/// true if focus is active.
/// </summary>
public bool IsNuiFocusOn => _hasFocus;
/// <summary>
@Local9
Local9 / AddCommands.lua
Last active January 28, 2022 15:51
Add Commands Example
AddEventHandler("onClientResourceStart", function(resourceName)
if resourceName ~= GetCurrentResourceName() then
return;
end;
AddCommands();
end);
function AddCommands()
TriggerEvent("chat:addSuggestion", "/nc", "Toggle no clip", {});
TriggerEvent("chat:addSuggestion", "/rc", "reload clothes", {});
@Local9
Local9 / fxmanifest.lua
Last active April 30, 2023 14:13
A Lua script to check resource version against GitHub releases
-- add the following metadata to your fxmanifest.lua
version 'v1.0.0'
repository 'https://github.com/<USER or ORGANISATION>/<REPOSITORY NAME>'
@Local9
Local9 / outfits.cs
Last active September 5, 2022 22:57
Character Components
static int[][] GetCharacterOutfitSettings(bool isMale, int iParam1)
{
var components = new int[12];
var textures = new int[12];
for (int i = 0; i < 12; i++)
{
components[i] = -1;
textures[i] = -1;
}
SetToggleMinimapHeistIsland(true) -- Range check to enable/disable
LoadGlobalWaterType(1) -- Range check to enable/disable
SetAiGlobalPathNodesType(1) -- Range check to enable/disable (if changed too close to the island will crash
SetScenarioGroupEnabled("Heist_Island_Peds", true)
RequestIpl("h4_islandx_disc_StrandedWhale")
RequestIpl("h4_islandx_disc_StrandedShark")
RequestIpl("h4_islandairstrip")
@Local9
Local9 / DapperDatabase.cs
Last active March 23, 2023 07:31
Basic FiveM SQL Dapper which uses FxEvents Logger (Log class)
using Curiosity.Framework.Server.Models;
using Dapper;
using Logger; // FxEvents on NuGet
using MySqlConnector;
using System.ComponentModel;
using System.Diagnostics;
using System.Reflection;
using System.Text;
using Debug = CitizenFX.Core.Debug;
--[[ INTERNAL FUNCTIONS ]]--
function getQueryOutfit(blob)
local lockHash = string.unpack('<i4', blob, 1)
local hash = string.unpack('<i4', blob, 9)
local price = string.unpack('<i4', blob, 17)
local unk1 = string.unpack('<i4', blob, 25)
local totalItems = string.unpack('<i4', blob, 33)
local unk2 = string.unpack('<i4', blob, 41)
local unk3 = string.unpack('<i4', blob, 49)
local gxt = string.unpack('z', blob, 57)