Raised This Month: $ Target: $400
 0% 

[req]Need Frags n deaths n rank in HUD


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Danidude
Junior Member
Join Date: Apr 2012
Old 05-09-2012 , 06:42   Re: [req]Need Frags n deaths n rank in HUD
Reply With Quote #8

#include < amxmodx >
#include < csx >

#define PLUGIN "Frags and Deaths"
#define VERSION "2.0"
#define AUTHOR "Danidude"

const Float:REFRESH_RATE = 1.0;
new maxplayers

public plugin_init()
{
register_plugin( PLUGIN, VERSION, AUTHOR )
maxplayers = get_maxplayers()
set_task(1.0,"ShowHud",0,"",0,"b")
register_plugin( "HUD Rank", "0.0.1", "Exolent" );
set_task( REFRESH_RATE, "TaskShowRank", .flags = "b" );
}

public ShowHud()
{
for(new i = 1 ; i <= maxplayers ; i++)
{
new Frags = get_user_frags(i)
new Deaths = get_user_deaths(i)
set_hudmessage(0,255,0,0.02,0.2,0, 1.0, 1.0, 0.1, 0.2, 1)
show_hudmessage(i,"Frags : %d ^nDeaths : %d",Frags,Deaths)
}
}

public TaskShowRank( )
{
new iPlayers[ 32 ], iNum;
get_players( iPlayers, iNum, "ch" );

new iPlayer, iStats[ 8 ];
new iTotalStats = get_statsnum( );

for( new i = 0; i < iNum; i++ )
{
iPlayer = iPlayers[ i ];

set_hudmessage( 0,255,0,0.02,0.28, .holdtime = ( REFRESH_RATE + 0.2 ), .fadeintime = 0.1, .fadeouttime = 0.1, .channel = 3 );
show_hudmessage( iPlayer, "Rank: %d / %d", get_user_stats( iPlayer, iStats, iStats ), iTotalStats );
}
}

Here you go, display fixed

Last edited by Exolent[jNr]; 05-09-2012 at 20:14. Reason: Removed .amxx file.
Danidude is offline
Send a message via Skype™ to Danidude
 



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 20:46.


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