Raised This Month: $32 Target: $400
 8% 

Hud Frag Leader


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
dendodo1235
Member
Join Date: Feb 2015
Old 03-13-2015 , 16:44   Hud Frag Leader
Reply With Quote #1

[CS 1.6] Is it possible to show the frag leader(score leader/who has the most kills) with red hud message to eveyone ? I couldn't find it anywhere

Last edited by dendodo1235; 03-13-2015 at 16:45.
dendodo1235 is offline
ANTICHRISTUS
kingdom of weird stuff
Join Date: Jun 2010
Location: My kingdom is not in thi
Old 03-13-2015 , 18:10   Re: Hud Frag Leader
Reply With Quote #2

something like the default statsx.amxx plugin ?
__________________
ANTICHRISTUS is offline
dendodo1235
Member
Join Date: Feb 2015
Old 03-13-2015 , 19:45   Re: Hud Frag Leader
Reply With Quote #3

No, i said hud message at the middle of screen thx for your reply
dendodo1235 is offline
sirerick
Senior Member
Join Date: Jul 2012
Location: Venezuela
Old 03-13-2015 , 23:11   Re: Hud Frag Leader
Reply With Quote #4

again edit

PHP Code:
#include <amxmodx>
#define TASK_FRAGS 1111 

new g_maxplayersg_playername[33][33], g_MsgSync

public plugin_init()
{
    
g_maxplayers get_maxplayers()
    
g_MsgSync CreateHudSyncObj()
}

public 
client_putinserver(id)
{
    
get_user_name(idg_playername[id], charsmax(g_playername[])) 
    
set_task(5.0"best_player"id+TASK_FRAGS__"b")
}

public 
client_disconnect(id)
{
    
remove_task(id+TASK_FRAGS)
}

GetPlayers()
{
    static 
Playersid 
    Players
0
    
for (id 1id <= g_maxplayersid++)
    {
        if(
is_user_connected(id)) 
            
Players++
    }
    return 
Players
}

GetRandomPlayers(n)
{
    static 
Playersid 
    Players
0
    
for (id 1id <= g_maxplayersid++)
    {
        if(
is_user_connected(id)) 
            
Players++
        
        if (
Players == n)
            return 
id;
    }
    return -
1;
}

public 
best_player(taskID)
{
    
taskID TASK_FRAGS
    
    
static iPlayersnumiPlayersnum GetPlayers()
    
    if (
iPlayersnum 1) return;
    
    static 
bestbest GetRandomPlayers(random_num(1iPlayersnum))
    
    for (new 
1g_maxplayersi++)
    {
        if (!
is_user_connected(i)) continue;
        
        if (
get_user_frags(i) > get_user_frags(best))
            
best i
        
else if (get_user_frags(i) == get_user_frags(best) && get_user_deaths(i) < get_user_deaths(best))
            
best i
        
else if (get_user_frags(i) == get_user_frags(best) && get_user_deaths(i) == get_user_deaths(best))
            
best i
    
}
    
    
set_hudmessage(255000.800.1506.06.00.08.03)
    
ShowSyncHudMsg(0g_MsgSync"Best Player ^n%s ^nFrags %d"g_playername[best], get_user_frags(best))


Last edited by sirerick; 03-14-2015 at 17:47. Reason: tema
sirerick is offline
dendodo1235
Member
Join Date: Feb 2015
Old 03-14-2015 , 03:22   Re: Hud Frag Leader
Reply With Quote #5

it does not work
dendodo1235 is offline
sirerick
Senior Member
Join Date: Jul 2012
Location: Venezuela
Old 03-14-2015 , 08:35   Re: Hud Frag Leader
Reply With Quote #6

try again i edite code and test, this work now
sirerick is offline
dendodo1235
Member
Join Date: Feb 2015
Old 03-14-2015 , 10:56   Re: Hud Frag Leader
Reply With Quote #7

Quote:
Originally Posted by sirerick View Post
try again i edite code and test, this work now
Hud message disappears :/

Last edited by dendodo1235; 03-14-2015 at 11:03.
dendodo1235 is offline
sirerick
Senior Member
Join Date: Jul 2012
Location: Venezuela
Old 03-14-2015 , 11:25   Re: Hud Frag Leader
Reply With Quote #8

you want permanent hud? e.e
sirerick is offline
dendodo1235
Member
Join Date: Feb 2015
Old 03-14-2015 , 17:29   Re: Hud Frag Leader
Reply With Quote #9

Yep, it shows Leader as first connected person with 0 frags then disappears. If its possible it would show the leader during map time. :/ Thx for your help anyways. You are the only one who replied this thread.
dendodo1235 is offline
sirerick
Senior Member
Join Date: Jul 2012
Location: Venezuela
Old 03-14-2015 , 17:47   Re: Hud Frag Leader
Reply With Quote #10

i edite again, end...
sirerick is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:23.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode