/// <summary> /// Setup fighter for the local player. /// </summary> public void Setup() { var vehModel = new Model(VehicleHash.Lazer); if (!vehModel.IsLoaded) { vehModel.Request(1000); } //Create the vehicle var vehicle = new ManageableVehicle(World.CreateVehicle(vehModel, Team.JetSpawnPoint.Position)); vehicle.Heading = Team.JetSpawnPoint.Heading; vehicle.Vehicle.EngineRunning = true; vehicle.IsInvincible = true; vehicle.MaxSpeed = 110; ManagedVehicle = vehicle; ManagedVehicle.EnterWater += EnterWater; irFlares = new IRFlareManager(); irFlares.SetupWithVehicle(ManagedVehicle.Vehicle); //Handle the ped var ped = new ManageablePed(Game.Player.Character); ped.Ped.RelationshipGroup = Team.RelationshipGroup; ped.Ped.SetIntoVehicle(vehicle.Vehicle, VehicleSeat.Driver); ped.IsInvincible = true; ManagedPed = ped; ManagedPed.ExitVehicle += ExitVehicle; interpCam = new InterpolatingCamera(vehicle.GetOffsetInWorldCoords(new Vector3(-2f, -2f, 10f))); interpCam.MainCamera.PointAt(vehicle); interpCam.Start(); engineFX1 = new LoopedPTFX("core", "ent_sht_extinguisher"); engineSound = new GameSound("SPRAY", "CARWASH_SOUNDS"); boostTimer.Start(); }
/// <summary> /// Setup fighter for the local player. /// </summary> public void Setup() { var vehModel = new Model(VehicleHash.Lazer); if (!vehModel.IsLoaded) vehModel.Request(1000); //Create the vehicle var vehicle = new ManageableVehicle(World.CreateVehicle(vehModel, Team.JetSpawnPoint.Position)); vehicle.Heading = Team.JetSpawnPoint.Heading; vehicle.Vehicle.EngineRunning = true; vehicle.IsInvincible = true; vehicle.MaxSpeed = 110; ManagedVehicle = vehicle; ManagedVehicle.EnterWater += EnterWater; irFlares = new IRFlareManager(); irFlares.SetupWithVehicle(ManagedVehicle.Vehicle); //Handle the ped var ped = new ManageablePed(Game.Player.Character); ped.Ped.RelationshipGroup = Team.RelationshipGroup; ped.Ped.SetIntoVehicle(vehicle.Vehicle, VehicleSeat.Driver); ped.IsInvincible = true; ManagedPed = ped; ManagedPed.ExitVehicle += ExitVehicle; interpCam = new InterpolatingCamera(vehicle.GetOffsetInWorldCoords(new Vector3(-2f, -2f, 10f))); interpCam.MainCamera.PointAt(vehicle); interpCam.Start(); engineFX1 = new LoopedPTFX("core", "ent_sht_extinguisher"); engineSound = new GameSound("SPRAY", "CARWASH_SOUNDS"); boostTimer.Start(); }