CreateVehicle
Creates a vehicle on the given position.
- model: parameter input should be in VehicleHash type
- position: parameter input should be in Vector3 type
- rotation: parameter input should be in float type
- color1: parameter input should be in int type
- color2: parameter input should be in int type
- numberPlate: parameter input should be in string type
- alpha: parameter input should be in byte type
- locked: parameter input should be in bool type
- engineStatus: parameter input should be in bool type
- dimension: parameter input should be in uint type
{{#tag:syntaxhighlight| [Command("createveh")] public void CreateVehicleCommand(Client player) {
VehicleHash busModel = NAPI.Util.VehicleNameToModel("bus"); //Gets the hash of bus model
``Vehicle.CreateVehicle(busModel, player.Position, 0, 0, 0); //Creates a bus on the player's position
} |lang=csharp}} }}