Okay , so i am trying to make its night , i coded it to Rain , Snow , Rain Wind and Blowing Cotton and its working fine , but i don't know how to make it`s Night
any help ?
any help ?
public void Nighttime() { ScreenColor = 5855577; Network.GamePackets.Data Packet = new Network.GamePackets.Data(true); Packet.UID = Entity.UID; Packet.ID = 104; Packet.dwParam = ScreenColor; foreach (GameState pclient in ServerBase.Kernel.GamePool.Values) { pclient.Send(Packet); } }
public uint ScreenColor { get; set; }
Hey that wont work.Quote:
thanks -Sensei- , i`ll try it .
Edit :
what the property stub for screencolor , and
an object reference is required for the nonstatic field method or property
for Entity.UID
Edit :
i made it :
is this correct ?PHP Code:
public uint ScreenColor { get; set; }
now i am getting this
an object reference is required for the nonstatic field method or property
for Entity.UID
if (DateTime.Now.Hour == 00 && DateTime.Now.Minute == 0) { foreach (Client.GameState clients in ServerBase.Kernel.GamePool.Values) { try { clients.Nighttime();
thanks , that`s what i did .Quote:
Hey that wont work.
Set a time when will be night. like;
Code:if (DateTime.Now.Hour == 00 && DateTime.Now.Minute == 0) { foreach (Client.GameState clients in ServerBase.Kernel.GamePool.Values) { try { clients.Nighttime();
Lol , i edited it already look here :Quote:
You can't copy and paste it....
damn dude... think =|
You need to implement it using your own general data packet. It's not that difficult.
Unless the method is inside of his player class, which he would then loop through the ingame players calling said method to change the map color.Quote:
I weep....
Fang explained it properly. You should be assigning the uid for the packet based on the loop not based on a single player...
public class Player { public void ChangeToNightTime() { const uint COLOR_NIGHT = 0x595959; var packet = new Network.GamePackets.Data(true); packet.UID = Entity.UID; packet.ID = 104; packet.dwParam = COLOR_NIGHT; Send(Packet); } } ... foreach (var player in ServerBase.Kernel.GamePool.Values) { player.ChangeToNightTime(); }