Skip to content

Instantly share code, notes, and snippets.

[ConsoleCommand]
public static unsafe void TestTaskData()
{
// TODO: search for the pattern once only
IntPtr addr = Game.FindPattern("48 8B 0D ?? ?? ?? ?? 4A 8B 04 C1 44 39 10 74 16");
addr += *(int*)(addr + 3) + 7;
CTaskDataInfoManager* taskDataMgr = (CTaskDataInfoManager*)addr;
for (int i = 0; i < taskDataMgr->aTaskData.Count; i++)
public static CVehicleModelInfoVarGlobal** gVehicleModelInfoVarGlobal = null;
public static void TestVehicleKits()
{
var kitIndex = NativeFunction.Natives.GET_VEHICLE_MOD_KIT<int>(Game.LocalPlayer.Character.CurrentVehicle);
if (gVehicleModelInfoVarGlobal == null)
{
var addr = Game.FindPattern("48 8B 0D ?? ?? ?? ?? 44 8B C6 8B D5 8B D8");
gVehicleModelInfoVarGlobal = (CVehicleModelInfoVarGlobal**)(addr + *(int*)(addr + 3) + 7);
template matchingOverload(alias funcSymbol, Args...)
{
private template parametersMatch(alias funcSymbol, T...)
{
import std.traits : Parameters;
enum parametersMatch = is(Parameters!funcSymbol == T);
}
static foreach(s; __traits(getOverloads, __traits(parent, funcSymbol), __traits(identifier, funcSymbol)))
{
@alexguirre
alexguirre / Particles Effects Dump.txt
Last active December 11, 2023 03:48
GTA V Particle Effects Dump
# Thanks to CodeWalker for the code to read .ypt files: https://github.com/dexyfex/CodeWalker
#
# Format:
# [asset_name]
# effect_name_1
# effect_name_2
#
[core]
bul_gravel_heli
// Generated by GTA V Euphoria Behaviours Parser v1.2.0.0 by alexguirre
namespace Rage.Euphoria
{
using Rage;
using Rage.Euphoria;
using Rage.Attributes;
/// <summary>
///
/// </summary>
internal static class DamagePack
{
public static void ApplyDamagePack(this Ped ped, string damagePackName, float damage, float multiplier)
{
NativeFunction.Natives.ApplyPedDamagePack(ped, damagePackName, damage, multiplier);
}
public const string BigHitByVehicle = "BigHitByVehicle";
public const string SCR_Dumpster = "SCR_Dumpster";
public const string SCR_Torture = "SCR_Torture";
// System
using System.Drawing;
// RPH
using Rage;
using Rage.Native;
internal class LoopedParticle : IHandleable
{
public string AssetName { get; }
// System
using System.Drawing;
// RPH
using Rage;
using Rage.Native;
internal class Decal
{
public uint Handle { get; }
internal enum WeaponHashEx : uint
{
Unarmed = 2725352035,
Animal = 4194021054,
Cougar = 148160082,
Knife = 2578778090,
Nightstick = 1737195953,
Hammer = 1317494643,
Bat = 2508868239,
GolfClub = 1141786504,
using Rage;
using Rage.Native;
internal class PedHeadshot
{
private uint handle;
public uint Handle { get { return handle; } }
private Ped ped;
public Ped Ped { get { return ped; } }