1 file liked
662 comments
10 videos
5 uploads
17 followers
7.737 downloads
@RedAngel77
Just for any new "scripters" here, a few additional comments.
1. You need a Scripts (or scripts) folder. Even some "expert" programmers here don't seem to understand that Windows isn't case sensitive.
The Scripts folder is a subfolder of the game/root/installation folder where your game is installed.
2. You will need Scripthook V (pronounced Scripthook 5, not Scripthook Vee) and SHVDN - you want SHVDN3.
3. If you don't want to compile, just create a text file with the extension .3.cs (the 3 indicates SHVDN3 and the cs means c sharp).
For example Spawn.3.cs
4. In the code above, the chimp will spawn when the T key is pressed.
@RedAngel77 If you use absolute coordinates, with new Vector3, then you will need to reference GTA.Math. The following code will spawn the guy from Planet of the Apes on the Airport Runway.
using GTA;
using GTA.Native;
using System;
using System.Windows.Forms;
using GTA.Math;
namespace GTAVTutor {
public class Basic : Script {
public static Ped PP = Game.Player.Character;
public Basic() {
Tick += OnTick;
KeyDown += OnKeyDown;
}
private void OnTick(object sender, EventArgs e) {
}
private void OnKeyDown(object sender, KeyEventArgs e) {
if (e.KeyCode == Keys.T) {
Ped PedTemp = World.CreatePed(PedHash.Chimp, new Vector3(-1300, -3040, 14));
}
}
}
}
@SeN SiN @Webbz
Glad you found this useful.
@RedAngel77 Generally peds are spawned relative to the player's position. You can use forward vectors or right/left vectors and also headings in degrees to have the ped spawn north, east, west, south of player etc. To spawn a ped with absolute coordinates, you just do exactly that. Instead of making the spawn relative to the player, you give the absolute coords:
Ped PedTemp = World.CreatePed(PedHash.Chimp, new Vector3(-1662, 264, 63));
@MissySnowie Thank you and I hope you have a wonderful new year as well.
@gtavjamal I'm struggling on how to find a method to simplify it without making a boring asF mini-course on C#. So, wishing you a wonderful xmas and a wonderful 2025 as well from the 51st state of America called Canada.
@JoyLucien Thanks
Very cool (no pun intended)
@TayMcKenzie I was making a pretty obvious joke, but it seems to have gone way over your head. I guess English ain't your mother tongue.
@TayMcKenzie The coordinates are fine. The MP female is on anabolic steroids and other PEDs (not npcs, i mean performance enhancing drugs) and can easily crush through a metal pop can. That's why you can see her fingers go right through. You don't want to piss this lady off. Or it could be creator used AI image generation which is notorious for screwing up fingers and limbs.