[Release] Broadcast
Vamos começar
No, Client.cs pesquise!
Depois que adicionar:
Substituir todo o caso, com;
Vamos começar
No, Client.cs pesquise!
public class Client {
Depois que adicionar:
public DateTime CanBroadcastTime = DateTime.Now; public bool CanBroadcast = true;
Agora procure "case 2050:"
Substituir todo o caso, com;
case 2050: { if (MyChar.LocMap == 6001 || MyChar.LocMap == 6000) { SendPacket(General.MyPackets.SendMsg(MessageId, "SYSTEM", MyChar.Name, "You can't do that here!", 2005)); } else { if (!CanBroadcast) if (DateTime.Now >= CanBroadcastTime) CanBroadcast = true; if (CanBroadcast) { if (Data[4] == 3 && MyChar.CPs >= 5) { MyChar.CPs -= 5; SendPacket(General.MyPackets.Vital(MyChar.UID, 30, MyChar.CPs)); byte Len = Data[13]; string Message = ""; for (int i = 0; i < Len; i++) { Message += Convert.ToChar(Data[14 + i]); } World.SendMsgToAll(Message, MyChar.Name, 2500); SendPacket(General.MyPackets.SendMsg(MessageId, "SYSTEM", MyChar.Name, "Message sent successfully!.", 2005)); CanBroadcast = false; CanBroadcastTime = DateTime.Now.AddSeconds(20); } } else { SendPacket(General.MyPackets.SendMsg(MessageId, "SYSTEM", MyChar.Name, "Please wait to send your message!", 2005)); } } break; }