View gist:a0c49de27c0bd0a58e0216bb8b418c95
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
using System; | |
using System.Windows.Forms; | |
using GTA; | |
using GTA.Native; | |
using Control = System.Windows.Forms.Control; | |
public delegate void UIChatMessageHandler(UIChat sender, string message); | |
public class UIChat : GTA.Script | |
{ |
View gist:d874e2facf85a0f911ba847f939abc9e
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
using System; | |
using System.Linq; | |
using System.Runtime.InteropServices; | |
namespace Memory | |
{ | |
public static class MemoryAccess | |
{ | |
private delegate int GetAnimDictIndex(ref int index, int dictionaryHash); |
View gist:576b97d64e7f3aeb1202cd63c35158fe
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
#region SetupAfterburnerPatch | |
pattern = new Pattern("\x3C\x07\x0F\x84\x00\x00\x00\x00\x8B\x87\x00\x00\x00\x00", "xxxx????xx????"); | |
result = pattern.Get(-155); | |
byte[] bytes = { 0xE9, 0x79, 0x01, 0x00, 0x00, 0x90 }; | |
Marshal.Copy(bytes, 0, result, bytes.Length); |
View gist:25739bb281ebf0d7021e87f7d49a8f89
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
pattern = new Pattern("\x45\x33\xC9\x44\x8B\xC5\x48\x8B\xD3\x48\x8B\xCE", "xxxxxxxxxxxx"); | |
result = pattern.Get(-5); | |
if (result == IntPtr.Zero) return; | |
byte[] byteArray = { 0x90, 0x90, 0x90, 0x90, 0x90 }; | |
Marshal.Copy(byteArray, 0, result, byteArray.Length); |
View gist:3c81920f4ab30e5659310bd580268aae
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
using System; | |
using System.Runtime.InteropServices; | |
using System.Text; | |
using System.Xml; | |
namespace Memory | |
{ | |
public static unsafe class MemoryAccess | |
{ | |
[UnmanagedFunctionPointer(CallingConvention.ThisCall)] |
View gist:38591de5b89088883478f09e82f0c924
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
[StructLayout(LayoutKind.Explicit)] | |
public struct PtfxAssetStore | |
{ | |
[FieldOffset(0x10)] | |
public int MaxItems; //0x10-0x14 | |
[FieldOffset(0x18)] | |
[MarshalAs(UnmanagedType.LPStr)] | |
public string StoreName; | |
[FieldOffset(0x38)] | |
public IntPtr Items; //0x38 |
View gist:198a54be86d452a66ec835a79d2b6159
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
while (deleteQueue.Count > 0) | |
{ | |
var item = deleteQueue.Dequeue(); | |
OnFireList.Remove(item); | |
} |
View gist:afc2d389bc840377feceb79617c90453
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
foreach (var item in OnFireList) | |
{ | |
var vehicle = new Vehicle(item.Key); | |
if (!vehicle.IsOnFire) | |
{ | |
item.Value.RemoveFire_SmokeEffects(); | |
deleteQueue.Enqueue(item.Key); | |
} |
View gist:e97201abeb433fd249cc0c140324928f
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
for (int i = VehiclePool.Length - 1; i >= 0; i--) | |
{ | |
Vehicle veh = VehiclePool[i]; | |
if (veh.IsOnFire && !OnFireList.ContainsKey(veh.Handle)) | |
{ | |
var fx = new VehicleEffects(veh); | |
fx.InitializeFire_SmokeEffect(); | |
OnFireList.Add(veh.Handle, vehicleEffect); |