Improved postbuild events, added freecam (F5), add check if vehicle hash is valid, improved deathscreen
This commit is contained in:
@@ -9,6 +9,11 @@ namespace reallife_gamemode.Server.Managers
|
||||
{
|
||||
public class VehicleManager
|
||||
{
|
||||
private static readonly List<string> _enabledMods = new List<string>()
|
||||
{
|
||||
|
||||
};
|
||||
|
||||
private static Dictionary<int, NetHandle> _serverVehicles = new Dictionary<int, NetHandle>();
|
||||
|
||||
public static void AddVehicle(ServerVehicle serverVehicle, Vehicle vehicle)
|
||||
@@ -71,5 +76,20 @@ namespace reallife_gamemode.Server.Managers
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static bool IsValidHash(uint hash)
|
||||
{
|
||||
foreach(VehicleHash vh in Enum.GetValues(typeof(VehicleHash)))
|
||||
{
|
||||
if ((uint)vh == hash) return true;
|
||||
}
|
||||
|
||||
foreach(string mod in _enabledMods)
|
||||
{
|
||||
if (NAPI.Util.GetHashKey(mod) == hash) return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user