Raised This Month: $ Target: $400
 0% 

Somethings wrong...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Artifact
Veteran Member
Join Date: Jul 2010
Old 05-02-2012 , 10:35   Somethings wrong...
Reply With Quote #1

This plug wort property but when I put Roundsleft plugin, then plugin wont to show me how many rounds left...
PHP Code:
#include <amxmodx>
#include <colorchat>

#define PLUGIN "hud"
#define VERSION "1.5"
#define AUTHOR "good."

new showhudmessage[33], g_teamScore[3]
new 
bool:advert
new bool:rounds

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    if(
is_plugin_loaded("Roundsleft"))
    {
        
rounds true
    
}
    else
    {
        
rounds false
    
}
    
    
register_clcmd("say /show_hud","Show_Hud")
    
register_clcmd("say /hide_hud","Hide_Hud")
    
    
set_task(1.0"ShowHud",.flags "b")
    
set_task(2.0"Advert",_,_,_,"b")
}
public 
client_connect(id)
{
    
showhudmessage[id] = true
    advert 
true
}

public 
Show_Hud(id)
{
    
showhudmessage[id] = true
    advert 
true
}
public 
Hide_Hud(id

    
showhudmessage[id] = false
    advert 
false
}

public 
Advert(id)
{
    if(
advert == true)
    {
        
ColorChat(idGREEN"Da sakrijes hud detalje  kucaj ^01/hide_hud")
    }
    else
    {
        
ColorChat(idGREEN"Da aktiviras hud detalje sa leve strane kucaj ^01/show_hud")
    }
}

public 
teamScore(id) {
    new 
team[2]
    
read_data(1,team,1)
    
g_teamScore[(team[0]=='C')? 1] = read_data(2)

    return 
PLUGIN_CONTINUE
}

public 
ShowHud()
{
    new 
players[32],numi,id
    get_players
(players,num)
    
    for(
i=0;i<num;i++)
    {
        
id players[i]
        
        if(!
showhudmessage[id]) continue
        
        static 
currmap[31]
        new 
NextMap[32]
        static 
Servername[32]
        
get_cvar_string("hostname"Servername31)
        
get_mapname(currmap30)
        
get_cvar_string"amx_nextmap" NextMap 31 );
        new 
iTimeLeft get_timeleft();
        
        new 
maxRounds get_cvar_num("mp_maxrounds")
        new 
roundsleft maxRounds - (g_teamScore[0] + g_teamScore[1])
        
        
set_hudmessage(025500.010.2506.01.0)
        if(
rounds == true)
        {
            if(
roundsleft == 1)
            {
                
show_hudmessage(id"Server: %s^nCurrent Map: %s^nNextmap: %s^nMap will be changed after this round!",ServernamecurrmapNextMap)
            }
            else
            {
                
show_hudmessage(id"Server: %s^nCurrent Map: %s^nNextmap: %s^%d rounds left",Servernamecurrmaproundsleft)
            }
            return 
PLUGIN_HANDLED;
        }
        if(
get_cvar_num("mp_timelimit") == 0)
        {
            
show_hudmessage(id"Server: %s^nCurrent Map: %s^nNextmap: %s^nMap will be changed after this round!",ServernamecurrmapNextMap)
        }
        else
        {
            
show_hudmessage(id"Server: %s^nCurrent Map: %s^nNextmap: %s^nTime Left: %d:%d",ServernamecurrmapNextMapiTimeLeft 60iTimeLeft 60)
        }
    }
    return 
PLUGIN_HANDLED;

__________________
Artifact 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 00:24.


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