// 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!");
}
}
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 10")
server_cmd("sv_gravity 800")
server_cmd("sv_restart 8000")
server_cmd("sv_restart 800")
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
}
Powinno działać