Thread: [Subplugin Submission] [T] List of Modified + Requested Plugins
View Single Post
bat
Veteran Member
Join Date: Jul 2012
Old 10-03-2014 , 18:13   Re: [ZP] List of Modified + Requested Plugin (13/9/2014)
Reply With Quote #188

Quote:
Originally Posted by zmd94 View Post
New update!
When someone enter your server, they will get a hud message that displayed their current ranking. ;)

The hud message come with colorful message. Feel free to use it.
PHP Code:
#include amxmodx
#include csstats

new name[32]

const 
SHOW_TYPE // 1 - Show Hud | 2 - Show Chat

new const typecmd [][] = 
{
    
"say /rank",
    
"say rank"
}
    

public 
plugin_init()
{
    for(new 
cmd 0cmd sizeof typecmdcmd++) 
    {
        
register_clcmd(typecmd[cmd], "cmdrank")    
    }
}

public 
cmdrank(Player)    
{
    static 
stats[8], body[8]
    static 
Deaths 0Kills 0Float:Ratio 0.0
    
    
new position get_user_stats(Playerstatsbody)
    new 
totalposition get_statsnum()
    
    
get_user_name(Playernamecharsmax(name))
    
    
Deaths stats[1]
    
    
Kills stats[0]
    
    
Ratio Deaths == ? (float(Kills)) : (float(Kills) / float(Deaths))
    
    switch(
SHOW_TYPE)
    {
        case 
1// Hud
        
{
            
set_hudmessage(42255420.270.8310.03.02.01.0, -1)
            
ShowSyncHudMsg(PlayerCreateHudSyncObj(), "%s You have rank %d/%d^nKills: %d Deaths: %d^nKPD: %.2f"nametotalpositionpositionstats[0], stats[1], Ratio)
        }
        case 
2:  // Chat
        
{
            
client_print(Playerprint_chat"%s You have rank %d/%d. With Kills: %d Deaths: %d KPD: %.2f"nametotalpositionpositionstats[0], stats[1], Ratio)
        }
    }
    

Me old version.
__________________

Last edited by bat; 10-03-2014 at 18:14. Reason: Just put (Me old version.) :)
bat is offline
Send a message via Skype™ to bat