/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> #define PLUGIN "New Plug-In" #define VERSION "1.0" #define AUTHOR "Home" new czas=30; public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_event("HLTV", "Nowa_Runda", "a", "1=0", "2=0") register_logevent("Koniec_Rundy", 2, "1=Round_End") } public Nowa_Runda(){ for(new i=0;i<33;i++){ set_hudmessage(0, 255, 0, -1.0, -1.0, 0, 0, 1, 0.5, 0.5, 4) show_hudmessage(i, " %d",czas) } czas--; set_task(1.0,"Nowa_Runda",czas+1) } public Koniec_Rundy(){ czas=30; }ale wyświetla tylko 30 i dalej już nie
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.
|
Odliczanie do 0
#1
Posted 26.09.2009 08:48
#2
Posted 26.09.2009 10:14
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> #define PLUGIN "New Plug-In" #define VERSION "1.0" #define AUTHOR "Home" new czas = 30; public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_event("HLTV", "Nowa_Runda", "a", "1=0", "2=0") register_logevent("Koniec_Rundy", 2, "1=Round_End") } public Nowa_Runda(){ set_task(1.0,"wyswietl",8188,"",0,"b") } public wyswietl(){ for(new i=0;i<33;i++){ set_hudmessage(0, 255, 0, -1.0, -1.0, 0, 0, 1, 0.5, 0.5, 4) show_hudmessage(i, " %d",czas) } czas--; set_task(1.0,"wyswietl",czas+1) } public Koniec_Rundy(){ remove_task(8188) czas = 30; }
#3
Posted 26.09.2009 10:25
#4
Posted 26.09.2009 10:29
#include <amxmodx> new czas = 30 public plugin_init() { register_plugin("New Plug-In", "1.0", "AMXX") register_event("HLTV", "Nowa_Runda", "a", "1=0", "2=0") register_logevent("Koniec_Rundy", 2, "1=Round_End") } public Nowa_Runda() { set_hudmessage(0, 255, 0, -1.0, -1.0, 0, 0.0, 1.0, 0.5, 0.5, 4) show_hudmessage(0, "%d", czas--) if (czas>=0) set_task(1.0,"wyswietl", 1337) } public Koniec_Rundy() { czas = 30 if (task_exists(1337)) remove_task(1337) }
Powinno działać.
#5
Posted 26.09.2009 10:34
show_hudmessage(0, "%d", czas)
daj
show_hudmessage(0, "%i", czas)
#6
Posted 26.09.2009 11:05
#7
Posted 26.09.2009 11:22
Wdarła się mała literówka(nazwa funkcji w task'u)
#include <amxmodx>
new czas = 30
public plugin_init()
{
register_plugin("New Plug-In", "1.0", "AMXX")
register_event("HLTV", "Nowa_Runda", "a", "1=0", "2=0")
register_logevent("Koniec_Rundy", 2, "1=Round_End")
}
public Nowa_Runda()
{
set_hudmessage(0, 255, 0, -1.0, -1.0, 0, 0.0, 1.0, 0.5, 0.5, 4)
show_hudmessage(0, "%d", czas--)
if (czas>=0)
set_task(1.0,"Nowa_Runda", 1337)
}
public Koniec_Rundy()
{
czas = 30
if (task_exists(1337))
remove_task(1337)
}
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users