using System;
using System.Windows.Forms;
using GTA; // This comes from the ScriptHookVDotNet library
using GTA.Native;
using GTA.Math;
public class MyFirstMod : Script
{
public MyFirstMod()
{
// Tell the game to listen for key presses
KeyDown += OnKeyDown;
}
private void OnKeyDown(object sender, KeyEventArgs e)
{
// If the user presses NumPad 1
if (e.KeyCode == Keys.NumPad1)
{
// Get the player's current position
Vector3 spawnPos = Game.Player.Character.Position + Game.Player.Character.ForwardVector * 3.0f;
// Create the vehicle (Zentorno)
World.CreateVehicle(VehicleHash.Zentorno, spawnPos);
// Show a notification in the game
Notification.Show("Car Spa
wned!");
}
}
}
using System.Windows.Forms;
using GTA; // This comes from the ScriptHookVDotNet library
using GTA.Native;
using GTA.Math;
public class MyFirstMod : Script
{
public MyFirstMod()
{
// Tell the game to listen for key presses
KeyDown += OnKeyDown;
}
private void OnKeyDown(object sender, KeyEventArgs e)
{
// If the user presses NumPad 1
if (e.KeyCode == Keys.NumPad1)
{
// Get the player's current position
Vector3 spawnPos = Game.Player.Character.Position + Game.Player.Character.ForwardVector * 3.0f;
// Create the vehicle (Zentorno)
World.CreateVehicle(VehicleHash.Zentorno, spawnPos);
// Show a notification in the game
Notification.Show("Car Spa
wned!");
}
}
}