Created
January 1, 2021 18:01
-
-
Save David-Lor/1afced78a8ed8432357f453a62431f13 to your computer and use it in GitHub Desktop.
GTA V - "Kill Player on Demand" script
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.Windows.Forms; | |
using GTA; | |
using GTA.Native; | |
public class KillPlayerOnDemand : Script { | |
public KillPlayerOnDemand() { | |
KeyUp += OnKeyUp; | |
} | |
private void OnKeyUp(object sender, KeyEventArgs e) { | |
if (e.KeyCode == Keys.K) { | |
GTA.Native.Function.Call(Hash.SET_PED_TO_RAGDOLL, Game.Player.Character, 30000, 30000, 0, 1, 1, 1); | |
Game.Player.Character.Kill(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Perfect! ♥