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

Auto restart- problem


  • Zamknięty Temat jest zamknięty
2 odpowiedzi w tym temacie

#1 emblaze

    Koniec z cs/amxx

  • Użytkownik

Reputacja: 167
Profesjonalista

  • Postów:973
  • Lokalizacja:Mój steam: emblaze_95
Offline

Napisano 09.06.2009 19:38

Witajcie xD
Przerobiłem auto restart by PERF, ale mam problem, bo jak na HLDS odpalam to po jakimś czasie crash :/
Widzi kto jakieś błędy ?
SMA:

#include <amxmodx> 
#include <amxmisc>
#include <fun>

#define SETHUDMSG       set_hudmessage(000, 100, 255, 0.75, 0.70,  2, 0.02, 1.0, 0.01, 0.1, 1);  // Niebieski
#define SETHUDMSG1      set_hudmessage(000, 205, 000, 0.75, 0.70,  2, 0.02, 1.0, 0.01, 0.1, 1);  // Zielony
#define SETHUDMSG2      set_hudmessage(255, 255, 000, 0.75, 0.70,  2, 0.02, 1.0, 0.01, 0.1, 1);  // Żołty
#define SETHUDMSG3      set_hudmessage(000, 255, 255, 0.75, 0.70,  2, 0.02, 1.0, 0.01, 0.1, 1);  // Aqa
#define SETHUDMSG4      set_hudmessage(255, 048, 048, 0.75, 0.70,  2, 0.02, 1.0, 0.01, 0.1, 1);  // Czerwony
#define SETHUDMSG5      set_hudmessage(255, 127, 000, 0.75, 0.70,  2, 0.02, 1.0, 0.01, 0.1, 1);  // Pomarańczowy
#define SETHUDMSG6      set_hudmessage(238, 018, 137, 0.75, 0.70,  2, 0.02, 1.0, 0.01, 0.1, 1);  // Rożowy
#define SETHUDMSG7      set_hudmessage(139, 069, 019, 0.75, 0.70,  2, 0.02, 1.0, 0.01, 0.1, 1);  // Brązowy
#define SETHUDMSG8      set_hudmessage(155, 048, 255, 0.75, 0.70,  2, 0.02, 1.0, 0.01, 0.1, 1);  // Fioletowy
#define SETHUDMSG9      set_hudmessage(250, 100, 100, -1.0, 0.25,  1, 0.02, 1.0, 0.01, 0.1, 1);  // (THREE TWO ONE)
#define SETHUDMSG10     set_hudmessage(250, 075, 075, -1.0, 0.25,  1, 0.02, 1.0, 0.01, 0.1, 1);  // (THREE TWO ONE)
#define LEVEL_LEVEL	ADMIN_CFG

new bool:AutoRR = true
new bool:knifeArena = false

public plugin_init()
{
	register_plugin("Auto-Restart-Knives","0.2","PEREF")
	register_dictionary("auto_restart_knives.txt")
	register_concmd("amx_auto_rr_knives","auto_rr",LEVEL_LEVEL," - 1 : ON | 0 : OFF")
	register_cvar("auto_rr_time","120")
	register_event("TextMsg","restart_time","a","2&#Game_C")
	register_clcmd("weapony", "wep")
	return PLUGIN_CONTINUE
}

public auto_rr(id)
{
	if (!(get_user_flags(id)&LEVEL_LEVEL)) {
		client_print(id, print_console, "[AMXX] nie masz dostepu do tej funkcji")
		
		return PLUGIN_HANDLED
	}

	new arg [2]
	read_argv(1,arg,1)

	if(equal(arg, "1"))
	{
		AutoRR = true
		client_print(id,print_console,"[AMXX] wlaczone")
	}
	else if(equal(arg, "0"))
	{
		AutoRR = false
		client_print(id,print_console,"[AMXX] wylaczone")
	}
	else if(!equal(arg, "1") || equal(!arg, "0"))
	{
		client_print(id,print_console,"amx_auto_rr_knives 1 = On | 0 = Off");
	}
	return PLUGIN_HANDLED
 }

public wep(id)
{
	if (!knifeArena)
		return PLUGIN_CONTINUE

	give_item(id, "weapon_m4a1")
	give_item(id, "weapon_deagle")
	give_item(id, "weapon_mp5navy")
	give_item(id, "weapon_m249")
	give_item(id, "weapon_awp")
	give_item(id, "weapon_p90")
	give_item(id, "weapon_ak47")
	set_user_armor(id, 500)
	set_user_health(id, 500)
	return PLUGIN_CONTINUE
}

public restart_time() 
{
	if (AutoRR==true)
	{
		new restart_time=get_cvar_num("auto_rr_time")

		knifeArena = true

		set_task(float(restart_time),"restart_map",0)
		set_task(float(restart_time)-120,"restart_120s",0)
	}
}
public restart_120s()
{
	set_hudmessage(255, 0, 0, 0.49, 0.37, 0, 6.0, 15.0)
	show_hudmessage(0, "Day of the dead!")
	client_cmd(0,"mp3 play sound/total_overdose/day_of_the_dead.mp3")
	set_task(3.0, "sound")
}

public sound () {
	client_cmd(0,"mp3 play sound/total_overdose/day_of_the_dead.mp3")
}
public restart_map() 
{
	if (AutoRR==true)
	{
		set_cvar_float("sv_restart",1.0)
		knifeArena = false
		set_hudmessage(255, 0, 0, 0.49, 0.37, 0, 6.0, 15.0)
		show_hudmessage(0, "End ofthe day of the dead!")
	}
}

public plugin_precache()
{
	precache_sound( "total_overdose/day_of_the_dead.mp3")
	return PLUGIN_CONTINUE
}

  • +
  • -
  • 0

#2 mgr inż. Pavulon

    C35H60Br2N2O4

  • Przyjaciel

Reputacja: 1 742
Godlike

  • Postów:6 881
  • Steam:steam
  • Imię:Konrad
  • Lokalizacja:Koniecpol
Offline

Napisano 09.06.2009 19:41

mam problem, bo jak na HLDS odpalam to po jakimś czasie crash :/

a widzi ktoś jakiś debug.log czy error.log ?
  • +
  • -
  • 0

#3 emblaze

    Koniec z cs/amxx

  • Autor tematu
  • Użytkownik

Reputacja: 167
Profesjonalista

  • Postów:973
  • Lokalizacja:Mój steam: emblaze_95
Offline

Napisano 09.06.2009 19:44

Logi czyste ? ;) Prędzej miałem pewny błąd w logach ale teraz juz go nie ma to myślałem, że ok. Teraz logi czyste są bo tej funkcji co przeszkadzała juz nie ma :P

@Edit: Można zamknąć, problem leżał z strony innego pluginu ;)
  • +
  • -
  • 0




Użytkownicy przeglądający ten temat: 0

0 użytkowników, 0 gości, 0 anonimowych