Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server
You last visited: Today at 20:42

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



123Tails Source Version 5369 Simple Code - important for me :)

Discussion on 123Tails Source Version 5369 Simple Code - important for me :) within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old 06/03/2011, 17:29   #16
 
_DreadNought_'s Avatar
 
elite*gold: 28
Join Date: Jun 2010
Posts: 2,225
Received Thanks: 868
Quote:
Originally Posted by abdeen View Post
here is pic of problem



and here is a pic if i edited it

foreach(ClientState in Kernel.GamePool.Values)
{
if (player.entity.map == 1002)
if (player.entity.alive)
}
_DreadNought_ is offline  
Old 06/03/2011, 18:57   #17
 
elite*gold: 0
Join Date: May 2011
Posts: 1,769
Received Thanks: 756
You want to check how many players there is in a map?
Do a foreach and then use an integer that counts.

If you do not understand such simple things, then you could learn some basic C#?
BaussHacker is offline  
Old 06/03/2011, 19:19   #18
 
abdeen's Avatar
 
elite*gold: 0
Join Date: Mar 2010
Posts: 475
Received Thanks: 15
Quote:
Originally Posted by BaussHacker View Post
You want to check how many players there is in a map?
Do a foreach and then use an integer that counts.

If you do not understand such simple things, then you could learn some basic C#?
im trying to learining C# , but now i need the fixed code to check if the alive players in the current map == 1 or not , code .

thanks dude , i hope you post the code here .

Quote:
Originally Posted by _DreadNought_ View Post
foreach(ClientState in Kernel.GamePool.Values)
{
if (player.entity.map == 1002)
if (player.entity.alive)
}
this code will check count of alive players in the current map ?
abdeen is offline  
Old 06/04/2011, 14:29   #19

 
Kiyono's Avatar
 
elite*gold: 20
Join Date: Jun 2006
Posts: 3,296
Received Thanks: 925
This should work, it checks how many players are alive in the map where you use the command.
Code:
case "aliveinmap":
                                        {
                                            int alive = 0;
                                            foreach (Receivers.ClientState players in ServerBase.Kernel.GamePool.Values)
                                                if (players.Entity.MapID == client.Entity.MapID && (!players.Entity.Dead))
                                                        alive++;
                                            client.Send(new Message("Alive: " + alive, System.Drawing.Color.Magenta, GamePackets.Message.Talk));
                                            break;
                                        }
Kiyono is offline  
Old 06/04/2011, 16:53   #20
 
abdeen's Avatar
 
elite*gold: 0
Join Date: Mar 2010
Posts: 475
Received Thanks: 15
Quote:
Originally Posted by Kiyono View Post
This should work, it checks how many players are alive in the map where you use the command.
Code:
case "aliveinmap":
                                        {
                                            int alive = 0;
                                            foreach (Receivers.ClientState players in ServerBase.Kernel.GamePool.Values)
                                                if (players.Entity.MapID == client.Entity.MapID && (!players.Entity.Dead))
                                                        alive++;
                                            client.Send(new Message("Alive: " + alive, System.Drawing.Color.Magenta, GamePackets.Message.Talk));
                                            break;
                                        }

thanks i`l try this one .
abdeen is offline  
Reply


Similar Threads Similar Threads
Comands for 12talis source (5369)
08/14/2012 - CO2 PServer Guides & Releases - 28 Replies
Here all commands How use? Go to source>Instances>Chat>Commands.cs And read!!!!!!:mad:
Did any one will help us and releases some 5369 source Fixed ??
05/21/2011 - CO2 Private Server - 2 Replies
i hope to found one person to releases some source have fixed things like : - when i got killed by monster, can make reviver " show the button for that " - subclass fixed with npc - that the big problems in 12tilas source in phoenix source .. - just the skills after rebs Tro - Tro - Tro , Monk - Monk - Monl , bla bla - clan system - subclass
Can i ask about this for 5369 source
05/14/2011 - CO2 Private Server - 5 Replies
I have this error I dunno what the cause can you tell me what to do please I have here the image.
Help me source 5369!
05/13/2011 - CO2 Private Server - 5 Replies
In the configuration there is no where to put the name of the database or login and password for app serv help plz:o sorry my bad english



All times are GMT +1. The time now is 20:43.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.