Skip to content

Instantly share code, notes, and snippets.

View kagikn's full-sized avatar

kagikn kagikn

View GitHub Profile
@kagikn
kagikn / CauseRealStackOverflow.cs
Last active December 19, 2017 10:06
This code is for RAGE Plugin Hook, which causes real stack overflow and freeze the game.
using System;
using Rage;
using GetStatusForDebug.UI;
[assembly: Rage.Attributes.Plugin("CauseRealStackOverflow", Description = "Causes real stack overflow and freeze the game.", Author = "kagikn")]
namespace GetStatusForDebug
{
public static class EntryPoint
{
@kagikn
kagikn / ExampleText.cs
Last active June 20, 2018 02:22
Example text for NativeUI. Only if your game language are set to Japanese or you have a custom font that contains Japanese characters, those text can be showed properly. Otherwise, many tofus will be showed.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Drawing;
using System.Windows.Forms;
using GTA;
using GTA.Native;
using GTA.Math;
using System.Runtime.InteropServices;
using NativeUI;
@kagikn
kagikn / Resurrect.cs
Last active September 4, 2016 12:17
Resurrect Ped with Script Hook V .NET
private void Resurrect(Ped ped)
{
int maxHealth = ped.MaxHealth;
bool isCollisionEnabled = ped.HasCollision;
var vehicle = ped.CurrentVehicle;
var seatIndex = ped.SeatIndex;
ped.Health = maxHealth;
ped.Task.ClearAllImmediately();
ped.SetConfigFlag(33, false);//removes the flag that can cause an instant kill by one damage or starting ragdoll