Raised This Month: $ Target: $400
 0% 

MOTD questions


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
bwin.reebok
BANNED
Join Date: Oct 2009
Location: Land(IND)
Old 10-19-2009 , 10:22   Re: MOTD questions
Reply With Quote #3

Quote:
Originally Posted by Hawk552 View Post
Untested, uncompiled (the web compiler seems to be broken and also missing charsmax).

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

new gMaxPlayers

new gHeadshots[33]
new 
gUniqueID[33]

public 
plugin_init()
{
    
register_plugin"Stats MOTD""1.0""Hawk552" )

    
register_event"HLTV""EventHLTV""a""1=0""2=0" )
    
register_event"DeathMsg""EventDeathMsg""a" )

    
gMaxPlayers get_maxplayers()
}

public 
EventHLTV()
    for ( new 
1len<= gMaxPlayersi++ )
        if ( 
is_user_alive) )
        {
            static 
MOTD[4096]
            
len formatexMOTDcharsmaxMOTD ), "Kills: %d<br>"get_user_fragsid ) )
            
len += formatexMOTD[len], charsmaxMOTD ) - len"Deaths: %d<br>"get_user_deathsid ) )
            
len += formatexMOTD[len], charsmaxMOTD ) - len"Headshots: %d"gHeadshots[id] )

            
show_motdiMOTD"Stats" )
        }

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]++
    }


id is missing in public EventHLTV() that i ve added it

but when motd will appear..i also need name beside kills,headshots and death....and when it will appear can u make by adding that when clients type /kills than motd appear
bwin.reebok is offline
 



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:38.


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