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
You must not understand the code...
So let's go over it.
So you started by assigning ScreenColor with the integer 5855577. On the next line, you declared and assigned a new general data packet called Packet. Below that, you have your error. That line should assign the UID parameter in the packet with the character's uid (identity number). Let's get back to that later though and read on for now. So below the error line, you assign the type (id) with 104 (which is for Sky Color). After that line, you assign ScreenColor to dwParam (which is the first value parameter in the general data packet).
Then, you have the foreach loop. It states, for each client (which we'll name pclient) in the GamePool (a dictionary with all of your players in it), it will execute what's in brackets. Let's look at what's in the brackets:
So inside the brackets, you see that the server is sending the packet to the player's screen. So.... why are you trying to send the character's id up on the error line when you get the character's info down in the foreach statement?
Fang explained it properly. You should be assigning the uid for the packet based on the loop not based on a single player...
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.
Code:
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();
}
how i can upgrade 5375 to 5520 ? 10/19/2011 - CO2 Private Server - 8 Replies how i can upgrade 5375 to 5520 ?
plz can any one help me and very thanks
can any one help me my source phoenix
can any one help me my source phoenix
Question in 5520 source 09/23/2011 - CO2 Private Server - 4 Replies I've solved every bug in the source except one, that when I wear any garment it decrease my battle power. So where is the problem ?!
Edit:ROFL, 60 views and 0 replies 0.o, is my problem hard?
okay, anybody guess any solution lol.
anyway if you don't know the problem solving reply to give me hope :D
i need all pleas SpwanPacket 5520 09/19/2011 - CO2 Private Server - 7 Replies ples all i need spewanPacket 5520 and Packet Level for 5520 plese chrg level is read 0
5520 help with this error source 08/25/2011 - CO2 Private Server - 3 Replies hi all thanks for releasing your fang work but NEED help with this connection error please help
thanks god bless you all
http://img72.xooimage.com/files/1/5/9/condones-2c 0f3f2.jpg
spawn name Packet 5520 08/21/2011 - CO2 Private Server - 11 Replies hellos Evert Body
this pic http://img832.imageshack.us/img832/7425/44423762.j pg
that when i try to upgrade my sourse from 5375 to 5520 i upgrade the spawn to see the monsters and other chars but i can't see the names of them
and the char is visble??
so i need spawn packet make it fully working