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
 

MlodyWilk - zdjęcie

MlodyWilk

Rejestracja: 18.08.2013
Aktualnie: Nieaktywny
Poza forum Ostatnio: 30.08.2013 11:43
-----

Moje tematy

Autorestart, ale bez rogrzewki.

21.08.2013 18:44

Szukam pluginu, który zrobi X resetów zanim rozpocznie się gra, bez zadnej rundy rozgrzewkowej, porprostu wchodzisz na serwer i leci 5 resow, i gra sie zaczyna. Z góry dzięki za pomoc.

Wynik.amxx zmiana wyniku po x rundach.

21.08.2013 18:30

Witam, czy mógłby ktoś przerobić plugin wynik.amxx tak aby po 15 rundach  wynik sie zmienial np. Ct wygrywa 13:2 i następuje zmiana stron, to chce aby plugin wyświetlał w tym momencie, ze jest 13 dla TT. Z góry dzięki za pomoc.

 

sma. pluginu

/* Wynik by MaKeL v 1.1 */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Wynik"
#define VERSION "1.1"
#define AUTHOR "MaKeL"

#define MAXSLOTS 32

enum Color
{
	YELLOW = 1, // Żółty
	GREEN, // Zielony
	TEAM_COLOR, // Kolor dla Temu
	GREY, // Szary
	RED, // Czerwony
	BLUE, // Niebieski
}

new TeamInfo;
new SayText;
new MaxSlots;

new TeamName[][] = 
{
	"",
	"TERRORIST",
	"CT",
	"SPECTATOR"
}

new bool:IsConnected[MAXSLOTS + 1];
new CT = 0
new TT = 0

public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	register_event("HLTV", "Nowa_Runda", "a", "1=0", "2=0") 
	register_event("SendAudio", "t_win", "a", "2&%!MRAD_terwin")
	register_event("SendAudio", "ct_win", "a", "2&%!MRAD_ctwin")
	register_event("TextMsg", "fwRestart", "a", "2&#Game_will_restart_in")
	
	TeamInfo = get_user_msgid("TeamInfo");
	SayText = get_user_msgid("SayText");
	MaxSlots = get_maxplayers();

}

public fwRestart(){
	TT = 0; 
	CT = 0;
}

public Nowa_Runda()
{
	if(CT == TT)
	{
		ColorChat(0, GREY, "Remis ^x01%d : ^x01%d",CT,TT);
	}
	if(CT > TT)
	{
	 	ColorChat(0, BLUE, "Antyterrorysci ^x04prowadza ^x01%d : ^x01%d",CT,TT);
	}
	if(CT <TT)
	{
		ColorChat(0, RED, "Terrorysci ^x04prowadza ^x01%d : ^x01%d",TT,CT);
	}
	 
	    
	
}
public ct_win()
{
	CT++																															
	
	
}
public t_win()
{
	TT++
	
}
public client_putinserver(player)
{
	IsConnected[player] = true;
}

public client_disconnect(player)
{
	IsConnected[player] = false;
}

public ColorChat(id, Color:type, const msg[], {Float,Sql,Result,_}:...)
{
	static message[256];

	switch(type)
	{
		case YELLOW: // Yellow
		{
			message[0] = 0x01;
		}
		case GREEN: // Green
		{
			message[0] = 0x04;
		}
		default: // White, Red, Blue
		{
			message[0] = 0x03;
		}
	}

	vformat(message[1], 251, msg, 4);

	// Make sure message is not longer than 192 character. Will crash the server.
	message[192] = '^0';

	new team, ColorChange, index, MSG_Type;
	
	if(!id)
	{
		index = FindPlayer();
		MSG_Type = MSG_ALL;
	
	} else {
		MSG_Type = MSG_ONE;
		index = id;
	}
	
	team = get_user_team(index);	
	ColorChange = ColorSelection(index, MSG_Type, type);

	ShowColorMessage(index, MSG_Type, message);
		
	if(ColorChange)
	{
		Team_Info(index, MSG_Type, TeamName[team]);
	}
}

ShowColorMessage(id, type, message[])
{
	message_begin(type, SayText, _, id);
	write_byte(id)		
	write_string(message);
	message_end();	
}

Team_Info(id, type, team[])
{
    message_begin(type, TeamInfo, _, id);
    write_byte(id);
    write_string(team);
    message_end();

    return 1;
}

ColorSelection(index, type, Color:Type)
{
	switch(Type)
	{
		case RED:
		{
			return Team_Info(index, type, TeamName[1]);
		}
		case BLUE:
		{
			return Team_Info(index, type, TeamName[2]);
		}
		case GREY:
		{
			return Team_Info(index, type, TeamName[0]);
		}
	}

	return 0;
}

FindPlayer()
{
	new i = -1;

	while(i <= MaxSlots)
	{
		if(IsConnected[++i])
		{
			return i;
		}
	}

	return -1;
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1045\\ f0\\ fs16 \n\\ par }
*/

Runda Rozgrzewkowa, bez przegranych i wygranych rund

20.08.2013 17:58

Witam, ostatnio wgrałem na serwer RundeRozgrzewkowa, wszystko fajnie pięknie, ale gryzie się ona z pluginem. Konkretniej chodzi o to, aby podczas rundy rozgrzewkowej, zablokował możliwość wygrania rundy (czasem sie zdarzy, ze TT spacyfikuje CT zanim jeszcze się ktoś odrodzi i wtedy dostają wygrana runde TT, a tego własnie próbuje uniknąć) lub zablokowania modułu orpheu na czas rozgrzewki, zablokowanie pluginu nic nie da. Z góry dziękuje za pomoc.

 

rr.sma

#include <amxmodx>             // AMX Mod X 
#include <amxmisc> 

new czas = 60 
new resety=3 
new noze=0 
new restart_title[1][] = { "Runda Rozgrzewkowa" } 

new misc[3][]={"misc/one.wav","misc/two.wav","misc/three.wav"} 

new bylo_juz=0 

public plugin_init() 
{ 
    register_plugin("ROund STart REstart","1.9","Miczu & Ox!d3") // Mi też się coś należy ;D 
    
    register_event("HLTV","Event_StartRound","a","1=0","2=0") 

    return PLUGIN_CONTINUE 
} 

public test_it(){ 
    new players[32], num, num2 
    get_players(players,num,"e","TERRORIST") 
    get_players(players,num2,"e","CT") 
    if(num2<1 || num<1) return 0 
    return 1 
} 

public client_disconnect(id){ 
    set_task(0.3,"disconnect",0) 
} 

public disconnect(){ 
    if(test_it()==0 && noze==0) bylo_juz=0 
} 

public Event_StartRound(){ 
    if(test_it()==0 && noze==0) bylo_juz=0 
    set_task(0.2,"restart_odlicz", 0) 
    set_task(6.0,"restart_odlicz", 0) 
} 

public client_PreThink ( id ) 
{ 
    if(noze) client_cmd(id,"weapon_knife") 
} 

public restart_odlicz(){ 
        
    if(test_it() && noze==0 && bylo_juz==0){ 
        noze=1 
        bylo_juz=1 
        czas=60 
        resety=3 
        pause("ac","Antirusher.amxx") 
        pause("ac","M_Antirusher.amxx") 
        pause("ac","M_Antirusher_2.4.amxx") 
        pause("ac","M_Antirusher_2.5.amxx") 
        pause("ac","M_Antirusher_2.5b.amxx") 
        pause("ac","imessage.amxx") 
        pause("ac","scrollmsg.amxx") 
        set_task(3.0,"muza_on", 0) 
        set_task(1.0,"wyswietl_res",8188,"",0,"b") 
    } 
} 

public muza_on(){ 
    client_cmd(0,"stopsound") 
    client_cmd(0,"spk misc/play_ejo.wav") 
} 

public wyswietl_res(){ 

    new jac1=random_num(0,255) 
    new jac2=random_num(0,255) 
    new jac3=random_num(0,255)    

    set_hudmessage(jac1, jac2, jac3, 0.65, 0.75, 2, 0.02, 1.0, 0.01, 0.1, 10) 
    show_hudmessage(0,"==================^n    *%s *^n  RESTART ZA: %i sec^n==================", restart_title, czas) 
    czas-- 
    if(czas==3){ 
        set_task(0.7,"restart_rundy_0", 0) 
    } 
} 

public restart_rundy_play(){ 
    set_hudmessage(10, 255, 40, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 4) 
    show_hudmessage(0,"===================^n* CZAS NA WALKE *^n===================") 
} 

public restart_rundy(){ 
    unpause("ac","Antirusher.amxx") 
    unpause("ac","M_Antirusher.amxx") 
    unpause("ac","M_Antirusher_2.4.amxx") 
    unpause("ac","M_Antirusher_2.5.amxx") 
    unpause("ac","M_Antirusher_2.5b.amxx") 
    unpause("ac","imessage.amxx") 
    unpause("ac","scrollmsg.amxx") 
    client_cmd(0,"stopsound") 
    client_cmd(0,"spk misc/reset.wav")  
    server_cmd("sv_restart 1") 
    remove_task(8188) 
    set_task(2.0,"restart_rundy_play", 0) 
} 

public restart_rundy_0(){ 
    client_cmd(0,"stopsound") 
    client_cmd(0,"spk %s",misc[resety-1]) 
    resety-- 
    if(resety==0){ 
        noze=0 
        set_task(1.0,"restart_rundy", 0) 
    } 
    else set_task(1.2,"restart_rundy_0", 0) 
} 

public plugin_precache() 
{ 
    precache_sound("misc/play_ejo.wav") 
    precache_sound("misc/reset.wav") 
    precache_sound(misc[0]) 
    precache_sound(misc[1]) 
    precache_sound(misc[2]) 

    return PLUGIN_CONTINUE 
}

 

 

[ROZWIĄZANE] AutoSwap uruchumiajacy sie sam po x rundach.

20.08.2013 14:22

Witam, ostatnio na serwerze zainstalowałem plugin swap_team, jest to plugin, który zmienia drużyny i ich wynik, problem polega na tym, ze trzeba ręcznie wpisać w konsoli amx_swap_teams, zeby plugin przerzucił w następnej rundzie składy. Czy istnieje jakiś sposób aby po 14 rundach plugin sam się uruchomił, lub czy byłyby ktoś łaskawy, go edytować aby tak się stało. (chodzi mi o mr15) Z góry dziękuje za pomoc.
 
Sma. Pluginu

/*	Formatright © 2010, ConnorMcLeod

	This plugin is free software;
	you can redistribute it and/or modify it under the terms of the
	GNU General Public License as published by the Free Software Foundation.

	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License
	along with this plugin; if not, write to the
	Free Software Foundation, Inc., 59 Temple Place - Suite 330,
	Boston, MA 02111-1307, USA.
*/

#include <amxmodx>
#include <amxmisc>
#include <orpheu>

#define VERSION "0.0.1"
#define PLUGIN "Swap Teams"

new OrpheuFunction:g_OfSwapAllPlayers 
new g_pGameRules
new bool:g_bSwapTeamsOnNextRound

public plugin_precache()
{
	OrpheuRegisterHook(OrpheuGetFunction("InstallGameRules"), "OnInstallGameRules_Post", OrpheuHookPost)
}

public OnInstallGameRules_Post()
{
	g_pGameRules = OrpheuGetReturn()
}

public plugin_init()
{
	register_plugin(PLUGIN, VERSION, "ConnorMcLeod")

	g_OfSwapAllPlayers = OrpheuGetFunction("SwapAllPlayers", "CHalfLifeMultiplay")

	register_event("HLTV", "Event_HLTV_New_Round", "a", "1=0", "2=0")
	register_concmd("amx_swap_teams", "ConCmd_SwapTeam", ADMIN_LEVEL_A, "Swap teams and teams scores on next round")
}

public ConCmd_SwapTeam(id, lvl, cid)
{
	if( cmd_access(id, lvl, cid, 1) )
	{
		g_bSwapTeamsOnNextRound = true
		client_print(0, print_center, "Swap teams on next round.")
	}
}

public Event_HLTV_New_Round()
{
	if( g_bSwapTeamsOnNextRound )
	{
		g_bSwapTeamsOnNextRound = false
		OrpheuCall(g_OfSwapAllPlayers, g_pGameRules)
	}
}

[ROZWIĄZANE] Zmiana teamów + wynik po x rundach.

19.08.2013 16:52

Witam, szukam pluginu, który po np. rozegranych 15 rundach zmienia teamy oraz wynik tzn, jeżeli był wynik CT:12 TT:3 to teraz bd CT:3 TT:12. Szukając go odnalazłem tylko sma., którego i tak się nie da skompilować (http://wklej.to/LYofI) Z góry dziękuje za pomoc.