2 neue rentcars added
This commit is contained in:
@@ -60,7 +60,7 @@ export default function rentCar(globalData: IGlobalData) {
|
|||||||
rentcarMenu.ListChange.on((item: NativeUI.UIMenuListItem, index) => {
|
rentcarMenu.ListChange.on((item: NativeUI.UIMenuListItem, index) => {
|
||||||
switch (item.Text) {
|
switch (item.Text) {
|
||||||
case "Fahrzeug":
|
case "Fahrzeug":
|
||||||
item.Description = "$" + vehiclePrices[index] + "$ alle 5 Minuten";
|
item.Description = "$" + vehiclePrices[index] + " alle 5 Minuten";
|
||||||
selectedIndex = index;
|
selectedIndex = index;
|
||||||
//item.Description = item.SelectedValue;
|
//item.Description = item.SelectedValue;
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -81,6 +81,8 @@ namespace ReallifeGamemode.Server.Events
|
|||||||
player.TriggerEvent("CLIENT:AddPed", 6, "ig_siemonyetarian", -1023.1589, -2693.6948, 13.98, 173.95613, 0, false, true, 0, "none", true, true, true);//Ped Rentcar NoobSpawn
|
player.TriggerEvent("CLIENT:AddPed", 6, "ig_siemonyetarian", -1023.1589, -2693.6948, 13.98, 173.95613, 0, false, true, 0, "none", true, true, true);//Ped Rentcar NoobSpawn
|
||||||
player.TriggerEvent("CLIENT:AddPed", 7, "ig_siemonyetarian", -369.1589, -230.92816, 36.028805, 150.26433, 0, false, true, 0, "none", true, true, true);//Ped Rentcar KH/Stadthalle
|
player.TriggerEvent("CLIENT:AddPed", 7, "ig_siemonyetarian", -369.1589, -230.92816, 36.028805, 150.26433, 0, false, true, 0, "none", true, true, true);//Ped Rentcar KH/Stadthalle
|
||||||
player.TriggerEvent("CLIENT:AddPed", 8, "ig_siemonyetarian", 1222.0868, 2726.5286, 38.00415, 113.77263, 0, false, true, 0, "none", true, true, true);//Ped Rentcar Knast
|
player.TriggerEvent("CLIENT:AddPed", 8, "ig_siemonyetarian", 1222.0868, 2726.5286, 38.00415, 113.77263, 0, false, true, 0, "none", true, true, true);//Ped Rentcar Knast
|
||||||
|
player.TriggerEvent("CLIENT:AddPed", 9, "ig_siemonyetarian", -215.4218292236328, 6218.90478515625, 31.491567611694336, -135.07437133789062, 0, false, true, 0, "none", true, true, true);//Ped Rentcar Knast
|
||||||
|
player.TriggerEvent("CLIENT:AddPed", 10, "ig_siemonyetarian", 818.239990234375, -1040.833984375, 26.750696182250977, 3.0542829036712646, 0, false, true, 0, "none", true, true, true);//Ped Rentcar Knast
|
||||||
|
|
||||||
TimeSpan currentTime = TimeManager.CurrentTime;
|
TimeSpan currentTime = TimeManager.CurrentTime;
|
||||||
bool disableLightMode = currentTime > LightModeTimeFrom && currentTime < LightModeTimeTo;
|
bool disableLightMode = currentTime > LightModeTimeFrom && currentTime < LightModeTimeTo;
|
||||||
|
|||||||
@@ -378,6 +378,16 @@ namespace ReallifeGamemode.Server.Events
|
|||||||
{
|
{
|
||||||
player.TriggerEvent("showRentcarMenu", JsonConvert.SerializeObject(Rentcar.knastVehicleProperties), "knast");
|
player.TriggerEvent("showRentcarMenu", JsonConvert.SerializeObject(Rentcar.knastVehicleProperties), "knast");
|
||||||
}
|
}
|
||||||
|
//Paleto
|
||||||
|
else if (player.Position.DistanceTo(PositionManager.rentcarPoints[3].Position) <= 1.5)
|
||||||
|
{
|
||||||
|
player.TriggerEvent("showRentcarMenu", JsonConvert.SerializeObject(Rentcar.paletoVehicleProperties), "paleto");
|
||||||
|
}
|
||||||
|
//Lamesa
|
||||||
|
else if (player.Position.DistanceTo(PositionManager.rentcarPoints[4].Position) <= 1.5)
|
||||||
|
{
|
||||||
|
player.TriggerEvent("showRentcarMenu", JsonConvert.SerializeObject(Rentcar.paletoVehicleProperties), "lamesa");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nearestWeapon != null) // Weapon Point
|
if (nearestWeapon != null) // Weapon Point
|
||||||
|
|||||||
@@ -324,10 +324,20 @@ namespace ReallifeGamemode.Server.Managers
|
|||||||
{
|
{
|
||||||
Position = Rentcar.knastBlipPosition
|
Position = Rentcar.knastBlipPosition
|
||||||
};
|
};
|
||||||
|
RentcarPoint rentCarPaleto = new RentcarPoint()
|
||||||
|
{
|
||||||
|
Position = Rentcar.paletoBlipPosition
|
||||||
|
};
|
||||||
|
RentcarPoint rentCarLamesa = new RentcarPoint()
|
||||||
|
{
|
||||||
|
Position = Rentcar.lamesaBlipPosition
|
||||||
|
};
|
||||||
|
|
||||||
rentcarPoints.Add(rentCarNoobSpawn);
|
rentcarPoints.Add(rentCarNoobSpawn);
|
||||||
rentcarPoints.Add(rentCarStadthalle);
|
rentcarPoints.Add(rentCarStadthalle);
|
||||||
rentcarPoints.Add(rentCarKnast);
|
rentcarPoints.Add(rentCarKnast);
|
||||||
|
rentcarPoints.Add(rentCarPaleto);
|
||||||
|
rentcarPoints.Add(rentCarLamesa);
|
||||||
|
|
||||||
foreach (RentcarPoint point in rentcarPoints)
|
foreach (RentcarPoint point in rentcarPoints)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -33,6 +33,16 @@ namespace ReallifeGamemode.Server.Util
|
|||||||
private static double knastVehicleSpawnHeading = 173.14825;
|
private static double knastVehicleSpawnHeading = 173.14825;
|
||||||
public static Vector3 knastBlipPosition = new Vector3(1220.3483, 2725.4932, 38.00414);
|
public static Vector3 knastBlipPosition = new Vector3(1220.3483, 2725.4932, 38.00414);
|
||||||
|
|
||||||
|
public static List<RentcarProperty> paletoVehicleProperties = new List<RentcarProperty>();
|
||||||
|
private static Vector3 paletoVehicleSpawnPosition = new Vector3(-216.75778198242188, 6215.0068359375, 31.490657806396484);
|
||||||
|
private static double paletoVehicleSpawnHeading = -133.99148559570312;
|
||||||
|
public static Vector3 paletoBlipPosition = new Vector3(-214.52447509765625, 6218.1708984375, 31.49131965637207);
|
||||||
|
|
||||||
|
public static List<RentcarProperty> lamesaVehicleProperties = new List<RentcarProperty>();
|
||||||
|
private static Vector3 lamesaVehicleSpawnPosition = new Vector3(811.4766235351562, -1041.594482421875, 26.58707618713379);
|
||||||
|
private static double lamesaVehicleSpawnHeading = 88.71146392822266;
|
||||||
|
public static Vector3 lamesaBlipPosition = new Vector3(818.3075561523438, -1039.78759765625, 26.750783920288086);
|
||||||
|
|
||||||
public static Dictionary<string, (Vehicle, int)> mapPlayerRentcarBill = new Dictionary<string, (Vehicle, int)>();
|
public static Dictionary<string, (Vehicle, int)> mapPlayerRentcarBill = new Dictionary<string, (Vehicle, int)>();
|
||||||
|
|
||||||
public static void Setup()
|
public static void Setup()
|
||||||
@@ -45,6 +55,12 @@ namespace ReallifeGamemode.Server.Util
|
|||||||
|
|
||||||
knastVehicleProperties.Add(new RentcarProperty("bmx", 10));
|
knastVehicleProperties.Add(new RentcarProperty("bmx", 10));
|
||||||
knastVehicleProperties.Add(new RentcarProperty("faggio3", 50));
|
knastVehicleProperties.Add(new RentcarProperty("faggio3", 50));
|
||||||
|
|
||||||
|
paletoVehicleProperties.Add(new RentcarProperty("bmx", 10));
|
||||||
|
paletoVehicleProperties.Add(new RentcarProperty("faggio3", 50));
|
||||||
|
|
||||||
|
lamesaVehicleProperties.Add(new RentcarProperty("bmx", 10));
|
||||||
|
lamesaVehicleProperties.Add(new RentcarProperty("faggio3", 50));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void cancelRent(Player player)
|
public static void cancelRent(Player player)
|
||||||
@@ -137,6 +153,14 @@ namespace ReallifeGamemode.Server.Util
|
|||||||
{
|
{
|
||||||
v = NAPI.Vehicle.CreateVehicle(uHash, knastVehicleSpawnPosition, (float)knastVehicleSpawnHeading, 111, 111, engine: true);
|
v = NAPI.Vehicle.CreateVehicle(uHash, knastVehicleSpawnPosition, (float)knastVehicleSpawnHeading, 111, 111, engine: true);
|
||||||
}
|
}
|
||||||
|
else if (rentcarLocation == "paleto")
|
||||||
|
{
|
||||||
|
v = NAPI.Vehicle.CreateVehicle(uHash, paletoVehicleSpawnPosition, (float)paletoVehicleSpawnHeading, 111, 111, engine: true);
|
||||||
|
}
|
||||||
|
else if (rentcarLocation == "lamesa")
|
||||||
|
{
|
||||||
|
v = NAPI.Vehicle.CreateVehicle(uHash, lamesaVehicleSpawnPosition, (float)lamesaVehicleSpawnHeading, 111, 111, engine: true);
|
||||||
|
}
|
||||||
|
|
||||||
if (v == null)
|
if (v == null)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user