This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
from functools import cache | |
def normalize_vecs(vecs): | |
return vecs / np.linalg.norm(vecs, axis=1)[:, np.newaxis] | |
@cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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++) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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))) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// System | |
using System.Drawing; | |
// RPH | |
using Rage; | |
using Rage.Native; | |
internal class LoopedParticle : IHandleable | |
{ | |
public string AssetName { get; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// System | |
using System.Drawing; | |
// RPH | |
using Rage; | |
using Rage.Native; | |
internal class Decal | |
{ | |
public uint Handle { get; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
internal enum WeaponHashEx : uint | |
{ | |
Unarmed = 2725352035, | |
Animal = 4194021054, | |
Cougar = 148160082, | |
Knife = 2578778090, | |
Nightstick = 1737195953, | |
Hammer = 1317494643, | |
Bat = 2508868239, | |
GolfClub = 1141786504, |
NewerOlder