Raised This Month: $ Target: $400
 0% 

Can you Correct dis CODE???


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
bwin.reebok
BANNED
Join Date: Oct 2009
Location: Land(IND)
Old 10-20-2009 , 13:26   Can you Correct dis CODE???
Reply With Quote #1

PHP Code:
#include < amxmodx >
#include < amxmisc >

new gMaxPlayers
new gHeadshots[33]
new 
gUniqueID[33]


public 
plugin_init()
{
    
register_plugin"HS MOTD""1.0""Exolent(rbk)" )
    
register_event"DeathMsg""EventDeathMsg""a" )
    
register_clcmd"say /kills""CmdKills"_"- shows stats screen" )
    
gMaxPlayers get_maxplayers()
}



public 
EventDeathMsg()
{
    new 
attacker read_data)
    if ( 
<= attacker <= gMaxPlayers && read_data) )
    {
        new 
uniqueID get_user_useridattacker )
        if ( 
uniqueID != gUniqueID[attacker] )
        {
            
gHeadshots[attacker] = 0
            gUniqueID
[attacker] = uniqueID
        
}

        
gHeadshots[attacker]++
    }
}



public 
CmdKillsid )
{
        
ShowMOTDid )
        return 
PLUGIN_HANDLED
}
    
ShowMOTDid ) {
    static 
szMotd2500 ], iDefaultLen;
    if( !
iDefaultLen ) {
        
addszMotd2499"<html>" );
        
addszMotd2499"<body style=^"background-color:#FF0000;^">" );
        
addszMotd2499"<div align=^"center^">" );
        
addszMotd2499"<h2> Player Headshots</h2>" );
        
addszMotd2499"<table style=^"border:1px #000000 dashed;^" cellpadding=^"3px^" cellspacing=^"0px^">" );
        
addszMotd2499"<tr bgcolor=^"#4A4A4A^" style=^"text-align:left;color:#FFFF00;^">" );
        
addszMotd2499"<th width=^"250px^">&nbsp;&nbsp;Name</th>" );
        
addszMotd2499"<th width=^"200px^">&nbsp;&nbsp;HEADSHOTS</th>" );
        
addszMotd2499"</tr>" );
        
iDefaultLen strlenszMotd );
    }
    
    new 
iLen iDefaultLen;
    new 
iCount;
    static 
name[33];
    
    for( new 
1<= gMaxPlayersi++ ) 
    {
        if( 
is_user_connected) && !is_user_bot) && !is_user_hltv) )  
        {
            
            
get_user_nameiname32 )
            
            
iLen += formatexszMotdiLen ], 2499 iLen"<tr bgcolor=^"%s^">", ( ( iCount ) == ) ? "#CCCCCC" "#EEEEEE" );
            
iLen += formatexszMotdiLen ], 2499 iLen"<td style=^"color:#009900;^">&nbsp;%s</td>", name);
            
iLen += formatexszMotdiLen ], 2499 iLen"<td style=^"color:#CC00CC;^">&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp;%d</td>", gHeadshots[id] );
            
iLen += copyszMotdiLen ], 2499 iLen"</tr>" );
            
iCount++;
            
        }
    }
    
    
formatexszMotdiLen ], 2499 iLen"</table></div></body></html>" );
    
    
show_motdidszMotd"PLAYERS HEADSHOTS" );

Little scripting i ve done in above code...
the headshots are not updated when clients type /kills than motd appear...showing headshot of all players similar i.e. SAME
when i hit 2 headshot..it shows all players stats like 2...when i hit 10 headshots than it shows 10 hs all...means hs is not updating by player.can u correct it....
------------------------------------------------

srry 4 bad eng

Last edited by bwin.reebok; 10-20-2009 at 13:33.
bwin.reebok 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 17:53.


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