Skrócenie czasu rozgrzewki
Najlepsza odpowiedź gecube1 25.07.2014 13:42
gecube1
24.07.2014
Witam
Chodzi mi o skrócenie czasu rozgrzewki do 50 sekund.
Dziękuje.
Załączone pliki
Wielkie Jol
24.07.2014
Znaczy, że niezależnie od tego, czy runda się skończyła, czy nie, ma rozgrzewka trwać 50 sekund, zgadza się?
Wielkie Jol
25.07.2014
Sprawdź jak to dzioło
// Nozowka w pierwszej rundzie. #include <amxmodx> #include <amxmisc> #include <colorchat> #define PLUGIN "Nozowka (1 runda)" #define VERSION "0.2" #define AUTHOR "Harsay" new bool:rr = true new bool:noze = false new bool:gamec = false public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_event("TextMsg","rozgrzewka","a","2&#Game_C") register_event("SendAudio", "tt" , "a", "2&%!MRAD_terwin" ); register_event("SendAudio", "ct" , "a", "2&%!MRAD_ctwin" ); register_event("CurWeapon","switchweapon","be","1=1","2!29") } public rozgrzewka() { if(rr==true) { gamec = true noze = true ColorChat(0, GREEN, "^x04[Nozowka]^x01 Runda nozowa!"); set_task(50.0, "sprawdz"); } } public tt() { if(rr==true) { if(gamec==true) { noze = false rr = false ColorChat(0, GREEN, "^x04[Nozowka]^x01 Terrorysci wygrali runde nozowa!"); set_task(2.0, "p_res", 0) } } } public ct() { if(rr==true) { if(gamec==true) { noze = false rr = false ColorChat(0, GREEN, "^x04[Nozowka]^x01 Anty-terrorysci wygrali runde nozowa!"); set_task(2.0, "p_res", 0) } } } public p_res() { if (!rr) { server_cmd("sv_restart 1") ColorChat(0, GREEN, "^x04[Nozowka]^x01 #1 Restart"); set_task(1.0, "d_res", 0) } } public d_res() { if (!rr) { server_cmd("sv_restart 1") ColorChat(0, GREEN, "^x04[Nozowka]^x01 #2 Restart"); set_task(1.0, "t_res", 0) } } public t_res() { if (!rr) { ColorChat(0, GREEN, "^x04[Nozowka]^x01 #3 Restart"); server_cmd("sv_restart 1") set_task(1.0, "gamelive", 0) } } public gamelive() { if (!rr) { ColorChat(0, GREEN, "^x04[Nozowka]^x01 ***GAME LIVE***"); } } public switchweapon(id) { if (!noze) return PLUGIN_CONTINUE engclient_cmd(id,"weapon_knife") return PLUGIN_CONTINUE } public sprawdz(){ rr = false; set_task(0.01, "p_res"); }
gecube1
25.07.2014
Niestety plugin nie działa prawidłowo, mianowicie po rozgrzewce następuje druga rozgrzewka na kosy i tak wkółko.
Wielkie Jol
25.07.2014
Zapomniałem dodać warunku
// Nozowka w pierwszej rundzie. #include <amxmodx> #include <amxmisc> #include <colorchat> #define PLUGIN "Nozowka (1 runda)" #define VERSION "0.2" #define AUTHOR "Harsay" new bool:rr = true new bool:noze = false new bool:gamec = false public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_event("TextMsg","rozgrzewka","a","2&#Game_C") register_event("SendAudio", "tt" , "a", "2&%!MRAD_terwin" ); register_event("SendAudio", "ct" , "a", "2&%!MRAD_ctwin" ); register_event("CurWeapon","switchweapon","be","1=1","2!29") } public rozgrzewka() { if(rr==true) { gamec = true noze = true ColorChat(0, GREEN, "^x04[Nozowka]^x01 Runda nozowa!"); set_task(50.0, "sprawdz"); } } public tt() { if(rr==true) { if(gamec==true) { noze = false rr = false ColorChat(0, GREEN, "^x04[Nozowka]^x01 Terrorysci wygrali runde nozowa!"); set_task(2.0, "p_res", 0) } } } public ct() { if(rr==true) { if(gamec==true) { noze = false rr = false ColorChat(0, GREEN, "^x04[Nozowka]^x01 Anty-terrorysci wygrali runde nozowa!"); set_task(2.0, "p_res", 0) } } } public p_res() { if (!rr) { server_cmd("sv_restart 1") ColorChat(0, GREEN, "^x04[Nozowka]^x01 #1 Restart"); set_task(1.0, "d_res", 0) } } public d_res() { if (!rr) { server_cmd("sv_restart 1") ColorChat(0, GREEN, "^x04[Nozowka]^x01 #2 Restart"); set_task(1.0, "t_res", 0) } } public t_res() { if (!rr) { ColorChat(0, GREEN, "^x04[Nozowka]^x01 #3 Restart"); server_cmd("sv_restart 1") set_task(1.0, "gamelive", 0) } } public gamelive() { if (!rr) { ColorChat(0, GREEN, "^x04[Nozowka]^x01 ***GAME LIVE***"); } } public switchweapon(id) { if (!noze) return PLUGIN_CONTINUE engclient_cmd(id,"weapon_knife") return PLUGIN_CONTINUE } public sprawdz(){ if(rr){ rr = false; noze = false set_tk(0.01, "p_res"); } }
gecube1
25.07.2014
Nie mogę tego skompilować.
Wyskakuje taki błąd
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright © 1997-2006 ITB CompuPhase, AMX Mod X Team
harsay_nozowka.sma(99) : error 017: undefined symbol "set_tk"
1 Error.
Could not locate output file harsay_nozowka.amxx (compile failed).
Wielkie Jol
25.07.2014
Zamień:
set_tk
na
set_task
nie wiem czemu, się wykasowały dwie literki.