/* Plugin generated by AMXX-Studio */ /*All Right Reserved*/ /*Made by lisek. For more information email: lis_16@op.pl*/ #include <amxmodx> #include <amxmisc> #include <fun> #include <cstrike> #define PLUGIN "New Plug-In" #define VERSION "1.0" #define AUTHOR "author" new bool:AutoRR = true new bool:heArena = false new const muzyka[]= "misc/rozgrzewka/nutka.mp3" //zmień nazwę nuty new rr_karabin new rr_restart public plugin_init() { register_plugin("rozgrzewka by lisek", "1.0", "lisek") register_event("TextMsg","restart_time","a","2&#Game_C") register_event("CurWeapon","switchweapon","be","1=1") register_event("DeathMsg","func_death","a") rr_karabin=register_cvar("rr_karabin", "0",FCVAR_ARCHIVE) //jeśli 1-deagle+ak47/m4a1 jeśli 0 samo deagle rr_restart=register_cvar("rr_restart", "60", FCVAR_ARCHIVE) //ustawiasz ile ma trawać rozgrzewka } public func_death() { if(heArena) set_task(1.0,"r_spawn", read_data(2)) } public r_spawn(id) spawn(id) public switchweapon(id) { if (!heArena) return PLUGIN_CONTINUE new ammo, clip, weapon = get_user_weapon(id, ammo, clip) new cvar=get_pcvar_num(rr_karabin) if (weapon == CSW_GLOCK18 && cvar==1) { strip_user_weapons(id) give_item(id, "weapon_knife"); give_item(id, "weapon_deagle"); give_item(id, "ammo_50ae"); give_item(id, "ammo_50ae"); give_item(id, "ammo_50ae"); give_item(id, "ammo_50ae"); give_item(id, "ammo_50ae"); give_item(id, "weapon_ak47"); give_item(id, "ammo_762nato"); give_item(id, "ammo_762nato"); give_item(id, "ammo_762nato"); give_item(id, "ammo_762nato") } else if (weapon == CSW_USP && cvar==1) { strip_user_weapons(id) give_item(id, "weapon_knife"); give_item(id, "weapon_deagle"); give_item(id, "ammo_50ae"); give_item(id, "ammo_50ae"); give_item(id, "ammo_50ae"); give_item(id, "ammo_50ae"); give_item(id, "ammo_50ae"); give_item(id, "weapon_m4a1"); give_item(id, "ammo_556nato"); give_item(id, "ammo_556nato"); give_item(id, "ammo_556nato"); give_item(id, "ammo_556nato") } else if (weapon == CSW_USP) { strip_user_weapons(id) give_item(id, "weapon_knife"); give_item(id, "weapon_deagle"); give_item(id, "ammo_50ae"); give_item(id, "ammo_50ae"); give_item(id, "ammo_50ae"); give_item(id, "ammo_50ae"); give_item(id, "ammo_50ae") } else if (weapon == CSW_GLOCK18) { strip_user_weapons(id) give_item(id, "weapon_knife"); give_item(id, "weapon_deagle"); give_item(id, "ammo_50ae"); give_item(id, "ammo_50ae"); give_item(id, "ammo_50ae"); give_item(id, "ammo_50ae"); give_item(id, "ammo_50ae") } return PLUGIN_CONTINUE } public restart_time() { if (AutoRR==true) { heArena = true pause("ac","antirusher.amxx") pause("ac","alt_end_round_sounds.amxx"); set_task(get_pcvar_float(rr_restart), "restart_map",0) client_cmd(0,"stopsound") client_cmd(0,"mp3 play sound/%s", muzyka) new czas for(czas=get_pcvar_num(rr_restart); czas>=1 ; czas--) { set_hudmessage(0, 255, 255, 0.01, 0.23, 0, 6.0, 12.0) show_hudmessage(0, "Rozgrzewka trwa!!!^nKoniec za %is",czas) } } } public restart_map() { if (AutoRR==true) { set_hudmessage(0, 255, 255, 0.01, 0.23, 0, 6.0, 12.0) show_hudmessage(0, "Koniec rozgrzewki!!! Powodzenia!") set_cvar_float("sv_restart",1.0) heArena = false unpause("ac","antirusher.amxx") unpause("ac","alt_end_round_sounds.amxx") set_task(2.0,"hudmess_show",0) client_cmd(0,"stopsound") } } public hudmess_show() { set_hudmessage(255, 0, 0, 0.11, 0.23, 0, 6.0, 12.0) show_hudmessage(0, "Koniec rozgrzewki! Zyczymy milej gry") } public plugin_precache() precache_sound(muzyka)
Użytkownik Pavulon edytował ten post 16.04.2010 23:58
dodanie tagów BBCode