Example #1
0
        public async void AddVehicle(Player player, string model, vehicleManager.type type, int color1, int color2, string numberPlate)
        {
            float rotation = 0.0F;

            if (player.Vehicle != null)
            {
                rotation = player.Vehicle.Rotation.Z;
            }
            else
            {
                rotation = player.Heading;
            }
            var vehmodel = new vehicleModel(model, type, color1, color2, numberPlate, rotation, numberPlate);

            vehmodel.spawnPosition = player.Position;

            int id = await createVehicle(vehmodel);

            player.SendChatMessage($"Vehicle with {id} was created at the current position.");
        }
Example #2
0
 public vehicleModel(string model, vehicleManager.type type, int color1, int color2, string numberPlate, float rotation, string owner = "AdmBot")
 {
     this.model = model; this.type = type; this.primaryColor = color1; this.secondaryColor = color2; this.numberPlate = numberPlate; this.owner = owner; this.rotation = rotation;
 }