|
You last visited: Today at 01:17
Advertisement
How can i check players in map ?
Discussion on How can i check players in map ? within the CO2 Private Server forum part of the Conquer Online 2 category.
03/02/2020, 08:52
|
#1
|
elite*gold: 0
Join Date: Mar 2013
Posts: 37
Received Thanks: 3
|
How can i check players in map ?
i want make new event. i was finished all but i need just check how many players in map before enter the event. i can check players in same map. But i dont want this. For example im in twincity i can check how many players have in twincity. i want when im in twincity i want check how many players have in apecity. How can i do this guys. Please help me im new for c# Thank you for your help.. Have a good day..
|
|
|
03/02/2020, 10:01
|
#2
|
elite*gold: 0
Join Date: Jul 2006
Posts: 2,216
Received Thanks: 794
|
Moved to this section.
|
|
|
03/02/2020, 18:17
|
#3
|
elite*gold: 0
Join Date: Feb 2014
Posts: 155
Received Thanks: 81
|
Check for ApeCity's mapId instead of Tc lol
Seriously though, there's a few ways to do that.. What source are you using?
|
|
|
03/02/2020, 18:22
|
#4
|
elite*gold: 12
Join Date: Jul 2011
Posts: 8,282
Received Thanks: 4,190
|
Are you asking how to count players within the city on the map? Without adding another data representation of the player's coordinate points, I think your only option would be to compare coordinates or cell flags. Either set a flag on the cell that indicates that it's an event trigger or manually compare cell coordinates against a range.
|
|
|
03/02/2020, 21:29
|
#5
|
elite*gold: 0
Join Date: Mar 2013
Posts: 37
Received Thanks: 3
|
i was make 1vs1 arena and have 4 room. for example Room1 have 2 players. and someone want to enter Room1. i want check Romm1 and if have 2 players in map someone cant enter Room1. this is possible ?
|
|
|
03/02/2020, 21:54
|
#6
|
elite*gold: 0
Join Date: Jul 2009
Posts: 943
Received Thanks: 408
|
Anything is possible if you're capable of making an algorithm for this. And that means that it's impossible for you.
Probably your server does have a Dictionary with all your maps and it might just be a check like this
Code:
if (Kernel.Maps[1002].Players.Count < 2) {
doSomething();
}
or something that wont throw an exception like
Code:
if (Kernel.Maps.TryGetValue(1002, out Map map) && map.Players.Count < 2) {
doSomething();
}
|
|
|
03/03/2020, 00:10
|
#7
|
elite*gold: 12
Join Date: Jul 2011
Posts: 8,282
Received Thanks: 4,190
|
Quote:
Originally Posted by cocoemre
i was make 1vs1 arena and have 4 room. for example Room1 have 2 players. and someone want to enter Room1. i want check Romm1 and if have 2 players in map someone cant enter Room1. this is possible ?
|
Yes, that's possible. I'm not sure why you'd need to check that though for an arena system. Normally, you'd create a new instance of the arena map, put the two players in that map, and then have a timer job or on death trigger that awards the winner, removes and revives the players, and cleans up the map. It sounds like this might be a bit too advanced for you right now though. Maybe start with NPCs and try creating other type of events while you learn. You'll learn pretty quickly, as long as you take a lot of time to learn the basics and how to navigate your server's source code.
|
|
|
03/06/2020, 17:26
|
#8
|
elite*gold: 0
Join Date: Mar 2013
Posts: 37
Received Thanks: 3
|
Thank you for everything. i was fix it this problem. I think I'm starting to understand
|
|
|
03/06/2020, 18:21
|
#9
|
elite*gold: 0
Join Date: Jul 2009
Posts: 943
Received Thanks: 408
|
Quote:
Originally Posted by Spirited
Yes, that's possible. I'm not sure why you'd need to check that though for an arena system. Normally, you'd create a new instance of the arena map, put the two players in that map, and then have a timer job or on death trigger that awards the winner, removes and revives the players, and cleans up the map. It sounds like this might be a bit too advanced for you right now though. Maybe start with NPCs and try creating other type of events while you learn. You'll learn pretty quickly, as long as you take a lot of time to learn the basics and how to navigate your server's source code.
|
Your patience really surprises me. I admire it.
|
|
|
03/07/2020, 21:22
|
#10
|
elite*gold: 12
Join Date: Jul 2011
Posts: 8,282
Received Thanks: 4,190
|
Quote:
Originally Posted by pintinho12
Your patience really surprises me. I admire it.
|
You never know who else is reading and learning from misinformation. Plus, if you treat someone like an idiot for asking a question, then they're going to stop asking questions. I give a lot of people **** here for not trying their hardest or doing things they shouldn't be doing, but asking real questions isn't one of those things. And as I said, you never know who else is benefiting from those answers. I was definitely one of those people in the background getting started here.
|
|
|
03/08/2020, 16:10
|
#11
|
elite*gold: 0
Join Date: Mar 2013
Posts: 37
Received Thanks: 3
|
you are absolutely right. Thanks to your I can achieve this thing.
I sometimes find things that can help me in the comments when I research topics.. will help those who are researching similar topics. Thanks for helping
|
|
|
Similar Threads
|
CSS Map: Host_EndGame: Map coordinate extents are too large!! Check for errors!
12/11/2012 - Counter-Strike - 9 Replies
Hey,
als ich das gelesen habe, dachte ich WTF???
Guckt euch die Screens an. NULL außer dem Grid. Bei Fehlersuche nur info_player_spawn, was unötig ist für CSS.
Log im Anhang
|
Monster Level Check or Map Level Check?
01/28/2010 - Dekaron - 78 Replies
I was looking into how to find a way around the DC on higher level maps thing, and I was wondering if anybody has found out if it DC's because of mob levels, or because of the maps level.
I don't have a level 80-84 character, but if anyone does, please go to Python and pull some mobs from inner python castle into the normal area (level 80 area) and kill them. PM me with results.
I'm really interested to see what happens with that, because if it checks mob levels, then it will DC. If it...
|
All times are GMT +1. The time now is 01:18.
|
|