Fixed server -> client transport
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using GTANetworkAPI;
|
||||
using Newtonsoft.Json;
|
||||
using reallife_gamemode.Server.Util;
|
||||
/**
|
||||
* @overview Life of German Reallife - Event Key (Key.cs)
|
||||
@@ -28,7 +29,7 @@ namespace reallife_gamemode.Server.Events
|
||||
|
||||
ListPlayers.Add(lPlayer);
|
||||
}
|
||||
player.TriggerEvent("fetchPlayerList", ListPlayers);
|
||||
player.TriggerEvent("fetchPlayerList", JsonConvert.SerializeObject(ListPlayers));
|
||||
}
|
||||
[RemoteEvent("keyPress:N")]
|
||||
public void KeyPressN(Client player)
|
||||
|
||||
@@ -11,10 +11,10 @@ using GTANetworkAPI;
|
||||
|
||||
namespace reallife_gamemode.Server.Util
|
||||
{
|
||||
public class ListPlayer : Script
|
||||
public class ListPlayer
|
||||
{
|
||||
public int Id;
|
||||
public string Name;
|
||||
public int Ping;
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public int Ping { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user