Skocz do zawarto艣ci

Witamy w Nieoficjalnym polskim support'cie AMX Mod X

Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w wi臋kszo艣ci spo艂eczno艣ci internetowych musisz si臋 zarejestrowa膰 aby m贸c odpowiada膰 lub zak艂ada膰 nowe tematy, ale nie b贸j si臋 to jest prosty proces w kt贸rym wymagamy minimalnych informacji.
  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz si臋 do temat贸w i for, aby otrzymywa膰 automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza spo艂eczno艣ciowego
  • Stw贸rz sw贸j w艂asny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe do艣wiadczenia

Do艂膮czona grafika Do艂膮czona grafika

Guest Message by DevFuse
 

Zdj臋cie

rundy


  • Nie mo偶esz napisa膰 tematu
  • Zaloguj si臋, aby doda膰 odpowied藕
2 odpowiedzi w tym temacie

#1 Reebok

    Pomocny

  • U偶ytkownik

Reputacja: 0
Nowy

  • Post贸w:48
Offline

Napisano 22.12.2018 18:26

witam mam serwerek na kt贸rym gram na rundy - mp_maxrounds 
 
mam plugin kt贸ry przez timeleft pokazuje ile pozosta艂o rund do ko艅ca tylko kiedy dam powiedzmy restart to plugin nie odlicza od pocz膮tku rund tylko ju偶 kolejn膮...

chyba 偶e macie taki plugin kt贸ry dobrze odlicza pozosta艂e rundy :)
 
 
 
 

#include <amxmodx>
#include <amxmisc>

new SayText;
new a_runda;
new b_runda;
new c_runda;

public plugin_init()
{
    register_plugin("Round_Left", "1.1", "MaKeL")
    
    SayText = get_user_msgid("SayText");
    
    c_runda = get_cvar_num("mp_maxrounds")
    
    register_clcmd("say timeleft","Set_timeleft")
    
    register_clcmd("say roundleft","Set_timeleft")
    
    register_event("HLTV", "NewRound", "a", "1=0", "2=0")
    
    
    

    
    
}
public NewRound()
{
    a_runda++
}

public Set_timeleft(id)
{
    b_runda = c_runda - a_runda
    
    if(b_runda > 4)
    {
        
        print_green(id,"[amxx] Pozostalo %d rund do konca", b_runda)
        
    }
    if(b_runda == 4 ||b_runda == 3)
    {
        print_green(id,"[amxx] Pozostalo %d rundy do konca", b_runda)
    }
        
    if(b_runda == 2)
    {
        
        print_green(id,"[amxx] Uwaga !!! przedostatnia runda")
        
    }
    if(b_runda == 1)
    {
        print_green(id,"[amxx] Uwaga !!! Ostatnia runda")
    }
    
    
}

stock print_green(id,const fmt[],{Float,_}:...) { //this is my stock btw ^^
    if(id && !is_user_connected(id)) return 0
    
    static buffer[192]
    buffer[0] = '^x04'
    vformat(buffer[1],190, fmt,3)
    
    message_begin(id ? MSG_ONE : MSG_ALL,SayText,{0,0,0},id)
    write_byte(id)
    write_string(buffer)
    message_end()
    
    return 1
}


  • +
  • -
  • 0

#2 Toldi

    Czempion

  • Power User

Reputacja: 259
Wszechwidz膮cy

  • Post贸w:841
  • Imi臋:Mateusz
  • Lokalizacja:wies
Offline

Napisano 22.12.2018 20:16

#include <amxmodx>
#include <amxmisc>

new SayText;
new a_runda;
new b_runda;
new c_runda;

public plugin_init()
{
	register_plugin("Round_Left", "1.1", "MaKeL")
	
	SayText = get_user_msgid("SayText");
	
	c_runda = get_cvar_num("mp_maxrounds")
	
	register_clcmd("say timeleft","Set_timeleft")
	
	register_clcmd("say roundleft","Set_timeleft")
	
	register_event("HLTV", "NewRound", "a", "1=0", "2=0")
	
	register_logevent("Restart", 2, "1=Game_Commencing");
}

public Restart() a_runda=0;

public NewRound()
{
	a_runda++
}

public Set_timeleft(id)
{
	b_runda = c_runda - a_runda
	
	if(b_runda > 4)
	{
		
		print_green(id,"[amxx] Pozostalo %d rund do konca", b_runda)
		
	}
	if(b_runda == 4 ||b_runda == 3)
	{
		print_green(id,"[amxx] Pozostalo %d rundy do konca", b_runda)
	}
	
	if(b_runda == 2)
	{
		
		print_green(id,"[amxx] Uwaga !!! przedostatnia runda")
		
	}
	if(b_runda == 1)
	{
		print_green(id,"[amxx] Uwaga !!! Ostatnia runda")
	}
	
	
}

stock print_green(id,const fmt[],{Float,_}:...) { //this is my stock btw 
	if(id && !is_user_connected(id)) return 0
	
	static buffer[192]
	buffer[0] = '^x04'
	vformat(buffer[1],190, fmt,3)
	
	message_begin(id ? MSG_ONE : MSG_ALL,SayText,{0,0,0},id)
	write_byte(id)
	write_string(buffer)
	message_end()
	
	return 1
}


  • +
  • -
  • 0

#3 Reebok

    Pomocny

  • Autor tematu
  • U偶ytkownik

Reputacja: 0
Nowy

  • Post贸w:48
Offline

Napisano 22.12.2018 21:17

nie pomoglo to samo, po restarcie rundy ilosc rund nie zresetowa艂a si臋 :(
  • +
  • -
  • 0




U偶ytkownicy przegl膮daj膮cy ten temat: 0

0 u偶ytkownik贸w, 0 go艣ci, 0 anonimowych