code formatiert
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Text.RegularExpressions;
|
||||
using GTANetworkAPI;
|
||||
using ReallifeGamemode.Server.Services;
|
||||
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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)!");
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
//}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using GTANetworkAPI;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using GTANetworkAPI;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using GTANetworkAPI;
|
||||
|
||||
namespace ReallifeGamemode.Server.Events
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using GTANetworkAPI;
|
||||
using GTANetworkAPI;
|
||||
using ReallifeGamemode.Server.Managers;
|
||||
|
||||
namespace ReallifeGamemode.Server.Events
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ namespace ReallifeGamemode.Server.Events
|
||||
}
|
||||
}
|
||||
VehicleStreaming.SetEngineState(v, !state);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using GTANetworkAPI;
|
||||
using GTANetworkAPI;
|
||||
|
||||
/**
|
||||
* @overview Life of German Reallife - Event Voice (Voice.cs)
|
||||
|
||||
Reference in New Issue
Block a user