Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Request !shop hud to show player with highest points
#1
as per title anyone, say top 3 or 4
ty
[Image: b_560_95_1.png]


[Image: b_560_95_1.png]

Reply

#2
Wait i'll find function and post there

Edit:

Code:
public ServerClient getMostTop()
        {
            int temp = 0;

            ServerClient guy = null;
            List<ServerClient> players = GetClients();
            for (int i = 0; i < players.Count; i++)
            {
                if (player[i].stats.kills >= temp)
                {
                    temp = player[i].stats.kills;
                    guy = players[i];
                }
            }

            return guy;
        }
(Original credits to creators of rotu mod, i have rewritten this function to c#)
You can create variables like
Code:
serverclient top1
serverclient top2
serverclient top3

Then make it
Code:
top1 = getMostTop();
top2 = getMostTop();
top3 = getMostTop();

And add this line to 'getMostTop'
if(player[i].stats.kills >= temp && players[i] != top1 && players[i] != top3 && players[i] != top4 )
{
guy = etc....
}

Then print their names.
Code:
Use topX.Name

It was working perfectly in my killme zombiemod.
C++/Obj-Cdeveloper. Neko engine wip
Steam: Click
Reply

#3
(02-21-2013, 14:12)SailorMoon Wrote: Wait i'll find function and post there

Edit:

Code:
public ServerClient getMostTop()
        {
            int temp = 0;

            ServerClient guy = null;
            List<ServerClient> players = GetClients();
            for (int i = 0; i < players.Count; i++)
            {
                if (player[i].stats.kills >= temp)
                {
                    temp = player[i].stats.kills;
                    guy = players[i];
                }
            }

            return guy;
        }
(Original credits to creators of rotu mod, i have rewritten this function to c#)
You can create variables like
Code:
serverclient top1
serverclient top2
serverclient top3

Then make it
Code:
top1 = getMostTop();
top2 = getMostTop();
top3 = getMostTop();

And add this line to 'getMostTop'
if(player[i].stats.kills >= temp && players[i] != top1 && players[i] != top3 && players[i] != top4 )
{
guy = etc....
}

Then print their names.
Code:
Use topX.Name

It was working perfectly in my killme zombiemod.
and that now with your kiLL ME mod?: :


: :
Reply

#4
ty i'l give it ago Wink

oh well i'm lost already sigh*
[Image: b_560_95_1.png]


[Image: b_560_95_1.png]

Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  Help Sentry Gun kill = Player kill Snake 8 5,859 11-07-2013, 13:41
Last Post: Nekochan
  [Request] Health and Points on hud source robinvm 7 5,589 10-27-2013, 08:23
Last Post: robinvm
  [Release] CS addon for MW2(Sounds,show damage) Fl0w_.JACKDAN 1 4,690 09-29-2013, 19:46
Last Post: Nekochan
  Player can write Fl0w_.JACKDAN 2 3,345 09-19-2013, 16:36
Last Post: Fl0w_.JACKDAN
  Shop Database Hallla 5 4,792 07-23-2013, 07:33
Last Post: xfxtroll
  [News] Show your wallpaper. Nekochan 6 4,681 07-10-2013, 19:02
Last Post: House
Wink [Release] Shop system for Infected gametype Nekochan 125 76,184 07-05-2013, 18:09
Last Post: mohammadnanaa
  [CoD 4] Trying to set a player -- DidUknowiPwn 7 5,843 07-03-2013, 21:58
Last Post: Pozzuh
  [Release] Black Ops Single Player/Zombie Trainer V3.6 Craig87 52 88,446 07-01-2013, 15:12
Last Post: explosivebanana55
Video Preview AIZombies eXtreme 2.0 / Zombie Player (Music Player) DidUknowiPwn 4 5,860 06-24-2013, 16:37
Last Post: DidUknowiPwn

Forum Jump:


Users browsing this thread:
2 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.