fix onlineliste
This commit is contained in:
@@ -48,6 +48,7 @@ export default class InputHelper {
|
||||
clearInterval(disableInputTimer);
|
||||
mp.events.remove('cef_inputhelper_sendvalue');
|
||||
mp.events.remove('cef_request_title');
|
||||
mp.events.remove('closeinputhelper');
|
||||
this.browser.destroy();
|
||||
this.data.InInput = false;
|
||||
this.data.InMenu = false;
|
||||
|
||||
@@ -85,11 +85,6 @@ namespace ReallifeGamemode.Server.Commands
|
||||
[Command("hub")]
|
||||
public void CmdAnim(Player player)
|
||||
{
|
||||
if (!player.GetUser()?.IsAdmin(AdminLevel.SUPPORTER) ?? true)
|
||||
{
|
||||
ChatService.NotAuthorized(player);
|
||||
return;
|
||||
}
|
||||
player.PlayAnimation("mp_am_hold_up", "handsup_base", (int)(AnimationFlags.Loop | AnimationFlags.OnlyAnimateUpperBody | AnimationFlags.AllowPlayerControl | AnimationFlags.Cancellable));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -617,30 +617,15 @@ namespace ReallifeGamemode.Server.Events
|
||||
{
|
||||
if (!player.IsLoggedIn()) return;
|
||||
List<Player> players = NAPI.Pools.GetAllPlayers();
|
||||
if(player.GetUser().Faction != null)
|
||||
{
|
||||
var listPlayers = players.Select(p => new
|
||||
{
|
||||
Id = p.Handle.Value,
|
||||
p.Name,
|
||||
p.Ping,
|
||||
FactionName = p.GetUser().Faction.Name,
|
||||
FactionName = p.GetUser().Faction?.Name ?? "Zivilist",
|
||||
}) ;
|
||||
player.TriggerEvent("showPlayerlist", JsonConvert.SerializeObject(listPlayers));
|
||||
}
|
||||
else
|
||||
{
|
||||
var listPlayers = players.Select(p => new
|
||||
{
|
||||
Id = p.Handle.Value,
|
||||
p.Name,
|
||||
p.Ping,
|
||||
FactionName = "Zivilist",
|
||||
});
|
||||
player.TriggerEvent("showPlayerlist", JsonConvert.SerializeObject(listPlayers));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[RemoteEvent("keyPress:K")]
|
||||
public void KeyPressK(Player player)
|
||||
|
||||
Reference in New Issue
Block a user