Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
using System;
using System.Windows.Forms;
using GTA;
using GTA.Math;
using GTA.Native;
/// <summary>
/// F7キーが押された時にブリスタをプレイヤの近くに出現させる
/// </summary>
public class VehicleSpanwer : Script
public VehicleSpanwer()
KeyDown += VehicleSpanwerKeyDown;
private void VehicleSpanwerKeyDown(object sender, KeyEventArgs e)
if (e.KeyCode != Keys.F7) return;
var player = Game.Player.Character;
var currentPlayerPosition = player.Position;
World.CreateVehicle(new Model(VehicleHash.Blista), currentPlayerPosition + new Vector3(5, 0, 0));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment