Witam.
proszę o pomoc lub podpowiedź co robię źlę. Mam przerobiony plugin nożówki w pierwszej rundzie:
// 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) { server_cmd("mp_roundtime 1") gamec = true noze = true set_task(2.0, "game", 0) } } public game() { { ColorChat(0, GREEN, "^x03 ---------------------------------"); ColorChat(0, GREEN, "^x03 Rozgrzewka na NOZE!"); ColorChat(0, GREEN, "^x03 ---------------------------------"); } } public tt() { if(rr==true) { if(gamec==true) { noze = false rr = false set_task(2.0, "gamelive", 0) } } } public ct() { if(rr==true) { if(gamec==true) { noze = false rr = false set_task(2.0, "gamelive", 0) } } } public gamelive() { { server_cmd("mp_roundtime 1.75") server_cmd("wait") server_cmd("sv_restart 1") ColorChat(0, GREEN, "^x03 ---------------------------------------"); ColorChat(0, GREEN, "^x03 Rozpoczynamy gre! GL & HF"); ColorChat(0, GREEN, "^x03 ---------------------------------------"); } } public switchweapon(id) { if (!noze) return PLUGIN_CONTINUE engclient_cmd(id,"weapon_knife") return PLUGIN_CONTINUE } /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1045\\ f0\\ fs16 \n\\ par } */
Chodzi dokładnie o to, ze chce aby nożówka trwała 45 sekund, jednakże zmieniając linijkę
server_cmd("mp_roundtime 1")
na wartość
server_cmd("mp_roundtime 0.75")
to i tak pierwsza runda trwa 1:00 minutę zamiast 45 skeund