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

06/03/2011 06:05 abdeen#1
hey Epvp Members , i am looking for Check how many players alive on the current map , can anybody help me to find it ?

thanks everybody .
06/03/2011 12:07 12tails#2
nice my name is 123tails now oO

hmm lol... do something like :

Code:
int alive = 0;
foreach(Entity player in Program.GamePool.Values)
    if(player.Map = Desiredmaphere)
         if(player.Alive)//or if (!player.ContainsFlag(Enums.Flags.Dead))
              alive++;
don't copy e paste.. its an example >D
06/03/2011 12:26 Kiyono#3
Well at least he got the tails right.
06/03/2011 13:00 BaussHacker#4
Quote:
Originally Posted by Kiyono View Post
Well at least he got the tails right.
I was thinking exactly the same.
06/03/2011 13:56 _DreadNought_#5
This "guy" emailed me asking how o.O why he made a thread just goes to show that unless you give him exactly the right code he can copy+paste into his source he'll keep asking.

The code I gave him to adapt was something like
Code:
foreach(GameClient client in Kernel.GamePool.Values)
{
       if (client.Char.MapID.Id == MapID(desired ID) && (!client.Char.Dead))
       {
                 /*
                  *Execute the code you want to do if there MapID is the correct one
                  *and if the client is Dead.
                 */
       }
}
06/03/2011 14:08 abdeen#6
Quote:
Originally Posted by 12tails View Post
nice my name is 123tails now oO

hmm lol... do something like :

Code:
int alive = 0;
foreach(Entity player in Program.GamePool.Values)
    if(player.Map = Desiredmaphere)
         if(player.Alive)//or if (!player.ContainsFlag(Enums.Flags.Dead))
              alive++;
don't copy e paste.. its an example >D
lol , sorry for wrong name :)

but i think this isnt right code , i need code like

PHP Code:
if (map.playerscount 1
i know this is wrong code , but im looking for one like that code .

to check if the alive players == 1players , which is talking to the npc or more than one player , thats all .

thanks 12Tails :)

i hope you understand my idea .
06/03/2011 14:20 abdeen#7
Quote:
Originally Posted by _DreadNought_ View Post
This "guy" emailed me asking how o.O why he made a thread just goes to show that unless you give him exactly the right code he can copy+paste into his source he'll keep asking.

The code I gave him to adapt was something like
Code:
foreach(GameClient client in Kernel.GamePool.Values)
{
       if (client.Char.MapID.Id == MapID(desired ID) && (!client.Char.Dead))
       {
                 /*
                  *Execute the code you want to do if there MapID is the correct one
                  *and if the client is Dead.
                 */
       }
}

your code didnt worked for me . :confused:
06/03/2011 14:24 abdeen#8
the code which i need must be like this

PHP Code:
                    if (client.Entity.currentmap == 1002)
                        if (
client.Entity.Alive && InMapAlive == 1)
                        {
                            
_GC.MyChar.Teleport(1002438382); 
i need code like thats working on 12Tails Source . :)
06/03/2011 14:27 12tails#9
_DreadNought_ <-- give the same example as me... you just need to use the brain to make it work how do you wan't... also no need to TRIPLE POST!
06/03/2011 14:31 abdeen#10
Quote:
Originally Posted by 12tails View Post
_DreadNought_ <-- give the same example as me... you just need to use the brain to make it work how do you wan't... also no need to TRIPLE POST!
it dosent work for me , could yuou guide how to make it work ?
and sorry for triple post :handsdown:
06/03/2011 15:02 _DreadNought_#11
Because you cant copy and paste, and please quit PM'ing me about your other problems.
06/03/2011 15:10 Mr_PoP#12
Quote:
Originally Posted by _DreadNought_ View Post
Because you cant copy and paste, and please quit PM'ing me about your other problems.
OWNed xD, also you just told him what should he DO DUH!
06/03/2011 16:43 abdeen#13
Quote:
Originally Posted by _DreadNought_ View Post
Because you cant copy and paste, and please quit PM'ing me about your other problems.
i edited it to work fine with my source , but it still give me 1 error . :(
06/03/2011 16:44 _DreadNought_#14
What is the error?
06/03/2011 17:06 abdeen#15
here is pic of problem

[Only registered and activated users can see links. Click Here To Register...]

and here is a pic if i edited it

[Only registered and activated users can see links. Click Here To Register...]