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
 

Vixenek - zdjęcie

Vixenek

Rejestracja: 17.04.2012
Aktualnie: Nieaktywny
Poza forum Ostatnio: 10.05.2013 15:04
-----

Moje tematy

Naprawa pluginu TP

02.05.2013 22:48

Proszę o naprawienie tego kodu .sma:

#include <amxmodx>
#include <cstrike>

#define TASK_HUD 61612

new maxPlayers;
new runda;
new wygrane_ct;
new wygrane_t;

public plugin_init()
{
register_plugin("Zmiana", "1.1", "FD_GODPL & Jenot");

register_event("HLTV", "NewRound", "a", "1=0", "2=0");

register_logevent("Restart", 2, "1=Game_Commencing");

register_event("SendAudio", "ct_win", "a", "2&%!MRAD_ctwin");

register_event("SendAudio", "t_win", "a", "2&%!MRAD_terwin");

register_logevent("ShowScore", 2, "1=Round_Start");

set_task(10.0, "wczytaj_cfg");

set_task(30.0, "amx_restartgame");
}

public plugin_cfg()
{
	maxPlayers = get_maxplayers();
}

public wczytaj_cfg()
{
	server_cmd("exec esl.cfg");
	client_print(1, print_chat, "Config ESL poprawnie wczytany!")
}

public client_connect(id)
	set_task(2.0, "info", id+TASK_HUD)
public client_disconnect(id)
	remove_task(id+TASK_HUD, 0)
	
public amx_restartgame(id)
{

    client_print(0,print_chat,"|--Gramy po 3 restartach--|");

	
    set_task(3.0, "RestartR", id)

    set_task(6.0, "RestartR", id)

    set_task(9.0, "RestartR", id)

    set_task(11.0, "Message")

    return PLUGIN_HANDLED;

}

public RestartR()
{

    server_cmd("sv_restart 1")

}

public Message()
{

	client_print(0,print_chat,"|-------Zaczynamy Gre!!!-------|");
	client_print(0,print_chat,"|-------Zaczynamy Gre!!!-------|");
	client_print(0,print_chat,"|-------Zaczynamy Gre!!!-------|");

}  

public ct_win()

wygrane_ct++;

public t_win()

wygrane_t++;

public info(task)
{
	
	new id = task-TASK_HUD
	set_hudmessage(255, 255, 255, 0.55, 0.8, 0, 6.0, 1.2, 0.1, 0.2, -1)
	show_hudmessage(id, "Minelo %d rund. Wyniki: CT - %d, T - %d", wygrane_ct, wygrane_t);

}

public NewRound()
{

runda++;

switch(runda)

{
case 16: ChangeTeam();
}

switch(wygrane_ct || wygrane_t)
{
case 16: ZmienMape();
}

return PLUGIN_CONTINUE;

}

public ZmienMape()
{

new mapa[30];

get_cvar_string("amx_nextmap", mapa, charsmax(mapa));

server_cmd("changelevel %s", mapa);

}



public Restart()

runda = 0;



public ChangeTeam()
{

for(new i=1;i<=maxPlayers;i++)

{

if(!is_user_connected(i) || cs_get_user_team(i) == CS_TEAM_SPECTATOR || cs_get_user_team(i) == CS_TEAM_UNASSIGNED)

continue;



cs_set_user_team(i, cs_get_user_team(i) == CS_TEAM_T ? CS_TEAM_CT : CS_TEAM_T);

cs_user_spawn(i);

}

set_task(1.0, "amx_restartgame", _, _, _, "b");

return PLUGIN_CONTINUE
}

 

 

 

 

A w konsoli serwera pisze:

L 05/02/2013 - 23:27:23: String formatted incorrectly - parameter 5 (total 4)
L 05/02/2013 - 23:27:23: [AMXX] Run time error 25 (plugin "mr15.amxx") - debug not enabled!
L 05/02/2013 - 23:27:23: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 05/02/2013 - 23:27:24: String formatted incorrectly - parameter 5 (total 4)
L 05/02/2013 - 23:27:24: [AMXX] Run time error 25 (plugin "mr15.amxx") - debug not enabled!
L 05/02/2013 - 23:27:24: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 05/02/2013 - 23:27:24: String formatted incorrectly - parameter 5 (total 4)
L 05/02/2013 - 23:27:24: [AMXX] Run time error 25 (plugin "mr15.amxx") - debug not enabled!
L 05/02/2013 - 23:27:24: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).

Edycja Plugin TP

29.04.2013 17:15

#include <amxmodx>

#include <cstrike>



new maxPlayers;

new runda;

new wygrane_ct;

new wygrane_tt;

new ilosc_reset;



public plugin_init()

{

register_plugin("Zmiana", "1.0", "FD_GODPL");

register_event("HLTV", "NewRound", "a", "1=0", "2=0");

register_logevent("Restart", 2, "1=Game_Commencing");

register_event("SendAudio", "ct_win", "a", "2&%!MRAD_ctwin");

register_event("SendAudio", "t_win", "a", "2&%!MRAD_terwin");

register_logevent("ShowScore", 2, "1=Round_Start");

}



public ct_win()

wygrane_ct++;



public t_win()

wygrane_tt++;



public plugin_cfg()

maxPlayers = get_maxplayers();



public ShowScore()

{

if(runda == 14)

info();

}



public info()

{

for(new i=1;i<=maxPlayers;i++)

{

set_hudmessage(255, 255, 255, 0.57, 0.17, 2, 6.0, 5.0, 0.1, 0.2, -1)

show_hudmessage(i, "Wyniki Po 12 Rundach Nastepujace: TT - %d, CT - %d", wygrane_tt, wygrane_ct);

}

wygrane_ct = 0;

wygrane_tt = 0;

}



public NewRound()

{

runda++;



switch(runda)

{

case 13: ChangeTeam();



case 26: ZmienMape();

}



return PLUGIN_CONTINUE;

}



public ZmienMape()

{

new mapa[30];

get_cvar_string("amx_nextmap", mapa, charsmax(mapa));

server_cmd("changelevel %s", mapa);

}



public Restart()

runda = 0;



public ChangeTeam()

{

for(new i=1;i<=maxPlayers;i++)

{

if(!is_user_connected(i) || cs_get_user_team(i) == CS_TEAM_SPECTATOR || cs_get_user_team(i) == CS_TEAM_UNASSIGNED)

continue;



cs_set_user_team(i, cs_get_user_team(i) == CS_TEAM_T ? CS_TEAM_CT : CS_TEAM_T);

cs_user_spawn(i);

}

set_task(1.0, "Resetuj", _, _, _, "b");

ilosc_reset = 4;

return PLUGIN_CONTINUE

}



public Resetuj()

{

ilosc_reset--;



set_cvar_num("sv_restartround", 1);



if(ilosc_reset <= 0)

{

remove_task(0);

set_cvar_num("sv_restartround", 0);

client_print(0, print_chat, "[----GAME LIVE !----]");

runda = 13;

return PLUGIN_CONTINUE

}



client_print(0, print_chat, "[----Gramy po %d resetach----]", ilosc_reset);



return PLUGIN_CONTINUE

}

Proszę zmienić rundy żeby było mr15, zmienic na 3restarty zamiast jednego, ma zostawiać wynik (czyli powiedzmy ze TT wygralo 13:2 w pierwszej polowce, po zmianie teamow CT wygrywa 13:2 czyli stare TT)
po wygranych 16 rundach zmiana mapy,proszę też dodać przy restartach żeby korzystało z esl.cfg

W pluginie chodzi o to że gra się 15 rund,przeżuca teamy,są 3 restarty gra się 16 wygranych rund i jest zmiana mapy.

 

Będę bardzo wdzięczny za pomoc.
 

[ROZWIĄZANE] Problem z skompilowaniem pluginu z nozami

16.02.2013 20:20

Witam,mam problem z pluginem,nie chce mi się skompilować pisze:
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

noze.sma(19) : error 029: invalid expression, assumed zero
noze.sma(19 -- 20) : error 008: must be a constant expression; assumed zero
noze.sma(27 -- 30) : error 008: must be a constant expression; assumed zero
noze.sma(68) : error 001: expected token: "}", but found "-end of file-"

4 Errors.
Could not locate output file noze.amxx (compile failed).

oto kod sma:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>


#define PLUGIN "Menu z Nozami"
#define VERSION "1.0"
#define AUTHOR "Blacker"


new zmiana[33];
new nazwy[][256]={
		"CocaCola",
		"Krwawy",
		"Ognisty",
		"Złoty",
		"Unikalny",
		"Reggae",
}
new modele[][256]={
		"models/news/v_knife.mdl",
		"models/news/krew.mdl",
		"models/news/ogien.mdl",
		"models/news/zloto.mdl",
		"models/news/unikalny.mdl",
		"models/news/jamajka.mdl",
}


public plugin_init(){	
		register_plugin(PLUGIN, VERSION, AUTHOR);		
		register_clcmd("say /noz", "xmenu");
		register_event("CurWeapon", "Event_Change", "be", "1=29")
		
}

public client_connected(id){
		zmiana[id] = -1;
}

public Event_Change(id){
		if(get_user_weapon(id) ==  29 && zmiana[id] != -1){
				set_pev(id, pev_viewmodel2, modele[zmiana[id]]);
		}
}

public xmenu(id){
		new menu = menu_create("Wybierz swoj noz:", "wybieranie");
		for(new i = 0 ;i<sizeof(nazwy);i++){
				menu_additem(menu,nazwy[i])
		}
		
		
		menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
		
		menu_display(id, menu, 0);
}

public wybieranie(id, menu, item){
		if (item == MENU_EXIT){
				menu_destroy(menu);
				return PLUGIN_HANDLED;
		}
		
		zmiana[id] = item;
		menu_destroy(menu);
		return PLUGIN_HANDLED;

Jeśli ktoś wie co jest przyczyną lub źle coś napisałem itp to proszę to poprawić jak można,będę bardzo wdzięczny.

Mr 12.zmiana teamu i automatyczna zmiana mapy

24.12.2012 12:09

Proszę o napisanie pluginu,który po 12 wygranych rundach zamienia teamy i znowu trzeba zdobyć 12 wygranych rund i automatycznie zmienia mape.
Np: Zaczyna sie mapa,Dla CT jest 7:5,zmienia teamy,są 3 restarty,znowu gra się 12 wygranych rund i zmienia mapę na następną z mapcycle.
Bardzo mi na tym zależy,bo potrzebuje do serwera Tp,proszę aby to był 1 plugin ze wszystkim.

Przerobka Vip [zm]

09.08.2012 19:06

Mój vip jest czytany z vips.ini z flag ABCDE
Ja stosuje flagi tak:
ABD- VIP LITE
ABCDE- VIP PRO
Ale na Flage "t" Jest Vip PRO

Proszę o przerobienie tak vipa,aby Flagi ABD były na flagę "s" i zmienić czytanie z vips.ini na users.ini
Download Vip-Zalacznik