#include #include #include #include #include #define PLUGIN "Sureli LR" #define VERSION "3.0" #define AUTHOR "By Deh$eT" #define TEMP_MSG 16 #define TEMP_MSG2 1936 new tag[] = "Selected" new const muzik[] = "SDLR.wav" new cvar_durbunluler,cvar_deagle,cvar_usp,cvar_aug,cvar_ak47,cvar_m4a1,cvar_mp5,cvar_effect,sureli,zaman,efekt,oto_lr,lr_music,kalancan; new duelzaman,g_maxPlayers, g_msgSayText, beacon_sprite,g_msgsync,bunny,ct[33],te[33],g_hud; new bool:touch_weapons[33], bool:once[33], bool:player_challenged[33], bool:duel_active, bool:ak47_duel[33] ,bool:g_muzik,bool:deagle_duel[33], bool:usp_duel[33], bool:mp5navy_duel[33], bool:m4a1_duel[33], bool:aug_duel[33], bool:scout_duel[33],bool:awp_duel[33],fwPreThink; new Float: iAngles[ 33 ][ 3 ] new bool: g_saniye new g_gerisayim const TASK_ID = 1603 public plugin_precache() { beacon_sprite = precache_model("sprites/shockwave.spr") precache_sound(muzik) precache_sound("weapons/headshot2.wav"); } public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_clcmd("say /lr", "duel_menu") register_clcmd("say !lr", "duel_menu") register_clcmd("say .lr", "duel_menu") register_clcmd("say /vs", "duel_menu") register_clcmd("say !vs", "duel_menu") register_clcmd("say .vs", "duel_menu") register_event("HLTV", "event_round_start", "a", "1=0", "2=0") register_event("DeathMsg","hook_death","a"); register_message(get_user_msgid("AmmoX"), "Message_AmmoX") // DEAGLE SHOT FIX register_forward(FM_CmdStart,"fw_cmdstart",1) RegisterHam(Ham_Touch, "weaponbox", "fw_touch_weapon") RegisterHam(Ham_Touch, "armoury_entity", "fw_touch_weapon") RegisterHam(Ham_Touch, "weapon_shield", "fw_touch_weapon") RegisterHam(Ham_Spawn, "player", "fw_player_respawn", 1) RegisterHam(Ham_Killed, "player", "fw_player_killed") g_maxPlayers = get_maxplayers() g_msgSayText = get_user_msgid("SayText") g_msgsync = CreateHudSyncObj(); g_hud = CreateHudSyncObj(); /*============================================================ Cvar Ayarlari ============================================================*/ cvar_effect = register_cvar("jb_effect", "0") //[0: Sadece Glow | 1: Sadece Sinyal | 2: Her ?kisi] bunny = register_cvar("lr_bunny","1") // Lr Baslay?nca Bunny Kapanmasi [0: Kapali | 1: Acik] sureli = register_cvar("lr_sureli","1") // S?reli Lr [[0: Kapali Lr | 1: Acik] efekt = register_cvar("lr_kill_effects","1") // Lr'de Olum Efekti [0: Kapali | 1: Acik] oto_lr = register_cvar("lr_auto","1") // Sona Kalan Mahkuma Oto Lr Yazd?rma [0: Kapali | 1: Acik] lr_music = register_cvar("lr_music","1") // Lr Baslayinca M?zik [0: Kapali | 1: Acik] kalancan = register_cvar("lr_kalancan","1") // Lr'de Oynucular?n Kalan Canini g?sterir [0: Kapali | 1: Acik] (Hudmessage) zaman = register_cvar("lr_zaman","60") // Lr Suresi (Sure bitince Mahkum ?l?r.) cvar_durbunluler = register_cvar("lr_snipers","1") // Sniper LR [0:Kapali | 1:A?ik] cvar_deagle = register_cvar("lr_deagle","1") // Deagle LR [0:Kapali | 1:A?ik] cvar_usp = register_cvar("lr_usp","1") // Usp LR [0:Kapali | 1:A?ik] cvar_aug = register_cvar("lr_aug","1") // Aug LR [0:Kapali | 1:A?ik] cvar_ak47 = register_cvar("lr_ak47","1") // Ak47 LR [0:Kapali | 1:A?ik] cvar_m4a1 = register_cvar("lr_m4a1","1") // M4a1 LR [0:Kapali | 1:A?ik] cvar_mp5 = register_cvar("lr_mp5","1") // Mp5 LR [0:Kapali | 1:A?ik] } public event_round_start() { server_cmd("bh_enabled 1") duel_active = false remove_task(TASK_ID); g_saniye = false } public fw_player_respawn(id) { if(!is_user_alive(id) || !cs_get_user_team(id)) return set_user_rendering(id) remove_task(id) remove_task(TASK_ID) touch_weapons[id] = false once[id] = false ak47_duel[id] = false usp_duel[id] = false mp5navy_duel[id] = false deagle_duel[id] = false m4a1_duel[id] = false aug_duel[id] = false scout_duel[id] = false awp_duel[id] = false player_challenged[id] = false } public fw_touch_weapon(weapon, id) { if (!is_user_connected(id)) return HAM_IGNORED; new players[32], pnum, tempid; get_players(players, pnum, "a"); for( new i; i= 1) { static opcion[64] formatex(opcion, charsmax(opcion),"\d| \rSelected Gaming \d| \w~ \ySilahini Sec") new iMenu = menu_create(opcion, "sub_duel_menu") if(get_pcvar_num(cvar_durbunluler)) { formatex(opcion, charsmax(opcion),"\d|\rSD\d| \w~ \yDURBUNLULER") menu_additem(iMenu, opcion, "1") } if(get_pcvar_num(cvar_deagle)) { formatex(opcion, charsmax(opcion),"\d|\rSD\d| \w~ \yDEAGLE") menu_additem(iMenu, opcion, "2") } if(get_pcvar_num(cvar_usp)) { formatex(opcion, charsmax(opcion),"\d|\rSD\d| \w~ \yUSP ") menu_additem(iMenu, opcion, "3") } if(get_pcvar_num(cvar_aug)) { formatex(opcion, charsmax(opcion),"\d|\rSD\d| \w~ \yAUG") menu_additem(iMenu, opcion, "4") } if(get_pcvar_num(cvar_ak47)) { formatex(opcion, charsmax(opcion),"\d|\rSD\d| \w~ \yAK47") menu_additem(iMenu, opcion, "5") } if(get_pcvar_num(cvar_m4a1)) { formatex(opcion, charsmax(opcion),"\d|\rSD\d| \w~ \yM4A1") menu_additem(iMenu, opcion, "6") } if(get_pcvar_num(cvar_mp5)) { formatex(opcion, charsmax(opcion),"\d|\rSD\d| \w~ \yMP5") menu_additem(iMenu, opcion, "7") } menu_setprop(iMenu, MPROP_EXIT, MEXIT_ALL) menu_display(id, iMenu, 0) } else if (tsnum == 1 && ctsnum < 1) { renkli_yazi(id,"!g%s: !nMalesef Yasayan Gardiyan Yok!",tag) } else if (tsnum > 1) { renkli_yazi(id,"!g%s: !nSadece Sona Kalan Mahkum Duello Yapabilir!",tag) } } else { renkli_yazi(id,"!g%s: !nBu Komut Sadece Mahkumlar icindir.",tag) } } else { // } return PLUGIN_HANDLED } public sub_duel_menu(id, menu, item) { if (item == MENU_EXIT) { menu_destroy(menu) return PLUGIN_HANDLED } new Data[6], Name[64] new Access, Callback menu_item_getinfo(menu, item, Access, Data,5, Name, 63, Callback) new Key = str_to_num(Data) switch (Key) { case 1: { if(is_user_alive(id)) { Scoutt_Duello(id) } } case 2: { if(is_user_alive(id)) { deagle_duel[id] = true usp_duel[id] = false aug_duel[id] = false ak47_duel[id] = false m4a1_duel[id] = false mp5navy_duel[id] = false awp_duel[id] = false scout_duel[id] = false choose_enemy(id) } } case 3: { if(is_user_alive(id)) { deagle_duel[id] = false aug_duel[id] = false ak47_duel[id] = false m4a1_duel[id] = false mp5navy_duel[id] = false usp_duel[id] = true awp_duel[id] = false scout_duel[id] = false choose_enemy(id) } } case 4: { if(is_user_alive(id)) { aug_duel[id] = true deagle_duel[id] = false usp_duel[id] = false ak47_duel[id] = false m4a1_duel[id] = false mp5navy_duel[id] = false awp_duel[id] = false scout_duel[id] = false choose_enemy(id) } } case 5: { if(is_user_alive(id)) { ak47_duel[id] = true deagle_duel[id] = false usp_duel[id] = false aug_duel[id] = false m4a1_duel[id] = false mp5navy_duel[id] = false awp_duel[id] = false scout_duel[id] = false choose_enemy(id) } } case 6: { if(is_user_alive(id)) { m4a1_duel[id] = true deagle_duel[id] = false usp_duel[id] = false aug_duel[id] = false ak47_duel[id] = false mp5navy_duel[id] = false awp_duel[id] = false scout_duel[id] = false choose_enemy(id) } } case 7: { if(is_user_alive(id)) { mp5navy_duel[id] = true deagle_duel[id] = false usp_duel[id] = false aug_duel[id] = false scout_duel[id] = false ak47_duel[id] = false m4a1_duel[id] = false awp_duel[id] = false choose_enemy(id) } } } menu_destroy(menu) return PLUGIN_HANDLED } public Scoutt_Duello(id) { static Item[64] formatex(Item, charsmax(Item),"\d| \rSelected Gaming \d| \w~ \yDURBUNLULER") new Menu = menu_create(Item, "scout_devam") formatex(Item, charsmax(Item),"\d|\rSD\d| \w~ \yAWP") menu_additem(Menu, Item, "1") formatex(Item, charsmax(Item),"\d|\rSD\d| \w~ \ySCOUT") menu_additem(Menu, Item, "2") menu_setprop(Menu, MPROP_EXIT, MEXIT_ALL) menu_display(id, Menu) return PLUGIN_HANDLED } public scout_devam(id,amenu,item) { if(item == MENU_EXIT) { menu_destroy(amenu) return PLUGIN_HANDLED } new acces, callback, data[6], iname[64] menu_item_getinfo(amenu, item, acces, data, 5, iname, 63,callback) if(str_to_num(data) == 1 && is_user_alive(id)) { awp_duel[id] = true deagle_duel[id] = false usp_duel[id] = false aug_duel[id] = false ak47_duel[id] = false m4a1_duel[id] = false scout_duel[id] = false mp5navy_duel[id] = false choose_enemy(id) } else if(str_to_num(data) == 2 && is_user_alive(id)) { scout_duel[id] = true awp_duel[id] = false deagle_duel[id] = false usp_duel[id] = false aug_duel[id] = false ak47_duel[id] = false m4a1_duel[id] = false mp5navy_duel[id] = false choose_enemy(id) } menu_destroy(amenu) return PLUGIN_HANDLED } public choose_enemy(id) { static opcion[64] formatex(opcion, charsmax(opcion),"\d| \rSelected\d| \w~ \yRakibini Sec") new iMenu = menu_create(opcion, "sub_choose_enemy") new players[32], pnum, tempid new szName[32], szTempid[10] get_players(players, pnum, "a") for( new i; i 0 && get_user_health(dehset) > 0 && g_saniye) { set_hudmessage(100, 100 , 100, -1.0, 0.2 , 2, 0.02, 1.0, 0.01, 0.1, 35) ShowSyncHudMsg(0,g_hud,"| %d |",g_gerisayim) g_gerisayim-- } if(get_user_health(by) > 0 && get_user_health(dehset) > 0 && !g_saniye) { set_hudmessage(100, 100 , 100, -1.0, 0.2 , 2, 0.02, 1.0, 0.01, 0.1, 35) ShowSyncHudMsg(0,g_hud,"^nCT: %s - %d | TE: %s - %d",name,get_user_health(by),isim,get_user_health(dehset)) } set_task(1.0, "checkhealth", id) } public FuncCountDown(id) { if(!duelzaman) { new players[32],inum; get_players(players,inum) for(new i;i