Raised This Month: $ Target: $400
 0% 

Problem with compile and update


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
GmTx
BANNED
Join Date: May 2009
Location: Mountains [BG/Sofia]
Old 08-24-2009 , 08:48   Re: Problem with compile and update
Reply With Quote #1

Thanks you rly help me because i need to fix that and in other plugin
That is very hard and i make it like this
PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <geoip> 
#include <csstats>


#define PLUGIN "Hud Stats"
#define VERSION "1.0"
#define AUTHOR "GmTx"

new nextmap[32
new 
name[32]
new 
ip[32]
new 
steam[32]
new 
country[46]
new 
Currenttime[9
new 
CurrentDay[16]
new 
bool:hud_enabled[33]
static 
temp[8]
static 
rank[8]
        

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd("say /hudstats""cmdStats")    
    
    
set_task(5.0,"cmdShowHudStats")    
}

public 
client_connect(id)
{
    
hud_enabled[id] = false
    
    set_task
(10.0"show_info"id)
}

public 
show_info(id)
{
    if(!
is_user_connected(id) || hud_enabled[id])
        return 
PLUGIN_CONTINUE
        
    client_print
(idprint_chat"[HudStats] Say '/hudstats' to show or hide the HuD StatS.")
    
    return 
PLUGIN_CONTINUE
}

public 
cmdStats(id)
{
    if(!
is_user_connected(id))
        return 
PLUGIN_HANDLED
        
    
if(hud_enabled[id])
    {
        
hud_enabled[id] = false
        client_print
(idprint_chat"[HudStats] Hud Stats Disabled.")
        return 
PLUGIN_HANDLED
    
}
    
    
client_print(idprint_chat"[HudStats] Hud Stats Enable.")
    
    
hud_enabled[id] = true
    
    cmdHudStats
(id)
    
    return 
PLUGIN_HANDLED
}

public 
cmdHudStats(id)
{
    if(!
is_user_connected(id))
        return 
PLUGIN_CONTINUE
        
    
if(!hud_enabled[id])
        return 
PLUGIN_CONTINUE
        
    get_time
("%H:%M:%S",Currenttime,8)
    
get_time("%d/%m/%Y",CurrentDay,15)
    new 
timeleft get_timeleft()
    
get_cvar_string("amx_nextmap",nextmap,31)
    
get_user_name(idname31);
    
get_user_ip(idip31);
    
get_user_authid(idsteam31);
    
geoip_country(ipcountry)
    new 
position get_user_stats(idtemptemp)
    
num_to_str(positionrank7)
    
    
set_hudmessage(02550, -1.0, -1.001.010000.0)
    
show_hudmessage(id"[ Time: %s ]^n[ Date: %s]^n[ Time Left: %d:%02d ]^n[ Next Map: %s ]^n[ Your Name: %s ]^n[ Your IP: %s ]^n[ Your ID: %s ]^n[ You are from: %s ]^n[ Rank in Top15: %s ]"CurrenttimeCurrentDaytimeleft 60timeleft 60nextmapnameipsteamcountryrank)
    
    
set_task(0.9,"cmdHudStats")
    
    return 
PLUGIN_CONTINUE  


public 
get_user_countryindex 
{
    static 
ip[32], country[46];
    
get_user_ip(indexip31);
    
geoip_country(ipcountry);
    
    
// By GHW_Chronic
    
if( equal(country"error") ) {
        if( !
contain(ip"192.168.") || !contain(ip"10. ") || !contain(ip"172.") || equal(ip"127.0.0.1") )
            
country "LAN";
        
        else if( 
equal(ip"loopback") )
            
country "ListenServer User";
        
        else
            
country "ERROR";
    }
    return 
country;

GmTx is offline
Send a message via Skype™ to GmTx
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 15:15.


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