code formatiert

This commit is contained in:
hydrant
2020-08-04 21:51:38 +02:00
parent c4d4b16006
commit 76d72eebdf
40 changed files with 237 additions and 208 deletions

View File

@@ -1,4 +1,4 @@
using System.Text.RegularExpressions;
using System.Text.RegularExpressions;
using GTANetworkAPI;
using ReallifeGamemode.Server.Services;

View File

@@ -63,12 +63,12 @@ namespace ReallifeGamemode.Server.Events
{
//if (player.Vehicle.GetData<bool>("timerJobVehicleRespawn") == true)
//{
if (player.Vehicle.GetServerVehicle() is JobVehicle vehJ)
{
player.Vehicle.ResetData("timerJobVehicleRespawn");
ServerVehicle sVeh = VehicleManager.GetServerVehicleFromVehicle(player.Vehicle);
ServerVehicleExtensions.Spawn(sVeh, player.Vehicle);
}
if (player.Vehicle.GetServerVehicle() is JobVehicle vehJ)
{
player.Vehicle.ResetData("timerJobVehicleRespawn");
ServerVehicle sVeh = VehicleManager.GetServerVehicleFromVehicle(player.Vehicle);
ServerVehicleExtensions.Spawn(sVeh, player.Vehicle);
}
//}
}
if (Managers.JobManager.playerTimersJobVehicleRespawn.ContainsKey(player))

View File

@@ -50,13 +50,13 @@ namespace ReallifeGamemode.Server.Events
player.SendNotification("~r~Du darfst dieses Fahrzeug nicht benutzen!", true);
return;
}
else if(u.IsAdmin(AdminLevel.HEADADMIN) && player.IsAdminDuty())
else if (u.IsAdmin(AdminLevel.HEADADMIN) && player.IsAdminDuty())
{
}
else
{
if ((VehicleHash)vehicle.Model == VehicleHash.Velum && player.GetUser().PilotSkill < 300)
{
{
player.SetData("JobVehicleFrei", true);
player.StopAnimation();
player.SendNotification("~y~[JOB] ~r~Du besitzt nicht das nötige Skill Level(2)!");

View File

@@ -88,10 +88,10 @@ namespace ReallifeGamemode.Server.Events
{
//if (!p.IsInVehicle)
//{
if (p.GetData<bool>("HatNoobSpawnVehicle") == true)
{
p.ResetData("HatNoobSpawnVehicle");
}
if (p.GetData<bool>("HatNoobSpawnVehicle") == true)
{
p.ResetData("HatNoobSpawnVehicle");
}
//}
});
});

View File

@@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using GTANetworkAPI;
using Newtonsoft.Json;

View File

@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Text;
using GTANetworkAPI;

View File

@@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using GTANetworkAPI;
namespace ReallifeGamemode.Server.Events

View File

@@ -61,7 +61,7 @@ namespace ReallifeGamemode.Server.Events
int[] clothId = JsonConvert.DeserializeObject<int[]>(JClothId);
user = client.GetUser(context);
var character = user.GetCharacter(context);
var charClothes = context.CharacterClothes.FirstOrDefault(c => c.UserId == user.Id && c.Duty);
@@ -137,7 +137,7 @@ namespace ReallifeGamemode.Server.Events
if (user.GetData<bool>("duty") == false)
{
LoadCharacterDefaults(client);
}
}
}
[RemoteEvent("defaultCharacterCloth")]
@@ -159,10 +159,10 @@ namespace ReallifeGamemode.Server.Events
{
if (cloth.SlotType == 1)
{
if(cloth.ClothId != -1)
if (cloth.ClothId != -1)
{
NAPI.Player.SetPlayerAccessory(player, cloth.SlotId, cloth.ClothId, 0);
}
}
}
else
{

View File

@@ -1,4 +1,4 @@
using GTANetworkAPI;
using GTANetworkAPI;
using ReallifeGamemode.Server.Managers;
namespace ReallifeGamemode.Server.Events

View File

@@ -84,16 +84,16 @@ namespace ReallifeGamemode.Server.Events
client.GiveWeapon((WeaponHash)primary, 300);
client.GiveWeapon((WeaponHash)secondary, 100);
client.GiveWeapon((WeaponHash)melee, 1);
if (!uint.TryParse(specialModel, out uint special))
{
if (specialModel.Contains("mk2") && !specialModel.Contains("_mk2")) specialModel = specialModel.Replace("mk2", "_mk2");
special = NAPI.Util.GetHashKey($"weapon_{specialModel}");
}
client.GiveWeapon((WeaponHash)special, 30);
if(armor == "Schutzweste")
if (!uint.TryParse(specialModel, out uint special))
{
if (specialModel.Contains("mk2") && !specialModel.Contains("_mk2")) specialModel = specialModel.Replace("mk2", "_mk2");
special = NAPI.Util.GetHashKey($"weapon_{specialModel}");
}
client.GiveWeapon((WeaponHash)special, 30);
if (armor == "Schutzweste")
{
client.Armor = 100;
}

View File

@@ -69,7 +69,7 @@ namespace ReallifeGamemode.Server.Events
}
}
VehicleStreaming.SetEngineState(v, !state);
}
}

View File

@@ -1,4 +1,4 @@
using GTANetworkAPI;
using GTANetworkAPI;
/**
* @overview Life of German Reallife - Event Voice (Voice.cs)