Raised This Month: $ Target: $400
 0% 

Player status


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Caldeum
Senior Member
Join Date: Jul 2010
Location: United Kingdom
Old 08-17-2012 , 16:15   Player status
Reply With Quote #1

Anyone can help? Why doesn't work this?

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

public PlayerName;
new 
g_status_sync;
new 
g_friend33 ];

public 
plugin_init()
{
    
register_plugin("CS Misc. Stats""0.1""AMXX Dev Team")
    
register_event("StatusValue""setTeam""be""1=1")
    
register_event("StatusValue""showStatus""be""1=2""2!0")
    
register_event("StatusValue""hideStatus""be""1=1""2=0")
    
    
g_status_sync CreateHudSyncObj();
}

public 
setTeam(id)
    
g_friend[id] = read_data(2)

public 
showStatus(id)
{
    if(!
is_user_bot(id) && is_user_connected(id) && PlayerName
    {
        new 
name[32], pid read_data(2)
    
        
get_user_name(pidname31)
        new 
color1 0color2 0
    
        
if (get_user_team(pid) == 1)
            
color1 255
        
else
            
color2 255
        
        
if (g_friend[id] == 1)    // friend
        
{
            new 
clipammowpnid get_user_weapon(pidclipammo)
            new 
wpnname[32]
        
            if (
wpnid)
                
xmod_get_wpnname(wpnidwpnname31)
        
            
set_hudmessage(color150color2, -1.00.6010.013.00.010.01, -1)
            
ShowSyncHudMsg(idg_status_sync"%s -- %d HP / %d AP / %s"nameget_user_health(pid), get_user_armor(pid), wpnname)
        } else {
            
set_hudmessage(color150color2, -1.00.6010.013.00.010.01, -1)
            
ShowSyncHudMsg(idg_status_sync"%s"name)
        }
    }
}

public 
hideStatus(id)
{
    if (
PlayerName)
        
ClearSyncHud(idg_status_sync)

__________________
Of all the things I lost, I miss my brain the most.
Caldeum 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 05:53.


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