Raised This Month: $ Target: $400
 0% 

[SOLVED] map frags leader show on HUD top-left side.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
wangbochiang
Member
Join Date: Aug 2006
Location: Taiwan - Taichung
Old 03-05-2013 , 02:57   [SOLVED] map frags leader show on HUD top-left side.
Reply With Quote #1

***** I have solved this problem via take a look about "LeaderModel plugin"


Hi Im working on a plugins show Frags Leader on deathmatch.
when player got skills and getting top frags,
his name will show on top-left side ( Radar already removed. )
I have done some of the code but I don't know how to real-time check when player got kill and make sure he is taking the lead.

Can someone help me make this plugin? only I haven't done is the checking part.

* I have see most of "leader glow and leader" plugins but they all do roundend and round start check. (FFA without roundend)

sorry for my bad English :')
__________________
Catch me on : @twitter

Last edited by wangbochiang; 03-06-2013 at 11:26.
wangbochiang is offline
Send a message via MSN to wangbochiang Send a message via Yahoo to wangbochiang Send a message via Skype™ to wangbochiang
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 03-05-2013 , 03:28   Re: map frags leader show on HUD top-left side.
Reply With Quote #2

please post your current code?
Blizzard_87 is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 03-05-2013 , 03:41   Re: map frags leader show on HUD top-left side.
Reply With Quote #3

set_task()
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
wangbochiang
Member
Join Date: Aug 2006
Location: Taiwan - Taichung
Old 03-05-2013 , 04:05   Re: map frags leader show on HUD top-left side.
Reply With Quote #4

Quote:
Originally Posted by Blizzard_87 View Post
please post your current code?
Sorry... I forgot to post my code
This code is a server status hud message, I decide to rewrite this plugins.
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>

new hud_rgbhud_xhud_yhud_effects,maxplayers,hudsync;

public 
plugin_init() {
    
register_plugin("Show Leader On HUD","0001","wangbochiang")
    
hud_rgb register_cvar"dm_hud_rgb""0 255 0" )
    
hud_x register_cvar"dm_hud_x""0.03" )
    
hud_y register_cvar"dm_hud_y""0.00" )
    
hud_effects register_cvar"dm_hud_effects""0" )
    
hudsync CreateHudSyncObj()
    
maxplayers get_maxplayers()
    
set_task(0.1"Fwd_StartFrame"1""0"b")
    
register_forward(FM_StartFrame"Fwd_StartFrame")
}
public 
Fwd_StartFrame(id) {
    new 
timestring[31]
    
get_time("%H:%M:%S",timestring,8)
    static 
Float:GameTimeFloat:FramesPer 0.0
    GameTime 
get_gametime()
    if(
FramesPer >= GameTime)
        
Fps += 1.0;
    else {
        
FramesPer FramesPer 1.0;
        for( new 
id 1id <= maxplayersid++ ) { 
            new 
redgreenblue;
            new 
timeleft get_timeleft();
            
get_hud_color(redgreenblue);
            
set_hudmessage(red,green,blue,get_pcvar_float(hud_x),get_pcvar_float(hud_y),get_pcvar_num(hud_effects),6.0,1.0);
            
ShowSyncHudMsg(id,hudsync,"|*Timeleft: %d:%02d ^n|*Thetime: %s^n|*Frags: %i ^n|*Deaths: %i^n|*Leader: %s",timeleft 60timeleft 60,timestring,get_user_frags(id),get_user_deaths(id));
        }
        
Fps 0.0;
    }
}
get_hud_color(&r, &g, &b) {
    new 
color[20]
    static 
red[5], green[5], blue[5]
    
get_pcvar_string(hud_rgbcolorcharsmax(color))
    
parse(colorredcharsmax(red), greencharsmax(green), bluecharsmax(blue))
    
str_to_num(red)
    
str_to_num(green)
    
str_to_num(blue)

__________________
Catch me on : @twitter

Last edited by wangbochiang; 03-05-2013 at 04:12.
wangbochiang is offline
Send a message via MSN to wangbochiang Send a message via Yahoo to wangbochiang Send a message via Skype™ to wangbochiang
wangbochiang
Member
Join Date: Aug 2006
Location: Taiwan - Taichung
Old 03-05-2013 , 04:13   Re: map frags leader show on HUD top-left side.
Reply With Quote #5

Quote:
Originally Posted by wickedd View Post
set_task()
I'm pretty much sure hudsync is better for info keep showing on HUD
__________________
Catch me on : @twitter
wangbochiang is offline
Send a message via MSN to wangbochiang Send a message via Yahoo to wangbochiang Send a message via Skype™ to wangbochiang
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 03-05-2013 , 11:28   Re: map frags leader show on HUD top-left side.
Reply With Quote #6

And I'm pretty sure you shouldn't double post.

You can use
PHP Code:
register_event("DeathMsg""Event_DeathMsg""a"
for checking players death.
__________________

Last edited by Kia; 03-05-2013 at 11:29.
Kia is offline
Reply


Thread Tools
Display Modes

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 21:49.


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