public void RecallNativeCallOnTickForPlayer(Client player, string identifier) { var wrapper = new NativeTickCall(); wrapper.Identifier = identifier; var bin = SerializeBinary(wrapper); var msg = Server.CreateMessage(); msg.Write((int)PacketType.NativeTickRecall); msg.Write(bin.Length); msg.Write(bin); player.NetConnection.SendMessage(msg, NetDeliveryMethod.ReliableOrdered, GetChannelIdForConnection(player)); }
public void RecallNativeCallOnTickForAllPlayers(string identifier) { var wrapper = new NativeTickCall(); wrapper.Identifier = identifier; var bin = SerializeBinary(wrapper); var msg = Server.CreateMessage(); msg.Write((int)PacketType.NativeTickRecall); msg.Write(bin.Length); msg.Write(bin); Server.SendToAll(msg, NetDeliveryMethod.ReliableOrdered); }
public void SetNativeCallOnTickForAllPlayers(string identifier, ulong hash, params object[] arguments) { var obj = new NativeData(); obj.Hash = hash; obj.Arguments = ParseNativeArguments(arguments); var wrapper = new NativeTickCall(); wrapper.Identifier = identifier; wrapper.Native = obj; var bin = SerializeBinary(wrapper); var msg = Server.CreateMessage(); msg.Write((int)PacketType.NativeTick); msg.Write(bin.Length); msg.Write(bin); Server.SendToAll(msg, NetDeliveryMethod.ReliableOrdered); }