|
You last visited: Today at 08:39
Advertisement
Weather in 5520+
Discussion on Weather in 5520+ within the CO2 Private Server forum part of the Conquer Online 2 category.
11/03/2011, 23:27
|
#1
|
elite*gold: 0
Join Date: Mar 2010
Posts: 475
Received Thanks: 14
|
Weather in 5520+
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 ?
|
|
|
11/03/2011, 23:45
|
#2
|
elite*gold: 12
Join Date: Jul 2011
Posts: 8,219
Received Thanks: 4,122
|
That's not the weather system, that's the sky color system.
|
|
|
11/03/2011, 23:52
|
#3
|
elite*gold: 0
Join Date: Mar 2010
Posts: 475
Received Thanks: 14
|
Quote:
Originally Posted by Fаng
That's not the weather system, that's the sky color system.
|
oh , you are right , i forgot about that. Lol
how to make its night tho bro ?
|
|
|
11/04/2011, 00:19
|
#4
|
elite*gold: 0
Join Date: Nov 2009
Posts: 380
Received Thanks: 58
|
night it's just a screen color...if you will search here will got night ^ day system released
|
|
|
11/04/2011, 00:25
|
#5
|
elite*gold: 0
Join Date: Oct 2011
Posts: 267
Received Thanks: 59
|
Code:
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);
}
}
|
|
|
11/04/2011, 01:17
|
#6
|
elite*gold: 0
Join Date: Mar 2010
Posts: 475
Received Thanks: 14
|
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 :
PHP Code:
public uint ScreenColor { get; set; }
is this correct ?
now i am getting this
an object reference is required for the nonstatic field method or property
for Entity.UID
|
|
|
11/04/2011, 01:44
|
#7
|
elite*gold: 0
Join Date: Oct 2011
Posts: 267
Received Thanks: 59
|
Quote:
Originally Posted by abdeen
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 :
PHP Code:
public uint ScreenColor { get; set; }
is this correct ?
now i am getting this
an object reference is required for the nonstatic field method or property
for Entity.UID
|
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();
|
|
|
11/04/2011, 01:54
|
#8
|
elite*gold: 0
Join Date: Mar 2010
Posts: 475
Received Thanks: 14
|
Quote:
Originally Posted by -Sensei-
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();
|
thanks , that`s what i did .
but i have these 4 errors
|
|
|
11/04/2011, 02:03
|
#9
|
elite*gold: 12
Join Date: Jul 2011
Posts: 8,219
Received Thanks: 4,122
|
You can't copy and paste it....
**** dude... think =|
You need to implement it using your own general data packet. It's not that difficult.
|
|
|
11/04/2011, 02:06
|
#10
|
elite*gold: 0
Join Date: Mar 2010
Posts: 475
Received Thanks: 14
|
Quote:
Originally Posted by Fаng
You can't copy and paste it....
**** dude... think =|
You need to implement it using your own general data packet. It's not that difficult.
|
Lol , i edited it already look here :
but this problem i cant fix it without any help :P
|
|
|
11/04/2011, 02:24
|
#11
|
elite*gold: 12
Join Date: Jul 2011
Posts: 8,219
Received Thanks: 4,122
|
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?
|
|
|
11/04/2011, 02:31
|
#12
|
elite*gold: 0
Join Date: Aug 2007
Posts: 1,525
Received Thanks: 230
|
Abden Use it like that ..Client.Entity.UID; and Error will be removed
|
|
|
11/04/2011, 02:32
|
#13
|
elite*gold: 12
Join Date: Jul 2011
Posts: 8,219
Received Thanks: 4,122
|
Quote:
Originally Posted by shadowman123
Abden Use it like that ..Client.Entity.UID; and Error will be removed
|
That would fix the syntax problem but it would create a very large semantic problem.
|
|
|
11/04/2011, 03:27
|
#14
|
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,377
|
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...
|
|
|
11/04/2011, 12:07
|
#15
|
elite*gold: 0
Join Date: Jun 2005
Posts: 692
Received Thanks: 353
|
Quote:
Originally Posted by pro4never
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...
|
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();
}
|
|
|
|
|
Similar Threads
|
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
|
All times are GMT +2. The time now is 08:41.
|
|