// Just one of a hundred ways to spawn a ped // Spawns the Vagos Female
using GTA; using GTA.Native; using GTA.Math; using System.Windows.Forms; namespace PedSpawn { public class ModMenu : Script { public ModMenu() { KeyDown += Basics_KeyDown; } private void Basics_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.T) { int pedHashInt = 1520708641; PedHash pedHash = (PedHash)pedHashInt; Function.Call(Hash.REQUEST_MODEL, pedHash); while (!Function.Call(Hash.HAS_MODEL_LOADED, pedHash)) { Script.Yield(); } Ped ThePed = World.CreatePed(pedHash, Game.Player.Character.GetOffsetPosition(new Vector3(0, 1, 0))); } } } }
// With Ped PP = Game.Player.Character; // Ped MyPed;
//Example of addon mod Kira
MyPed = World.CreatePed("Kira", PP.Position + PP.ForwardVector * 3f, PP.Heading + 90);
// 4 equivalent examples of vanilla mod Vagos female
MyPed = World.CreatePed(new Model(1520708641),PP.Position + PP.ForwardVector * 3f, PP.Heading + 90);
MyPed = World.CreatePed("g_f_y_vagos_01", PP.Position + PP.ForwardVector * 3f, PP.Heading + 90);
MyPed = World.CreatePed(PedHash.Vagos01GFY,PP.Position + PP.ForwardVector * 3f, PP.Heading + 90);
MyPed = World.CreatePed(new Model(0x5AA42C21), PP.Position + PP.ForwardVector * 3f, PP.Heading + 90);
// Examples of Franklin vanilla player
MyPed = World.CreatePed("player_one", PP.Position + PP.ForwardVector * 3f, PP.Heading + 90);
MyPed = World.CreatePed(PedHash.Franklin, PP.Position + PP.ForwardVector * 3f, PP.Heading + 90);
using GTA;
using System.Windows.Forms;
namespace PedSpawn
{
public class ModMenu : Script
{
public ModMenu()
{
KeyDown += Basics_KeyDown;
}
private void Basics_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.T)
{
Ped Myped = World.CreatePed(PedHash.Vagos01GFY, Game.Player.Character.Position);
}
}
}
}
using GTA;
using GTA.Math;
using System.Windows.Forms;
namespace PedSpawn
{
public class ModMenu : Script
{
public ModMenu()
{
KeyDown += Basics_KeyDown;
}
private void Basics_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.T)
{
float spawnX = -1300f; // X coordinate
float spawnY = -3000f; // Y coordinate
float spawnZ = 14f; // Z coordinate (height)
Ped Myped = World.CreatePed(PedHash.Vagos01GFY, new Vector3(spawnX, spawnY, spawnZ));
}
}
}
}
private static void SpawnMichael()
{
// Avoid Ped falling from sky
// Ped PP = Game.Player.Character; //In declarations
Vector3 GroundPosition = World.GetNextPositionOnStreet(PP.Position).Around(2f);
Ped ped = World.CreatePed(PedHash.Michael, GroundPosition);
}
Content for Script 6 goes here.
Content for Script 7 goes here.
Content for Script 8 goes here.
Content for Script 9 goes here.
Content for Script 10 goes here.
Content for Script 11 goes here.
Content for Script 12 goes here.