Serwery wiaderko.com Zwiń / Rozwiń kategorię

HashJama [TP] 193.33.176.148:27015 | tp.wiaderko.com status serwera HashJama [TP] połącz

HashJama CS:GO [DM] 193.33.176.53:27015 | dm.wiaderko.com status serwera HashJama CS:GO [DM] połącz

HashJama CS:GO [FFA] 193.33.176.15:27015 | ffa.wiaderko.com status serwera HashJama CS:GO FFA [FFA] połącz

HashJama [TeamSpeak 3] 62.210.99.220:9987 | ts.wiaderko.com status serwera HashJama [TP ELITE] 62.210.99.220:27015 połącz

SPONSOR:
pukawka.pl

Nabór na JUNIOR ADMINA forum - Więcej informacji > Klik <
Pokaż wyniki od 1 do 5 z 5
  1. #1
    Spamer Awatar kubaszekr38
    Dołączył
    Nov 2011
    Wiek
    19
    Posty
    113
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Domyślnie Frag Counter - małe przerobienie pluginu..

    Witam Serdecznie! Chciałbym trochę przerobić plugin Frag Counter (ten: http://www.forums.wiaderko.com/przyd...ik-fragow.html ), a mianowicie, żeby liczba fragów była cały czas na czerwono, żeby nie migała itd.. I druga rzecz najważniejsza, to mam serwer DeathMatch i nie chce, żeby po dead'zie, to znowu znikało i od nowa liczyło fragi.. Proszę o pomoc!

  2. #2
    Adminus pospolitus Awatar naven
    Dołączył
    Jan 2008
    Wiek
    25
    Posty
    10,802
    Thanks
    31
    Thanked 652 Times in 605 Posts

    Domyślnie Re: Frag Counter - małe przerobienie pluginu..

    Kod:
    /*AMX MOD X script
    **************************************************************************
     * 		FragCounter   V    1.01		by	Scarzzurs
     *
     *
     *  *******************************************************************************
     *  
     *	Ported By KingPin( kingpin@onexfx.com ). I take no responsibility 
     *	for this file in any way. Use at your own risk. No warranties of any kind. 
     *
     *  ********************************************************************************
     *
     **********************************************************************************/
    
    #include <amxmodx>
    
    new pfrags[33]
    new top
    new gmsgStatusIcon
    
    public playerspawn(id){
    	pfrags[id]=0
    	top = 0
    	calculate_time(id,pfrags[id])
    }
    
    public death(){
    	new killer = read_data(1)
    	new victim = read_data(2)
    	pfrags[killer]=pfrags[killer]+1
    	pfrags[victim]= 0;
    	if (pfrags[killer]==9 && file_exists("sound/misc/monsterkill.wav")==1)
    		emit_sound(killer,CHAN_STATIC, "misc/monsterkill.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
    	topplayer()
    	new players[32]
    	new player_num
    	get_players(players, player_num)
    	for (new i = 0; i < player_num; i++)
    		calculate_time(players[i],pfrags[players[i]])
    	return PLUGIN_CONTINUE
    }
    
    public topplayer(){
    	new score
    	new players[32]
    	new player_num
    	get_players(players, player_num)
    	for (new i = 0; i < player_num; i++){
    		if (pfrags[players[i]]>score){
    			score=pfrags[players[i]]
    			top=players[i]
    		}
    		else if (pfrags[players[i]]==score)
    			top = 0
    	}
    }
    
    public calculate_time(id,num){
    	switch(num){
    		case 0:{
    			showtimer(id,"number_1",0)
    			showtimer(id,"number_2",0)
    			showtimer(id,"number_3",0)
    			showtimer(id,"number_4",0)
    			showtimer(id,"number_5",0)
    			showtimer(id,"number_6",0)
    			showtimer(id,"number_7",0)
    			showtimer(id,"number_8",0)
    			showtimer(id,"number_9",0)
    		}
    		case 1:{
    			showtimer(id,"number_1",1)
    			showtimer(id,"number_2",0)
    			showtimer(id,"number_3",0)
    			showtimer(id,"number_4",0)
    			showtimer(id,"number_5",0)
    			showtimer(id,"number_6",0)
    			showtimer(id,"number_7",0)
    			showtimer(id,"number_8",0)
    			showtimer(id,"number_9",0)
    		}
    		case 2:{
    			showtimer(id,"number_1",0)
    			showtimer(id,"number_2",1)
    			showtimer(id,"number_3",0)
    			showtimer(id,"number_4",0)
    			showtimer(id,"number_5",0)
    			showtimer(id,"number_6",0)
    			showtimer(id,"number_7",0)
    			showtimer(id,"number_8",0)
    			showtimer(id,"number_9",0)
    		}
    		case 3:{
    			showtimer(id,"number_1",0)
    			showtimer(id,"number_2",0)
    			showtimer(id,"number_3",1)
    			showtimer(id,"number_4",0)
    			showtimer(id,"number_5",0)
    			showtimer(id,"number_6",0)
    			showtimer(id,"number_7",0)
    			showtimer(id,"number_8",0)
    			showtimer(id,"number_9",0)
    		}
    		case 4:{
    			showtimer(id,"number_1",0)
    			showtimer(id,"number_2",0)
    			showtimer(id,"number_3",0)
    			showtimer(id,"number_4",1)
    			showtimer(id,"number_5",0)
    			showtimer(id,"number_6",0)
    			showtimer(id,"number_7",0)
    			showtimer(id,"number_8",0)
    			showtimer(id,"number_9",0)
    		}
    		case 5:{
    			showtimer(id,"number_1",0)
    			showtimer(id,"number_2",0)
    			showtimer(id,"number_3",0)
    			showtimer(id,"number_4",0)
    			showtimer(id,"number_5",1)
    			showtimer(id,"number_6",0)
    			showtimer(id,"number_7",0)
    			showtimer(id,"number_8",0)
    			showtimer(id,"number_9",0)
    		}
    		case 6:{
    			showtimer(id,"number_1",0)
    			showtimer(id,"number_2",0)
    			showtimer(id,"number_3",0)
    			showtimer(id,"number_4",0)
    			showtimer(id,"number_5",0)
    			showtimer(id,"number_6",1)
    			showtimer(id,"number_7",0)
    			showtimer(id,"number_8",0)
    			showtimer(id,"number_9",0)
    		}
    		case 7:{
    			showtimer(id,"number_1",0)
    			showtimer(id,"number_2",0)
    			showtimer(id,"number_3",0)
    			showtimer(id,"number_4",0)
    			showtimer(id,"number_5",0)
    			showtimer(id,"number_6",0)
    			showtimer(id,"number_7",1)
    			showtimer(id,"number_8",0)
    			showtimer(id,"number_9",0)
    		}
    		case 8:{
    			showtimer(id,"number_1",0)
    			showtimer(id,"number_2",0)
    			showtimer(id,"number_3",0)
    			showtimer(id,"number_4",0)
    			showtimer(id,"number_5",0)
    			showtimer(id,"number_6",0)
    			showtimer(id,"number_7",0)
    			showtimer(id,"number_8",1)
    			showtimer(id,"number_9",0)
    		}
    		case 9:{
    			showtimer(id,"number_1",0)
    			showtimer(id,"number_2",0)
    			showtimer(id,"number_3",0)
    			showtimer(id,"number_4",0)
    			showtimer(id,"number_5",0)
    			showtimer(id,"number_6",0)
    			showtimer(id,"number_7",0)
    			showtimer(id,"number_8",0)
    			showtimer(id,"number_9",1)
    		}
    	}
    }
    
    public showtimer(id,number[10],onoff){
    	if (is_user_connected(id)){
    		if (id == top && onoff == 1)
    			onoff = 2
    		message_begin( MSG_ONE, gmsgStatusIcon, {0,0,0}, id )
    		write_byte( onoff ) // status
    		write_string( number ) // sprite name
    		write_byte( 0 ) // red
    		write_byte( 255 ) // green
    		write_byte( 0 ) // blue
    		message_end()
    	}
    }
    
    public roundend(){
    	if (top != 0){
    		new sname[32]
    		get_user_name(top,sname,32)
    		set_hudmessage(0, 255, 0, -1.0, 0.3, 0, 1.0, 5.0, 0.1, 0.2, 5)
    		show_hudmessage(0,"Best player of the round: %s",sname)
    	}
    }
    
    public plugin_init(){
    	register_plugin("FragCounter","1.01","Scarzzurs")
    	gmsgStatusIcon = get_user_msgid("StatusIcon")
    	register_event("DeathMsg","death","a")
    	register_event("ResetHUD","playerspawn","b")
    	register_event("SendAudio","roundend","a","2=%!MRAD_terwin","2=%!MRAD_ctwin","2=%!MRAD_rounddraw")
    }
    
    public plugin_precache()
    	if (file_exists("sound/misc/monsterkill.wav")==1)
    		precache_sound("misc/monsterkill.wav")
    Nie sprawdzałem ale powinno działać(reset po smierci). Co do jednego koloru to spróbuj to(zawiera obie poprawki).
    Kod:
    /*AMX MOD X script
    **************************************************************************
     * 		FragCounter   V    1.01		by	Scarzzurs
     *
     *
     *  *******************************************************************************
     *  
     *	Ported By KingPin( kingpin@onexfx.com ). I take no responsibility 
     *	for this file in any way. Use at your own risk. No warranties of any kind. 
     *
     *  ********************************************************************************
     *
     **********************************************************************************/
    
    #include <amxmodx>
    
    new pfrags[33]
    new top
    new gmsgStatusIcon
    
    public playerspawn(id){
    	pfrags[id]=0
    	top = 0
    	calculate_time(id,pfrags[id])
    }
    
    public death(){
    	new killer = read_data(1)
    	new victim = read_data(2)
    	pfrags[killer]=pfrags[killer]+1
    	pfrags[victim]= 0;
    	if (pfrags[killer]==9 && file_exists("sound/misc/monsterkill.wav")==1)
    		emit_sound(killer,CHAN_STATIC, "misc/monsterkill.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
    	topplayer()
    	new players[32]
    	new player_num
    	get_players(players, player_num)
    	for (new i = 0; i < player_num; i++)
    		calculate_time(players[i],pfrags[players[i]])
    	return PLUGIN_CONTINUE
    }
    
    public topplayer(){
    	new score
    	new players[32]
    	new player_num
    	get_players(players, player_num)
    	for (new i = 0; i < player_num; i++){
    		if (pfrags[players[i]]>score){
    			score=pfrags[players[i]]
    			top=players[i]
    		}
    		else if (pfrags[players[i]]==score)
    			top = 0
    	}
    }
    
    public calculate_time(id,num){
    	switch(num){
    		case 0:{
    			showtimer(id,"number_1",0)
    			showtimer(id,"number_2",0)
    			showtimer(id,"number_3",0)
    			showtimer(id,"number_4",0)
    			showtimer(id,"number_5",0)
    			showtimer(id,"number_6",0)
    			showtimer(id,"number_7",0)
    			showtimer(id,"number_8",0)
    			showtimer(id,"number_9",0)
    		}
    		case 1:{
    			showtimer(id,"number_1",1)
    			showtimer(id,"number_2",0)
    			showtimer(id,"number_3",0)
    			showtimer(id,"number_4",0)
    			showtimer(id,"number_5",0)
    			showtimer(id,"number_6",0)
    			showtimer(id,"number_7",0)
    			showtimer(id,"number_8",0)
    			showtimer(id,"number_9",0)
    		}
    		case 2:{
    			showtimer(id,"number_1",0)
    			showtimer(id,"number_2",1)
    			showtimer(id,"number_3",0)
    			showtimer(id,"number_4",0)
    			showtimer(id,"number_5",0)
    			showtimer(id,"number_6",0)
    			showtimer(id,"number_7",0)
    			showtimer(id,"number_8",0)
    			showtimer(id,"number_9",0)
    		}
    		case 3:{
    			showtimer(id,"number_1",0)
    			showtimer(id,"number_2",0)
    			showtimer(id,"number_3",1)
    			showtimer(id,"number_4",0)
    			showtimer(id,"number_5",0)
    			showtimer(id,"number_6",0)
    			showtimer(id,"number_7",0)
    			showtimer(id,"number_8",0)
    			showtimer(id,"number_9",0)
    		}
    		case 4:{
    			showtimer(id,"number_1",0)
    			showtimer(id,"number_2",0)
    			showtimer(id,"number_3",0)
    			showtimer(id,"number_4",1)
    			showtimer(id,"number_5",0)
    			showtimer(id,"number_6",0)
    			showtimer(id,"number_7",0)
    			showtimer(id,"number_8",0)
    			showtimer(id,"number_9",0)
    		}
    		case 5:{
    			showtimer(id,"number_1",0)
    			showtimer(id,"number_2",0)
    			showtimer(id,"number_3",0)
    			showtimer(id,"number_4",0)
    			showtimer(id,"number_5",1)
    			showtimer(id,"number_6",0)
    			showtimer(id,"number_7",0)
    			showtimer(id,"number_8",0)
    			showtimer(id,"number_9",0)
    		}
    		case 6:{
    			showtimer(id,"number_1",0)
    			showtimer(id,"number_2",0)
    			showtimer(id,"number_3",0)
    			showtimer(id,"number_4",0)
    			showtimer(id,"number_5",0)
    			showtimer(id,"number_6",1)
    			showtimer(id,"number_7",0)
    			showtimer(id,"number_8",0)
    			showtimer(id,"number_9",0)
    		}
    		case 7:{
    			showtimer(id,"number_1",0)
    			showtimer(id,"number_2",0)
    			showtimer(id,"number_3",0)
    			showtimer(id,"number_4",0)
    			showtimer(id,"number_5",0)
    			showtimer(id,"number_6",0)
    			showtimer(id,"number_7",1)
    			showtimer(id,"number_8",0)
    			showtimer(id,"number_9",0)
    		}
    		case 8:{
    			showtimer(id,"number_1",0)
    			showtimer(id,"number_2",0)
    			showtimer(id,"number_3",0)
    			showtimer(id,"number_4",0)
    			showtimer(id,"number_5",0)
    			showtimer(id,"number_6",0)
    			showtimer(id,"number_7",0)
    			showtimer(id,"number_8",1)
    			showtimer(id,"number_9",0)
    		}
    		case 9:{
    			showtimer(id,"number_1",0)
    			showtimer(id,"number_2",0)
    			showtimer(id,"number_3",0)
    			showtimer(id,"number_4",0)
    			showtimer(id,"number_5",0)
    			showtimer(id,"number_6",0)
    			showtimer(id,"number_7",0)
    			showtimer(id,"number_8",0)
    			showtimer(id,"number_9",1)
    		}
    	}
    }
    
    public showtimer(id,number[10],onoff){
    	if (is_user_connected(id)){
    		//if (id == top) && onoff == 1)
    			//onoff = 2
    		message_begin( MSG_ONE, gmsgStatusIcon, {0,0,0}, id )
    		write_byte( onoff ) // status
    		write_string( number ) // sprite name
    		write_byte( 0 ) // red
    		write_byte( 255 ) // green
    		write_byte( 0 ) // blue
    		message_end()
    	}
    }
    
    public roundend(){
    	if (top != 0){
    		new sname[32]
    		get_user_name(top,sname,32)
    		set_hudmessage(0, 255, 0, -1.0, 0.3, 0, 1.0, 5.0, 0.1, 0.2, 5)
    		show_hudmessage(0,"Best player of the round: %s",sname)
    	}
    }
    
    public plugin_init(){
    	register_plugin("FragCounter","1.01","Scarzzurs")
    	gmsgStatusIcon = get_user_msgid("StatusIcon")
    	register_event("DeathMsg","death","a")
    	register_event("ResetHUD","playerspawn","b")
    	register_event("SendAudio","roundend","a","2=%!MRAD_terwin","2=%!MRAD_ctwin","2=%!MRAD_rounddraw")
    }
    
    public plugin_precache()
    	if (file_exists("sound/misc/monsterkill.wav")==1)
    		precache_sound("misc/monsterkill.wav")
    Daj znać czy działa.
    Najlepszy hosting Hidden Content href="Hidden Content target="_blank">tutaj
    Konfiguracja amxx, instalacja pluginów, pisanie pluginów AMXX. Więcej info na Hidden Content

    "At the end of the day, there are always going to be mental disorders and people who cause violence for no other reason than the fact that they're fucked up and lost. And all we can do is try to learn from it." Corey Taylor.

  3. #3
    Spamer Awatar kubaszekr38
    Dołączył
    Nov 2011
    Wiek
    19
    Posty
    113
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Domyślnie Odp: Frag Counter - małe przerobienie pluginu..

    Te dwa plugi sie w ogóle nie nadają.. Po pierwsze plugin resetuje wynik i liczy od nowa po zrespieniu się po drugie w jednym i drugim pluginie jest zielony kolor zamiast czerownego.. Najlepiej to zrób, żeby te fragi brało z tabeli wyników, to myślę, że będzie ci ławiej obrobić ten plugin ;) Bo oto mi właśnie chodzi, żeby nonstop naliczało te fragi jak w tabeli wyników są one..

  4. #4
    Adminus pospolitus Awatar naven
    Dołączył
    Jan 2008
    Wiek
    25
    Posty
    10,802
    Thanks
    31
    Thanked 652 Times in 605 Posts

    Domyślnie Re: Odp: Frag Counter - małe przerobienie pluginu..

    I druga rzecz najważniejsza, to mam serwer DeathMatch i nie chce, żeby po dead'zie, to znowu znikało i od nowa liczyło frag
    Cytat Zamieszczone przez kubaszekr38 Zobacz posta
    Po pierwsze plugin resetuje wynik i liczy od nowa po zrespieniu się po drugie w jednym i drugim pluginie jest zielony kolor zamiast czerownego

    umm?
    Najlepszy hosting Hidden Content href="Hidden Content target="_blank">tutaj
    Konfiguracja amxx, instalacja pluginów, pisanie pluginów AMXX. Więcej info na Hidden Content

    "At the end of the day, there are always going to be mental disorders and people who cause violence for no other reason than the fact that they're fucked up and lost. And all we can do is try to learn from it." Corey Taylor.

  5. #5
    Spamer Awatar kubaszekr38
    Dołączył
    Nov 2011
    Wiek
    19
    Posty
    113
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Domyślnie Odp: Frag Counter - małe przerobienie pluginu..

    że co, przecież dobrze napisałem.. Chce, aby fragi cały czas naliczało, żeby nie resetował się od nowa ten wynik fragów, tylko, żeby się dalej do tej liczby, która jest naliczał (nie, że po zrespieniu ta liczba się jakby resetuje i fragi się nabija od nowa), a więc żeby działał na zasadzie, aby była liczba tj. w tabeli wyników liczba fragów, tylko żeby nie liczyło od nowa.. I ta liczba, żeby było czerowna.. może teraz rozumiesz ;p

Podobne wątki

  1. Przerobienie Pluginu JB
    By Kubaru in forum Pisanie pluginów AMXX
    Odpowiedzi: 0
    Ostatni post / autor: 04-04-2011, 18:09
  2. [Przerobienie] prośba o przerobienie pluginu na non steam
    By Nindża in forum Pisanie pluginów AMXX
    Odpowiedzi: 1
    Ostatni post / autor: 04-07-2010, 22:11
  3. Przerobienie pluginu ctf
    By powerman3 in forum Pisanie pluginów AMXX
    Odpowiedzi: 1
    Ostatni post / autor: 30-05-2010, 17:23
  4. Przerobienie pluginu
    By Rafalix123 in forum Problem z pluginem AMX/AMXX
    Odpowiedzi: 3
    Ostatni post / autor: 03-05-2010, 22:07
  5. Przerobienie pluginu HP
    By krzysiekgame in forum Pisanie pluginów AMXX
    Odpowiedzi: 8
    Ostatni post / autor: 27-07-2009, 20:14

Odwiedzający poszukiwali:

Nikt jeszcze nie odwiedził tej strony poprzez wyszukiwarki

Uprawnienia umieszczania postów

  • Nie możesz zakładać nowych tematów
  • Nie możesz pisać wiadomości
  • Nie możesz dodawać załączników
  • Nie możesz edytować swoich postów
  •