[Pomoc] Infotop score ct t
Results 1 to 30 of 30
  1. #1
    Senior Member Array
    Join Date
    Mar 2010
    Location
    Serbia
    Age
    22
    Karma
    21

    Default Infotop score ct t

    Može li se ovo ikako ispraviti da radi tj. da prikazuje koliki je skor za CT/T?
    PHP Code:
    /*       Info Top v1.4 © 2011, ->UrOS<-
        Contact e-mail urosh@in.com
         
        Formatright
        
        *English*
        This plugin is free software;
        you can modify it under the terms of the
        GNU General Public License as published by the Free Software Foundation.
        
        *Serbian* 
        Ovaj plugin je besplatni program;
        mozete ga menjati postujuci prava autora, samo ga ne smete prodavati.
        
    */

    #include <amxmodx> 
    #include <colorchat> 
    #include <dhudmessage>

    new runde 0
    new prefix[32] = "AMXX"

    enum _teams {
    _terro,
    _ct
    }
     
    new 
    g_iScore[_teams]

    public 
    plugin_init()  

        
    register_plugin"Info Top""1.4""->UrOS<-")    
        
    register_event("HLTV""round_start""a""1=0""2=0")
        
    register_event("TextMsg""round_restart""a""2=#Game_will_restart_in")
        
    register_srvcmd("amx_prefix""promeni_prefix"//primer amx_prfix "Ime Servera"
        
    register_cvar("infotop""1.4", (FCVAR_SERVER|FCVAR_SPONLY)) 


    public 
    round_restart() 
        
    runde 
        
    public promeni_prefix()
    {    
        
    remove_task(123)
        
    read_argv(1prefix31)
    }

    public 
    round_start() 

        
    runde++ 
         
        new 
    mapname[32], nextmap[32], players[32], player ,maxrundimaxplayersszTeamName[2], ip[32]
        
        
    read_data(1szTeamName1)
        
    g_iScore[szTeamName[0] == 'T' _terro _ct] = read_data(2)
        
        
    maxrundi=get_cvar_num("mp_maxrounds")
        
    maxplayers=get_maxplayers()
        
    get_cvar_string("amx_nextmap",nextmap,31
        
    get_mapname(mapname,31 
        
    get_players(playersplayer
        
    get_user_ip(0,ip31)
        
        
    set_dhudmessage255850, -1.00.026.0180.0
        
    show_dhudmessage0"Dodajte IP: %s",ip)
        
        
    ColorChat(0TEAM_COLOR"^4[%s]^1 Runda: ^3%d^1/^3%d ^1| Mapa: ^3%s^1/^3%s ^1| Igraca: ^3%d^1/^3%d ^1| Score : TTs %d - %d CTs",prefixrunde,maxrundi,mapnamenextmapplayer,maxplayersg_iScore[_terro], g_iScore[_ct]) 


  2. #2
    Senior Member Array
    Join Date
    Aug 2018
    Location
    Ona planeta pored zemlje
    Karma
    1

    Default

    I tried plugin, it works for me.
    Maybe you know which line of code has a mistake

  3. #3
    Junior Member Array
    Join Date
    Jun 2018
    Karma
    0

    Default

    Quote Originally Posted by StriX View Post
    I tried plugin, it works for me.
    Maybe you know which line of code has a mistake
    Nemoj se praviti englez! :P

  4. #4
    Senior Member Array
    Join Date
    Mar 2010
    Location
    Serbia
    Age
    22
    Karma
    21

    Default

    Prikazuje skor, ali uvek je 0, plugin se normalno kompiluje, treba da ima funkciju i na serveru.

  5. #5
    Banovani spamer Array
    Join Date
    Sep 2018
    Location
    Los Angeles
    Age
    18
    Karma
    0

    Default

    He spoke in English, I do not really know Serbian

  6. #6
    Senior Member Array
    Join Date
    Aug 2018
    Location
    Ona planeta pored zemlje
    Karma
    1

    Default

    Verujem mu,englez je

  7. #7
    Junior Member Array
    Join Date
    Jun 2018
    Karma
    0

    Default

    Quote Originally Posted by StriX View Post
    Verujem mu,englez je

  8. #8
    Senior Member Array
    Join Date
    Aug 2018
    Location
    Ona planeta pored zemlje
    Karma
    1

    Default

    Lajkujes mi fb stranicu

  9. #9
    Senior Member Array
    Join Date
    Aug 2013
    Age
    22
    Karma
    8

    Default

    Ovde ti nedostaje da se na kraju runde pogleda iz kog tima su zivi igraci i da se poveca g_iScore varijabla za taj tim.

  10. #10
    Senior Member Array
    Join Date
    Mar 2010
    Location
    Serbia
    Age
    22
    Karma
    21

    Default

    Ja sam toliko uradio, za ostalo mi je potrebno neko ko zna da dovrši ovo, zato sam i pisao

  11. #11
    Senior Member Array
    Join Date
    Aug 2010
    Location
    Nis, Cair, Jamajka
    Karma
    13

    Default

    mislim da ti taj kod uvek vraca 0 na pocetku runde...probaj ovaj nacin, mislim da ce raditi:
    Code:
    new ctwins = 0, trwins = 0
    //plugin_init
    register_message(get_user_msgid("TextMsg"),"finishedround"); 
    
    //
    public finishedround() 
    { 
        static msg[22]; 
        get_msg_arg_string(2, msg, 21); 
         
        if(equal(msg, "#Terrorists_Win")) 
        { 
           trwins++
        } 
        else if(equal(msg, "#CTs_Win")) 
        {     
            ctwins++
        } 
        return PLUGIN_CONTINUE
    }

  12. #12
    Senior Member Array
    Join Date
    Mar 2010
    Location
    Serbia
    Age
    22
    Karma
    21

    Default

    Code:
    /*       Info Top v1.4 © 2011, ->UrOS<- 
        Contact e-mail urosh@in.com 
          
        Formatright 
         
        *English* 
        This plugin is free software; 
        you can modify it under the terms of the 
        GNU General Public License as published by the Free Software Foundation. 
         
        *Serbian*  
        Ovaj plugin je besplatni program; 
        mozete ga menjati postujuci prava autora, samo ga ne smete prodavati. 
         
    */ 
    
    #include <amxmodx>  
    #include <colorchat>  
    #include <dhudmessage> 
    
    new runde = 0 
    new prefix[32] = "AMXX" 
    new ctwins = 0, trwins = 0
    
    enum _teams { 
    _terro, 
    _ct 
    } 
      
    new g_iScore[_teams] 
    
    public plugin_init()   
    {  
        register_plugin( "Info Top", "1.4", "->UrOS<-")     
        register_event("HLTV", "round_start", "a", "1=0", "2=0") 
        register_event("TextMsg", "round_restart", "a", "2=#Game_will_restart_in") 
        register_srvcmd("amx_prefix", "promeni_prefix") //primer amx_prfix "Ime Servera" 
        register_cvar("infotop", "1.4", (FCVAR_SERVER|FCVAR_SPONLY))  
    	register_message(get_user_msgid("TextMsg"),"finishedround"); 
    }  
    
    public round_restart()  
        runde = 0  
         
    public promeni_prefix() 
    {     
        remove_task(123) 
        read_argv(1, prefix, 31) 
    } 
    
    public round_start()  
    {  
        runde++  
    	
        new mapname[32], nextmap[32], players[32], player ,maxrundi, maxplayers, szTeamName[2], ip[32] 
         
        read_data(1, szTeamName, 1) 
        g_iScore[szTeamName[0] == 'T' ? _terro : _ct] = read_data(2) 
         
        maxrundi=get_cvar_num("mp_maxrounds") 
        maxplayers=get_maxplayers() 
        get_cvar_string("amx_nextmap",nextmap,31)  
        get_mapname(mapname,31 )  
        get_players(players, player)  
        get_user_ip(0,ip, 31) 
         
        set_dhudmessage( 255, 85, 0, -1.0, 0.0, 2, 6.0, 180.0)  
        show_dhudmessage( 0, "Dodajte IP: %s",ip) 
         
        ColorChat(0, TEAM_COLOR, "^4[%s]^1 Runda: ^3%d^1/^3%d ^1| Mapa: ^3%s^1/^3%s ^1| Igraca: ^3%d^1/^3%d ^1| Score : TTs %d - %d CTs",prefix, runde,maxrundi,mapname, nextmap, player,maxplayers, trwins, ctwins)  
    }  
    
    public finishedround() 
    { 
        static msg[22]; 
        get_msg_arg_string(2, msg, 21); 
         
        if(equal(msg, "#Terrorists_Win")) 
        { 
           trwins++
        } 
        else if(equal(msg, "#CTs_Win")) 
        {     
            ctwins++
        } 
        return PLUGIN_CONTINUE
    }
    Tako?

  13. #13
    Senior Member Array
    Join Date
    Aug 2010
    Location
    Nis, Cair, Jamajka
    Karma
    13

    Default

    Code:
    #include <amxmodx>  
    #include <colorchat>  
    #include <dhudmessage> 
    
    new runde 
    new prefix[32] = "AMXX" 
    new ctwins = 0
    new trwins = 0
    
    public plugin_init()   
    {  
        register_plugin( "Info Top", "1.4", "->UrOS<-")     
        register_event("HLTV", "round_start", "a", "1=0", "2=0") 
        register_event("TextMsg", "round_restart", "a", "2=#Game_will_restart_in") 
        register_srvcmd("amx_prefix", "promeni_prefix") //primer amx_prfix "Ime Servera" 
        register_cvar("infotop", "1.4", (FCVAR_SERVER|FCVAR_SPONLY))  
        register_message(get_user_msgid("TextMsg"),"finishedround"); 
    }  
    
    public round_restart()  
        runde = 0  //ovo ti ne treba ako ides dole ono runde=ct+tr
         
    public promeni_prefix() 
    {     
        remove_task(123) 
        read_argv(1, prefix, 31) 
    } 
    
    public round_start()  
    {  
        runde++  //ovo mozes i runde = ctwins + trwins
    	
        new mapname[32], nextmap[32], players[32], player ,maxrundi, maxplayers, szTeamName[2], ip[32] 
         
        maxrundi=get_cvar_num("mp_maxrounds") 
        maxplayers=get_maxplayers() 
        get_cvar_string("amx_nextmap",nextmap,31)  
        get_mapname(mapname,31 )  
        get_players(players, player)  
        get_user_ip(0,ip, 31) 
         
        set_dhudmessage( 255, 85, 0, -1.0, 0.0, 2, 6.0, 180.0)  
        show_dhudmessage( 0, "Dodajte IP: %s",ip) 
         
        ColorChat(0, TEAM_COLOR, "^4[%s]^1 Runda: ^3%d^1/^3%d ^1| Mapa: ^3%s^1/^3%s ^1| Igraca: ^3%d^1/^3%d ^1| Score : TTs %d - %d CTs",prefix, runde,maxrundi,mapname, nextmap, player,maxplayers, trwins, ctwins)  
    }  
    
    public finishedround() 
    { 
        static msg[22]; 
        get_msg_arg_string(2, msg, 21); 
         
        if(equal(msg, "#Terrorists_Win")) 
        { 
           trwins++
        } 
        else if(equal(msg, "#CTs_Win")) 
        {     
            ctwins++
        } 
        return PLUGIN_CONTINUE
    }
    evo ti sa obrisanim nebitnim stvarima...a mozda mozes i foricu da uradis za runde, gore sam ti koment, cisto da se nekad ne desi, da su runde: 120 a rezultat: ct=20 tr=33, jer se opalio restart

  14. #14
    Senior Member Array
    Join Date
    Mar 2010
    Location
    Serbia
    Age
    22
    Karma
    21

    Default

    Hvala, probam i javim kako je prošlo. Uglavnom pogodio sam s kodom? Hteo sam da napišem da obrišem i nebitne stvari, ali se predomislio na kraj.

  15. #15
    Senior Member Array
    Join Date
    Mar 2010
    Location
    Serbia
    Age
    22
    Karma
    21

    Default

    I dalje je 0:0 rezultat

    edit: Piše 22 runda a rezultat 11:8

    Ne računa izgleda game commencing i još neke stvari, kad se krene od 0 0 on ne sređuje to.
    Ima u statsx.amxx video sam da odatle čita kad kucaš /score i prikazuje uvek tačno.
    Last edited by sanimare; 22-09-2018 at 13:29.

  16. #16
    Senior Member Array
    Join Date
    Aug 2010
    Location
    Nis, Cair, Jamajka
    Karma
    13

    Default

    izgleda da rundu cita od prve skroz, dok za rezultate kad prodje game commencing...zato sam ti reko runde=ctwins+trwins
    ako ne radi, ne bih znao bolje resenje

  17. #17
    Super Moderator Array klipica's Avatar
    Join Date
    Apr 2010
    Karma
    29

    Default

    Ako koristis 1.8.3 ili 1.9 mozes uraditi
    Code:
    new const ctWins = get_gamerules_int("CHalfLifeMultiplay", "m_iNumCTWins");
    new const trWins = get_gamerules_int("CHalfLifeMultiplay", "m_iNumTerroristWins");
    Nema potrebe nikakve messages i evente hookovati, to je to.
    Code:
    #YoMama {
        width: 200%;
        overflow: visible;
    }

  18. #18
    Senior Member Array
    Join Date
    Mar 2010
    Location
    Serbia
    Age
    22
    Karma
    21

    Default

    1.8.2 je ali ovo ne funkcioniše sad ne broji ni runde ni kolko je dobio TT/CT, sve same 0.
    Code:
    #include <amxmodx>  
    #include <colorchat>  
    #include <dhudmessage> 
    
    new runde 
    new prefix[32] = "AMXX" 
    new ctwins = 0
    new trwins = 0
    
    public plugin_init()   
    {  
        register_plugin( "Info Top", "1.4", "->UrOS<-")     
        register_event("HLTV", "round_start", "a", "1=0", "2=0") 
        register_event("TextMsg", "round_restart", "a", "2=#Game_will_restart_in") 
        register_srvcmd("amx_prefix", "promeni_prefix") //primer amx_prfix "Ime Servera" 
        register_cvar("infotop", "1.4", (FCVAR_SERVER|FCVAR_SPONLY))  
        register_message(get_user_msgid("TextMsg"),"finishedround"); 
    }  
    
    public promeni_prefix() 
    {     
        remove_task(123) 
        read_argv(1, prefix, 31) 
    } 
    
    public round_start()  
    {  
        runde=ctwins+trwins  //ovo mozes i runde = ctwins + trwins
    	
        new mapname[32], nextmap[32], players[32], player ,maxrundi, maxplayers, ip[32] 
         
        maxrundi=get_cvar_num("mp_maxrounds") 
        maxplayers=get_maxplayers() 
        get_cvar_string("amx_nextmap",nextmap,31)  
        get_mapname(mapname,31 )  
        get_players(players, player)  
        get_user_ip(0,ip, 31) 
         
        set_dhudmessage( 255, 85, 0, -1.0, 0.0, 2, 6.0, 180.0)  
        show_dhudmessage( 0, "Dodajte IP: %s",ip) 
         
        ColorChat(0, TEAM_COLOR, "^4[%s]^1 Runda: ^3%d^1/^3%d ^1| Mapa: ^3%s^1/^3%s ^1| Igraca: ^3%d^1/^3%d ^1| Score : TTs %d - %d CTs",prefix, runde,maxrundi,mapname, nextmap, player,maxplayers, trwins, ctwins)  
    }  
    
    public finishedround() 
    { 
        static msg[22]; 
        get_msg_arg_string(2, msg, 21); 
         
        if(equal(msg, "#Terrorists_Win")) 
        { 
           trwins++
        } 
        else if(equal(msg, "#CTs_Win")) 
        {     
            ctwins++
        } 
        return PLUGIN_CONTINUE
    }

  19. #19
    Senior Member Array
    Join Date
    Aug 2010
    Location
    Nis, Cair, Jamajka
    Karma
    13

    Default

    ne vidim gde moze biti frka...ali secam da je meni plugin bagovao kad registrujem neki event a uopste ga ne spominjem vise u plaginu...u tvom slucaju:

    register_event("TextMsg", "round_restart", "a", "2=#Game_will_restart_in")

    mozda je to problem

  20. #20
    Senior Member Array
    Join Date
    Mar 2010
    Location
    Serbia
    Age
    22
    Karma
    21

    Default

    Obrisao sam tu liniju i dobro je, samo još game commencing stvari kvari dole mi piše npr runda 85/50 a skor i dalje pokazuje dobro, samo kad bi mogao da se isključi game commencing ili da ga ne prevari to i bilo bi super sve.

  21. #21
    Senior Member Array
    Join Date
    Aug 2010
    Location
    Nis, Cair, Jamajka
    Karma
    13

    Default

    moze verovatno da se napravi..samo ne kapiram bas najbolje...ctwins i trwins su uvek dobri..ali runde se nekad resetuju na 0 ?

  22. #22
    Senior Member Array
    Join Date
    Mar 2010
    Location
    Serbia
    Age
    22
    Karma
    21

    Default

    Game Commencing.
    Kad nema nikog na serveru ili samo jedan igrač u timu a u drogom nema nikom i u tom drugom uđe neko, resetuje sve na 0, dok u print chat ostaje brojka dokle je stiglo i nije isto.

  23. #23
    Senior Member Array
    Join Date
    Aug 2010
    Location
    Nis, Cair, Jamajka
    Karma
    13

    Default

    sori ali malo sam glup...ne kapiram sta je tacno problem, jel kad ides TAB pa na scoreboard pise CT i TR pobede su 0 a u chatu pise npr 15/20 ?
    game_commencing se nigde ne hukuje u kodu, pa zato nista ne menja..izvini ako gresim negde

  24. #24
    Senior Member Array
    Join Date
    Mar 2010
    Location
    Serbia
    Age
    22
    Karma
    21

    Default

    Nastavi da broji u chatu runde ako je maxrounds 50 ono piše npr 70/50, a ovo za skor isto broj idalje iako se desio Game Commencing.

  25. #25
    Senior Member Array
    Join Date
    Mar 2010
    Location
    Serbia
    Age
    22
    Karma
    21

    Default

    Pokušao sam i ovo jer ne mogu rešiti trenutni problem.
    Code:
    #include <amxmodx>  
    #include <colorchat>  
    #include <dhudmessage> 
    
    new runde 
    new prefix[32] = "" 
    new ctwins = 0
    new trwins = 0
    
    public plugin_init()   
    {  
        register_plugin( "Info Top", "1.4", "->UrOS<-")     
        register_event("HLTV", "round_start", "a", "1=0", "2=0") 
        register_srvcmd("amx_prefix", "promeni_prefix") //primer amx_prfix "Ime Servera" 
        register_cvar("infotop", "1.4", (FCVAR_SERVER|FCVAR_SPONLY))  
        register_message(get_user_msgid("TextMsg"),"finishedround"); 
    }  
    
    public promeni_prefix() 
    {     
        remove_task(123) 
        read_argv(1, prefix, 31) 
    } 
    
    public round_start()  
    {  
        runde=ctwins+trwins  //ovo mozes i runde = ctwins + trwins
    	
        new mapname[32], nextmap[32], players[32], player ,roundsleft, maxplayers, ip[32] 
    
    	roundsleft=get_cvar_num("mp_roundsleft") 
        maxplayers=get_maxplayers() 
        get_cvar_string("amx_nextmap",nextmap,31)  
        get_mapname(mapname,31 )  
        get_players(players, player)  
        get_user_ip(0,ip, 31) 
         
        set_dhudmessage( 255, 85, 0, -1.0, 0.0, 2, 6.0, 180.0)  
        show_dhudmessage( 0, "Dodajte IP: %s",ip) 
         
        ColorChat(0, GREEN, "^3-^4=^3Fy_Snow^4=^3- ^4Score: ^3TT: ^4%d ^3- ^4%d ^3:CT ^1| ^4Roundsleft: ^3%i ^1| ^4Nextmap: ^3%s ^1| ^4People: ^3%d^4/^3%d ",trwins, ctwins,roundsleft, nextmap, player,maxplayers)  
    }  
    
    public finishedround() 
    { 
        static msg[22]; 
        get_msg_arg_string(2, msg, 21); 
         
        if(equal(msg, "#Terrorists_Win")) 
        { 
           trwins++
        } 
        else if(equal(msg, "#CTs_Win")) 
        {     
            ctwins++
        } 
        return PLUGIN_CONTINUE
    }
    Ali mi ne čita mp_roundsleft i piše mi Roundsleft: 0
    Kad ukucam u konzolu amx_cvar mp_roundsleft prikazuje sve.
    Probao sam i %s %d i na kraju stavio %i iako bi to trebalo za lang da je, ne znam do čega je.

  26. #26
    Senior Member Array
    Join Date
    Aug 2010
    Location
    Nis, Cair, Jamajka
    Karma
    13

    Default

    testiraj ovo...%i i %d su ti za cele brojeve
    Code:
    #include <amxmodx>  
    #include <colorchat>  
    #include <dhudmessage> 
    
    new runde
    new prefix[32] = "" 
    new ctwins = 0
    new trwins = 0
    new roundsleft
    
    public plugin_init()   
    {  
    	register_plugin( "Info Top", "1.4", "->UrOS<-")     
    	register_event("HLTV", "round_start", "a", "1=0", "2=0") 
    	register_srvcmd("amx_prefix", "promeni_prefix") //primer amx_prfix "Ime Servera" 
    	register_cvar("infotop", "1.4", (FCVAR_SERVER|FCVAR_SPONLY))  
    	register_message(get_user_msgid("TextMsg"),"finishedround"); 
    	roundsleft = get_cvar_pointer( "mp_roundsleft" )
    }  
    
    public promeni_prefix() 
    {     
    	remove_task(123) 
    	read_argv(1, prefix, 31) 
    } 
    
    public round_start()  
    {  
    	runde=ctwins+trwins  //ovo mozes i runde = ctwins + trwins
    	
    	new mapname[32], nextmap[32], players[32], player ,roundsleft, maxplayers, ip[32] 
    	
    	//roundsleft=get_cvar_num("mp_roundsleft") 
    	maxplayers=get_maxplayers() 
    	get_cvar_string("amx_nextmap",nextmap,31)  
    	get_mapname(mapname,31 )  
    	get_players(players, player)  
    	get_user_ip(0,ip, 31) 
    	
    	set_dhudmessage( 255, 85, 0, -1.0, 0.0, 2, 6.0, 180.0)  
    	show_dhudmessage( 0, "Dodajte IP: %s",ip) 
    	
    	ColorChat(0, GREEN, "^3-^4=^3Fy_Snow^4=^3- ^4Score: ^3TT: ^4%d ^3- ^4%d ^3:CT ^1| ^4Roundsleft: ^3%i ^1| ^4Nextmap: ^3%s ^1| ^4People: ^3%d^4/^3%d ",trwins, ctwins, get_cvar_num( roundsleft ), nextmap, player,maxplayers)  
    }  
    
    public finishedround() 
    { 
    	static msg[22]; 
    	get_msg_arg_string(2, msg, 21); 
    	
    	if(equal(msg, "#Terrorists_Win")) 
    	{ 
    		trwins++
    	} 
    	else if(equal(msg, "#CTs_Win")) 
    	{     
    		ctwins++
    	} 
    	else if(equal(msg, "#Game_Commencing")) 
    	{     
    		ctwins = 0
    		trwins = 0
    		runde = 0 //mada ovo ne mora jer zavisi od dva gore
    	} 
    	//mozda ti i ovo zatreba ?
    	else if(equal(msg, "#Game_will_restart_in"))
    	{
    		ctwins = 0
    		trwins = 0
    		runde = 0
    	}
    	return PLUGIN_CONTINUE
    }
    Last edited by JocA1; 23-09-2018 at 00:52.

  27. #27
    Senior Member Array
    Join Date
    Mar 2010
    Location
    Serbia
    Age
    22
    Karma
    21

    Default

    .sma(43) : error 035: argument type mismatch (argument 1)
    .sma(73) : warning 204: symbol is assigned a value that is never used: "roundsleft"
    .sma(73) : warning 204: symbol is assigned a value that is never used: "runde"

  28. #28
    Senior Member Array
    Join Date
    Aug 2010
    Location
    Nis, Cair, Jamajka
    Karma
    13

    Default

    Code:
    #include <amxmodx>  
    #include <colorchat>  
    #include <dhudmessage> 
    
    new runde
    new prefix[32] = "" 
    new ctwins = 0
    new trwins = 0
    
    public plugin_init()   
    {  
    	register_plugin( "Info Top", "1.4", "->UrOS<-")     
    	register_event("HLTV", "round_start", "a", "1=0", "2=0") 
    	register_srvcmd("amx_prefix", "promeni_prefix") //primer amx_prfix "Ime Servera" 
    	register_cvar("infotop", "1.4", (FCVAR_SERVER|FCVAR_SPONLY))  
    	register_message(get_user_msgid("TextMsg"),"finishedround"); 
    }  
    
    public promeni_prefix() 
    {     
    	remove_task(123) 
    	read_argv(1, prefix, 31) 
    } 
    
    public round_start()  
    {  
    	runde=ctwins+trwins
    	
    	new mapname[32], nextmap[32], players[32], player, maxplayers, ip[32] 
    	
    	maxplayers=get_maxplayers() 
    	get_cvar_string("amx_nextmap",nextmap,31)  
    	get_mapname(mapname,31 )  
    	get_players(players, player)  
    	get_user_ip(0,ip, 31) 
    	
    	set_dhudmessage( 255, 85, 0, -1.0, 0.0, 2, 6.0, 180.0)  
    	show_dhudmessage( 0, "Dodajte IP: %s",ip) 
    	
    	ColorChat(0, GREEN, "^3-^4=^3Fy_Snow^4=^3- ^4Score: ^3TT: ^4%d ^3- ^4%d ^3:CT ^1| ^4Roundsleft: ^3%d ^1| ^4Nextmap: ^3%s ^1| ^4People: ^3%d^4/^3%d ",trwins, ctwins, get_cvar_num("mp_roundsleft"), nextmap, player,maxplayers)  
    }  
    
    public finishedround() 
    { 
    	static msg[22]; 
    	get_msg_arg_string(2, msg, 21); 
    	
    	if(equal(msg, "#Terrorists_Win")) 
    	{ 
    		trwins++
    	} 
    	else if(equal(msg, "#CTs_Win")) 
    	{     
    		ctwins++
    	} 
    	else if(equal(msg, "#Game_Commencing")) 
    	{     
    		ctwins = 0
    		trwins = 0
    		runde = 0 //mada ovo ne mora jer zavisi od dva gore
    	} 
    	//mozda ti i ovo zatreba ?
    	else if(equal(msg, "#Game_will_restart_in"))
    	{
    		ctwins = 0
    		trwins = 0
    		runde = 0
    	}
    	return PLUGIN_CONTINUE
    }
    moze se reci da je vraceno na tvoje staro...ne znam zasto ne prikazuje te preostale runde

    dobro si izbego da ne reklamiras ip
    Last edited by JocA1; 23-09-2018 at 01:03.

  29. #29
    Senior Member Array
    Join Date
    Mar 2010
    Location
    Serbia
    Age
    22
    Karma
    21

    Default

    Testirao sam, kad bude game commencing kreće i ovo 0:0, još da vidim za brojač rundi i biće u redu.
    Piši privatnu poruku za to nisam te najbolje razumeo poslednje što si napisao.
    Još ovo kad bi radilo za mp_roundsleft, stvarno mi nije jasno kad taj cvar ima i kad ga kucam u konzolu ispisuje.
    Last edited by sanimare; 23-09-2018 at 01:22.

  30. #30
    Senior Member Array
    Join Date
    Aug 2010
    Location
    Nis, Cair, Jamajka
    Karma
    13

    Default

    nzm sto nece roundsleft..posalji mi ip na pp, cisto da vidim server
    edit:evo neki moj rucni roundsleft nacin, mislim da ima neke logike:

    Code:
    #include <amxmodx>  
    #include <colorchat>  
    #include <dhudmessage> 
    
    new runde, ctwins, trwins
    new prefix[32] = "" 
    new upamceno = 0
    new bool:restarted = false
    
    public plugin_init()   
    {  
    	register_plugin( "Info Top", "1.4", "->UrOS<-")     
    	register_event("HLTV", "round_start", "a", "1=0", "2=0") 
    	register_srvcmd("amx_prefix", "promeni_prefix") //primer amx_prfix "Ime Servera" 
    	register_cvar("infotop", "1.4", (FCVAR_SERVER|FCVAR_SPONLY))  
    	register_message(get_user_msgid("TextMsg"),"finishedround"); 
    }  
    
    public promeni_prefix() 
    {     
    	remove_task(123) 
    	read_argv(1, prefix, 31) 
    } 
    
    public round_start()  
    {  
    	runde=ctwins+trwins
    	
    	new mapname[32], nextmap[32], players[32], player, maxplayers, ip[32], maxr
    	
    	maxplayers=get_maxplayers() 
    	get_cvar_string("amx_nextmap",nextmap,31)  
    	get_mapname(mapname,31 )  
    	get_players(players, player)  
    	get_user_ip(0,ip, 31) 
    	maxr = get_cvar_num("mp_maxrounds")
    	
    	set_dhudmessage( 255, 85, 0, -1.0, 0.0, 2, 6.0, 180.0)  
    	show_dhudmessage( 0, "Dodajte IP: %s",ip) 
    	
    	ColorChat(0, GREEN, "^3-^4=^3Fy_Snow^4=^3- ^4Score: ^3TT: ^4%d ^3- ^4%d ^3:CT ^1| ^4Roundsleft: ^3%d ^1| ^4Nextmap: ^3%s ^1| ^4People: ^3%d^4/^3%d ",trwins, ctwins, restarted ? maxr - upamceno:maxr - runde, nextmap, player,maxplayers)  
    }  
    
    public finishedround() 
    { 
    	static msg[22]; 
    	get_msg_arg_string(2, msg, 21); 
    	
    	if(equal(msg, "#Terrorists_Win")) 
    	{ 
    		trwins++
    	} 
    	else if(equal(msg, "#CTs_Win")) 
    	{     
    		ctwins++
    	} 
    	else if(equal(msg, "#Game_Commencing") || equal(msg, "#Game_will_restart_in")) //racunamo i sv_restart 1 ?
    	{     
    		restarted=true
    		if(upamceno <= 0 )
    		{
    			upamceno = runde
    		}
    		else
    		{
    			upamceno += runde
    		}
    		ctwins = 0
    		trwins = 0
    		runde = 0 //mada ovo ne mora jer zavisi od dva gore
    	} 
    
    	return PLUGIN_CONTINUE
    }
    Last edited by JocA1; 23-09-2018 at 02:08.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •