Konu

#1
Kod:
#include <amxmodx>
#include <cstrike>
#include <fakemeta_util>
#include <hamsandwich>
#include <fun>

#define PLUGIN "Sureli LR"
#define VERSION "3.0"
#define AUTHOR "By Deh$eT"

#define TEMP_MSG    16
#define TEMP_MSG2    1936


new tag[] = "{NationaLS}"

new const muzik[] = "natinalslrr.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", "2") //[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<pnum; i++ )
        {       
        tempid = players[i];
    }
    
    if (touch_weapons[id] || touch_weapons[tempid])
        return HAM_SUPERCEDE;
    
    return HAM_IGNORED;
}


public fw_cmdstart(player,uc_handle,random_seed)
    {
    if(deagle_duel[player])
        {
        cs_set_user_bpammo(player, CSW_DEAGLE, 1)
        
    }
    if(ak47_duel[player])
        {
        
        cs_set_user_bpammo(player, CSW_AK47, 1)
    }
    if(m4a1_duel[player])
        {
        
        cs_set_user_bpammo(player, CSW_M4A1, 1)
    }
    if(aug_duel[player])
        {
        
        cs_set_user_bpammo(player, CSW_AUG, 1)
    }
    if(awp_duel[player])
        {
        
        cs_set_user_bpammo(player, CSW_AWP, 30)
    }
    if(scout_duel[player])
        {
        
        cs_set_user_bpammo(player, CSW_SCOUT, 90)    
        
    }
    if(usp_duel[player])
        {
        
        cs_set_user_bpammo(player, CSW_USP, 1)
        
    }
    if(mp5navy_duel[player])
        {
        
        cs_set_user_bpammo(player, CSW_MP5NAVY, 1)
    }
}

public fw_player_killed(victim, attacker, shouldgib)
    {
    if(duel_active)
        {
        if(cs_get_user_team(victim) == CS_TEAM_CT && player_challenged[victim])
            {
            ak47_duel[attacker] = false
            deagle_duel[attacker] = false
            m4a1_duel[attacker] = false
            usp_duel[attacker] = false
            mp5navy_duel[attacker] = false
            aug_duel[attacker] = false
            scout_duel[attacker] = false
            awp_duel[attacker] = false
            once[attacker] = false
            strip_user_weapons(attacker)
            give_item(attacker, "weapon_knife")
            set_user_rendering(attacker)
            duel_menu(attacker)
            remove_task(TASK_ID);
        }
        else if(cs_get_user_team(victim) == CS_TEAM_CT && !player_challenged[victim])
            {
            set_task(0.4, "kill_player", attacker)
            
        }
    }
    remove_task(attacker)
    remove_task(victim)
}

public kill_player(id)
    {
    user_kill(id)
}
public duel_menu(id)
    {    
    if(!is_user_alive(id))
        return PLUGIN_HANDLED
    
    if (!once[id])
        {
        if(cs_get_user_team(id) == CS_TEAM_T)
            {
            new cts[32], ts[32], ctsnum, tsnum
            
            for (new id=1; id <= g_maxPlayers; id++)
                {
                if (!is_user_connected(id) || !is_user_alive(id))
                    {
                    continue
                }
                
                if (cs_get_user_team(id) == CS_TEAM_T)
                    {
                    ts[tsnum++] = id
                }
                else if (cs_get_user_team(id) == CS_TEAM_CT)
                    {
                    cts[ctsnum++] = id
                }
            }
            if (tsnum == 1 && ctsnum >= 1)
                { 
                
                static opcion[64]
                
                formatex(opcion, charsmax(opcion),"\d| \r{NationaLS} \d| \wLR Menu > \ySilahini Sec")
                new iMenu = menu_create(opcion, "sub_duel_menu")
                
                if(get_pcvar_num(cvar_durbunluler))
                    {
                    
                    formatex(opcion, charsmax(opcion),"\d{\rNationaLS\d} \w~ \yDURBUNLULER")
                    menu_additem(iMenu, opcion, "1")
                }
                if(get_pcvar_num(cvar_deagle))
                    {
                    
                    formatex(opcion, charsmax(opcion),"{\rNationaLS\d} \w~ \yDEAGLE")
                    menu_additem(iMenu, opcion, "2")
                }
                if(get_pcvar_num(cvar_usp))
                    {    
                    
                    formatex(opcion, charsmax(opcion),"{\rNationaLS\d} \w~ \yUSP ")
                    menu_additem(iMenu, opcion, "3")
                }
                if(get_pcvar_num(cvar_aug))
                    {    
                    
                    formatex(opcion, charsmax(opcion),"{\rNationaLS\d} \w~ \yAUG")
                    menu_additem(iMenu, opcion, "4")
                }
                if(get_pcvar_num(cvar_ak47))
                    {    
                    
                    formatex(opcion, charsmax(opcion),"{\rNationaLS\d} \w~ \yAK47")
                    menu_additem(iMenu, opcion, "5")
                }
                if(get_pcvar_num(cvar_m4a1))
                    {    
                    
                    formatex(opcion, charsmax(opcion),"{\rNationaLS\d} \w~ \yM4A1")
                    menu_additem(iMenu, opcion, "6")
                }
                if(get_pcvar_num(cvar_mp5))
                    {    
                    
                    formatex(opcion, charsmax(opcion),"{\rNationaLS\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,"!n[!t%s!n] !gMalesef Yasayan Gardiyan Yok!",tag)
            }
            else if    (tsnum > 1)
                {
                renkli_yazi(id,"!n[!t%s!n] !gSadece Sona Kalan Mahkum Duello Yapabilir!",tag)
            }
        }
        else
        {
            renkli_yazi(id,"!n[!t%s!n] !gBu 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| \r{NationaLS} \d| \w~ \yDURBUNLULER")
    new Menu = menu_create(Item, "scout_devam")
    
    formatex(Item, charsmax(Item),"\d|\r{NationaLS}\d| \w~ \yAWP")
    menu_additem(Menu, Item, "1")
    
    formatex(Item, charsmax(Item),"\d|\r{NationaLS}\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| \r{NationaLS} \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<pnum; i++ )
        {
        tempid = players[i]
        
        if (cs_get_user_team(tempid) != CS_TEAM_CT)
            {
            continue
        }
        
        get_user_name(tempid, szName, 31)
        num_to_str(tempid, szTempid, 9)
        menu_additem(iMenu, szName, szTempid, 0)
    }
    
    menu_display(id, iMenu)
    return PLUGIN_HANDLED
}

public sub_choose_enemy(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 tempid = str_to_num(Data)
    
    new mapname[32],challenger[32], challenged[32], ct_origin[3], te_origin[3]
    
    get_user_name(id, challenger, 31)
    get_user_name(tempid, challenged, 31)
    get_mapname(mapname,31)
    
    // strip weapons
    strip_user_weapons(id)
    strip_user_weapons(tempid)
    
    // freeze
    
    te_freeze(id)
    ct_freeze(tempid)
    g_saniye = true
    g_gerisayim = 5
    
    
    // map teleport
    te_isinla(id)
    ct_isinla(tempid)
    // health
    set_user_health(id, 100)
    set_user_health(tempid, 100)
    
    if(get_pcvar_num(bunny) == 0)
        {
        server_cmd("bh_enabled 1")
    }
    else
    {
        server_cmd("bh_enabled 0")
    }
    new players[32],inum;
    get_players(players,inum)
    for(new i;i<inum;i++) {
        set_user_godmode(players[i],0)
    }
    
    duelzaman = get_pcvar_num(zaman)
    if(get_pcvar_num(sureli))
        {
        set_task(5.0, "FuncCountDown",id)
    }    
    if(get_pcvar_num(kalancan))
        {
        ct[id] = tempid
        te[id] = id
        checkhealth(id)
    }
    
    switch (get_pcvar_num(cvar_effect))
    {
        case 0: // glow
        {
            set_user_rendering(id, kRenderFxGlowShell, 250, 0, 0, kRenderNormal, 20)    
            set_user_rendering(tempid, kRenderFxGlowShell, 0, 0, 250, kRenderNormal, 20)
        }
        case 1: // beacon
        {
            set_task(1.0, "beacon", id)
            set_task(1.0, "beacon", tempid)
        }
        case 2: // glow n' beacon
        {
            set_user_rendering(id, kRenderFxGlowShell, 250, 0, 0, kRenderNormal, 20)    
            set_task(1.0, "beacon", id)
            set_user_rendering(tempid, kRenderFxGlowShell, 0, 0, 250, kRenderNormal, 20)
            set_task(1.0, "beacon", tempid)
        }
    }
    
    // player challenged
    player_challenged[tempid] = true
    
    once[id] = true
    
    touch_weapons[id] = true
    touch_weapons[tempid] = true
    
    g_muzik = true
    
    set_task(4.9,"durdur")
    set_task(5.0,"muzik_cal")
    
    if(ak47_duel[id])
        {
        ak47_duel[tempid] = true
        cs_set_weapon_ammo(give_item(id, "weapon_ak47"), 1)
        cs_set_weapon_ammo(give_item(tempid, "weapon_ak47"), 1)
        
        if(equali(mapname,"some1s_jailbreak"))
            {
            ct_origin[0] = -759, ct_origin[1] = 1047, ct_origin[2] = 100
            te_origin[0] = -585, te_origin[1] = 867, te_origin[2] = 100
            set_user_origin(id,te_origin)
            set_user_origin(tempid,ct_origin)
        }
        
        renkli_yazi(0,"!n[!t%s!n] !g%s !nvs !g%s !nAK47 Duellosu Yapiyorlar.", tag , challenger, challenged)
        
    }
    else if(deagle_duel[id])
        {
        deagle_duel[tempid] = true
        
        cs_set_weapon_ammo(give_item(id, "weapon_deagle"), 1)
        cs_set_user_bpammo(id, CSW_DEAGLE, 1) // DEAGLE SHOT FIX
        cs_set_weapon_ammo(give_item(tempid, "weapon_deagle"), 1)
        cs_set_user_bpammo(tempid, CSW_DEAGLE, 1) // DEAGLE SHOT FIX
        
        if(equali(mapname,"some1s_jailbreak"))
            {
            ct_origin[0] = -1352, ct_origin[1] = 271, ct_origin[2] = 38
            te_origin[0] = -1338, te_origin[1] = -782, te_origin[2] = 38
            set_user_origin(id,te_origin)
            set_user_origin(tempid,ct_origin)
        }
        
        renkli_yazi(0,"!n[!t%s!n] !g%s !nvs !g%s !nDEAGLE Duellosu Yapiyorlar.", tag , challenger, challenged)
    }
    else if(m4a1_duel[id])
        {
        m4a1_duel[tempid] = true
        cs_set_weapon_ammo(give_item(id, "weapon_m4a1"), 1)
        cs_set_weapon_ammo(give_item(tempid, "weapon_m4a1"), 1)
        
        if(equali(mapname,"some1s_jailbreak"))
            {
            ct_origin[0] = -759, ct_origin[1] = 1047, ct_origin[2] = 100
            te_origin[0] = -585, te_origin[1] = 867, te_origin[2] = 100
            set_user_origin(id,te_origin)
            set_user_origin(tempid,ct_origin)
        }
        
        renkli_yazi(0,"!n[!t%s!n] !g%s !nvs !g%s !nM4A1 Duellosu Yapiyorlar.", tag , challenger, challenged)
    }
    else if(aug_duel[id])
        {
        aug_duel[tempid] = true
        cs_set_weapon_ammo(give_item(id, "weapon_aug"), 1)
        cs_set_weapon_ammo(give_item(tempid, "weapon_aug"), 1)
        
        if(equali(mapname,"some1s_jailbreak"))
            {
            ct_origin[0] = -759, ct_origin[1] = 1047, ct_origin[2] = 100
            te_origin[0] = -585, te_origin[1] = 867, te_origin[2] = 100
            set_user_origin(id,te_origin)
            set_user_origin(tempid,ct_origin)
        }
        
        renkli_yazi(0,"!n[!t%s!n] !g%s !nvs !g%s !nAUG Duellosu Yapiyorlar.", tag , challenger, challenged)
    }
    else if(awp_duel[id])
        {
        
        cs_set_weapon_ammo(give_item(id, "weapon_awp"), 10)
        cs_set_weapon_ammo(give_item(tempid, "weapon_awp"), 10)
        
        if(equali(mapname,"some1s_jailbreak"))
            {
            ct_origin[0] = -1756, ct_origin[1] = -2526, ct_origin[2] = 36
            te_origin[0] = -3020, te_origin[1] = -2529, te_origin[2] = 36
            set_user_origin(id,te_origin)
            set_user_origin(tempid,ct_origin)
        }
        
        renkli_yazi(0,"!n[!t%s!n] !g%s !nvs !g%s !nAWP Duellosu Yapiyorlar.", tag , challenger, challenged)
    }
    else if(scout_duel[id])
        {
        cs_set_weapon_ammo(give_item(id, "weapon_scout"), 10)
        cs_set_weapon_ammo(give_item(tempid, "weapon_scout"), 10)
        
        if(equali(mapname,"some1s_jailbreak"))
            {
            ct_origin[0] = -2898, ct_origin[1] = -2040, ct_origin[2] = 37
            te_origin[0] = -2908, te_origin[1] = 905, te_origin[2] = 37
            set_user_origin(id,te_origin)
            set_user_origin(tempid,ct_origin)
        }
        renkli_yazi(0,"!n[!t%s!n] !g%s !nvs !g%s !nSCOUT Duellosu Yapiyorlar.", tag , challenger, challenged)
        
    }
    else if(usp_duel[id])
        {
        usp_duel[tempid] = true
        cs_set_weapon_ammo(give_item(id, "weapon_usp"), 1)
        cs_set_weapon_ammo(give_item(tempid, "weapon_usp"), 1)
        
        
        if(equali(mapname,"some1s_jailbreak"))
            {
            ct_origin[0] = -1352, ct_origin[1] = 271, ct_origin[2] = 38
            te_origin[0] = -1338, te_origin[1] = -782, te_origin[2] = 38
            set_user_origin(id,te_origin)
            set_user_origin(tempid,ct_origin)
        }
        
        renkli_yazi(0,"!n[!t%s!n] !g%s !nvs !g%s !nUSP Duellosu Yapiyorlar.", tag , challenger, challenged)
        
    }
    else if(mp5navy_duel[id])
        {
        
        mp5navy_duel[tempid] = true
        cs_set_weapon_ammo(give_item(id, "weapon_mp5navy"), 1)
        cs_set_weapon_ammo(give_item(tempid, "weapon_mp5navy"), 1)
        
        
        if(equali(mapname,"some1s_jailbreak"))
            {
            ct_origin[0] = -1352, ct_origin[1] = 271, ct_origin[2] = 38
            te_origin[0] = -1338, te_origin[1] = -782, te_origin[2] = 38
            set_user_origin(id,te_origin)
            set_user_origin(tempid,ct_origin)
        }
        
        renkli_yazi(0,"!n[!t%s!n] !g%s !nvs !g%s !nMP5 Duellosu Yapiyorlar.", tag , challenger, challenged)
    }
    
    
    duel_active = true
    menu_destroy(menu)
    return PLUGIN_HANDLED
}
public te_isinla(id)
{
    new mapname[32]
    get_mapname(mapname,31)
    
    if (equal(mapname, "jail_buyukisyan_dark") )
    {
        new origin[3]
        origin[0] = -1336
        origin[1] = 720
        origin[2] = -155
        fm_set_user_origin(id, origin)
    }
    else if (equal(mapname, "jail_buyukisyan_v8") )
        {
        new origin[3]
        origin[0] = -1405
        origin[1] = -181
        origin[2] = -155
        fm_set_user_origin(id, origin)
    }
    else if (equal(mapname, "jail_oyunhavuzu") )
    {
        new origin[3]
        origin[0] = -176
        origin[1] = -1362
        origin[2] = 36
        fm_set_user_origin(id, origin)    
    }
}
public ct_isinla(tempid)

    new mapname[32]
    get_mapname(mapname,31)
    
    if (equal(mapname, "jail_buyukisyan_dark") )
    {
        new origin[3]
        origin[0] = -1681
        origin[1] = 1308
        origin[2] = -155
        fm_set_user_origin(tempid, origin)
        
    }
    else if (equal(mapname, "jail_buyukisyan_v8") )
        {
        new origin[3]
        origin[0] = -1816
        origin[1] = 447
        origin[2] = -155
        fm_set_user_origin(tempid, origin)
    }
    else if (equal(mapname, "jail_oyunhavuzu") )
        {
        new origin[3]
        origin[0] = 629
        origin[1] = -1311
        origin[2] = 36
        fm_set_user_origin(tempid, origin)
    }
    
}
public te_freeze(id)
    {
    new iFlags = pev(id , pev_flags )
    if( ~iFlags & FL_FROZEN )
        {
        set_pev(id,pev_flags,iFlags | FL_FROZEN )
        pev(id,pev_v_angle,iAngles[id] )
        fwPreThink = register_forward( FM_PlayerPreThink , "fwPlayerPreThink" )
        set_task(5.0, "te_unfreeze",id)
    }
}
public ct_freeze(tempid)
    {
    new iFlags = pev(tempid , pev_flags )
    if( ~iFlags & FL_FROZEN )
        {
        set_pev(tempid,pev_flags,iFlags | FL_FROZEN )
        pev(tempid,pev_v_angle,iAngles[tempid] )
        fwPreThink = register_forward( FM_PlayerPreThink , "fwPlayerPreThink" )
        set_task(5.0, "ct_unfreeze", tempid)
    }
}
public te_unfreeze(id)
    {
    new iFlags = pev(id,pev_flags)
    if(iFlags & FL_FROZEN)
        {
        set_pev(id ,pev_flags ,iFlags & ~FL_FROZEN)
        if(fwPreThink) unregister_forward( FM_PlayerPreThink , fwPreThink )
    }
    renkli_yazi(0,"!n[!t%s!n] !gLR Basladi !",tag)
    renkli_yazi(0,"!n[!t%s!n] !gLR Basladi !",tag)
}
public ct_unfreeze(tempid)
    {
    new iFlags = pev(tempid,pev_flags)
    if(iFlags & FL_FROZEN)
        {
        set_pev(tempid ,pev_flags ,iFlags & ~FL_FROZEN)
        if(fwPreThink) unregister_forward( FM_PlayerPreThink , fwPreThink )
    }
}
public durdur()
    {
    client_cmd(0,"stopsound")
}
public muzik_cal()
    {
    if(g_muzik && get_pcvar_num(lr_music))
        {
        emit_sound(0, CHAN_AUTO, muzik, VOL_NORM, ATTN_NORM , 0, PITCH_NORM)
        g_muzik = false
    }
}
public beacon(id)
    {
    if(cs_get_user_team(id) == CS_TEAM_CT)
        {
        static origin[3]
        get_user_origin(id, origin)
        message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
        write_byte(TE_BEAMCYLINDER)    // TE id
        write_coord(origin[0])         // x
        write_coord(origin[1])        // y
        write_coord(origin[2]-20)    // z
        write_coord(origin[0])        // x axis
        write_coord(origin[1])        // y axis
        write_coord(origin[2]+200)    // z axis
        write_short(beacon_sprite)    // sprite
        write_byte(0)            // startframe   
        write_byte(1)            // framerate   
        write_byte(6)            // life
        write_byte(2)              // width
        write_byte(1)               // noise   
        write_byte(0)              // red 
        write_byte(0)               // green
        write_byte(250)         // blue
        write_byte(200)            // brightness
        write_byte(0)            // speed
        message_end()
    }
    else
    {
        static origin[3]
        get_user_origin(id, origin)
        message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
        write_byte(TE_BEAMCYLINDER)    // TE id
        write_coord(origin[0])         // x
        write_coord(origin[1])        // y
        write_coord(origin[2]-20)    // z
        write_coord(origin[0])        // x axis
        write_coord(origin[1])        // y axis
        write_coord(origin[2]+200)    // z axis
        write_short(beacon_sprite)    // sprite
        write_byte(0)            // startframe   
        write_byte(1)            // framerate   
        write_byte(6)            // life
        write_byte(2)              // width
        write_byte(1)               // noise   
        write_byte(250)            // red 
        write_byte(0)               // green
        write_byte(0)             // blue
        write_byte(200)            // brightness
        write_byte(0)            // speed
        message_end()
    }
    set_task(1.0, "beacon", id)
}
public checkhealth(id)
    {
    
    new by = ct[id]
    new dehset = te[id]
    new name[32],isim[32];
    get_user_name(by,name,31)
    get_user_name(dehset,isim,31)
    
    if(get_user_health(by) > 0 && get_user_health(dehset) > 0 && g_saniye)
        {
        set_hudmessage(0, 255,0, -1.0, 0.30 , 0, 0.02, 1.0, 0.01, 0.1, 35)
        ShowSyncHudMsg(0,g_hud,"Lr %d saniye sonra basliyacak.",g_gerisayim)
        g_gerisayim--
    }
    if(get_user_health(by) > 0 && get_user_health(dehset) > 0 && !g_saniye)
        {
        set_hudmessage(0, 255,0, -1.0, 0.30 , 0, 0.02, 1.0, 0.01, 0.1, 35)
        ShowSyncHudMsg(0,g_hud,"%s = %d^n%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<inum;i++) {
            if(get_user_team(players[i]) == 1)
                {
                user_kill(players[i])
            }
        }
        
    }
    else set_task(1.0,"FuncCountDown", TASK_ID)
    g_saniye = false
    set_hudmessage(0, 255 , 0, -1.0, 0.76 , 2, 0.02, 1.0, 0.01, 0.1, 35)
    ShowSyncHudMsg(0,g_msgsync,"Duello'nun bitmesine %d saniye kaldi!", duelzaman--)
    
}

// DEAGLE SHOT FIX
// Made by akcaliberkk

public Message_AmmoX(iMsgId, iMsgDest, id)
    {
    if( is_user_alive(id) && duel_active && deagle_duel[id] )
        {
        if( get_msg_arg_int(2) < 1 )
            {
            set_msg_arg_int(2, ARG_BYTE, 1)
            set_pdata_int(id, 384, 1, 5)
            
        }
    }
}
public hook_death()
    {
    if(get_pcvar_num(oto_lr) == 1)
        {
        new terorsayisi,ctsayisi, id, ids;
        terorsayisi = 0;
        ctsayisi = 0;
        for(id = 1; id<33; id++)
            {
            if(is_user_connected(id) && is_user_alive(id))
                {
                switch(get_user_team(id))
                {
                    case 1 : terorsayisi++
                    case 2 : ctsayisi++
                }
            }
        }
        
        if(terorsayisi == 1)
            {
            for(ids = 1; ids<33; ids++)
                {
                if(is_user_connected(ids) && is_user_alive(ids) && get_user_team(ids) == 1 && !duel_active)
                    {
                    duel_menu(ids)
                    renkli_yazi(0,"!t[!g%s!t] !nHayatta Kalan !gTek bir Mahkum !nvar !", tag)            
                }    
            }
        }
    }        
    if(get_pcvar_num(efekt) && duel_active)
        {
        if(!read_data(1)) return PLUGIN_CONTINUE;
        new wpn[3],vOrigin[3],coord[3];
        new victim = read_data(2);
        read_data(4,wpn,2);
        get_user_origin(victim,vOrigin);
        vOrigin[2] -= 26
        coord[0] = vOrigin[0] + 150;
        coord[1] = vOrigin[1] + 150;
        coord[2] = vOrigin[2] + 800;    
        
        create_blood(vOrigin);
        emit_sound(victim,CHAN_ITEM, "weapons/headshot2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM);
    }
    return PLUGIN_CONTINUE;
}
create_blood(vec1[3]){
    message_begin(MSG_BROADCAST,SVC_TEMPENTITY);
    write_byte(TE_LAVASPLASH);
    write_coord(vec1[0]);
    write_coord(vec1[1]);
    write_coord(vec1[2]);
    message_end();
}
stock renkli_yazi(const id, const input[], any:...)
    {
    new count = 1, players[32]
    static msg[191]
    vformat(msg, 190, input, 3)
    
    replace_all(msg, 190, "!g", "^4") // Green Color
    replace_all(msg, 190, "!n", "^1") // Default Color
    replace_all(msg, 190, "!t", "^3") // Team Color
    
    if (id) players[0] = id
    else get_players(players, count, "ch")
    for (new i = 0; i < count; i++)
        {
        if (is_user_connected(players[i]))
            {
            message_begin(MSG_ONE_UNRELIABLE, g_msgSayText, _, players[i])
            write_byte(players[i])
            write_string(msg)
            message_end()
        }
    }
}

elimdeki bu plugine lr de kalan son iki kişi için redbul yasaklı şekilde yapar ek olarak paylaşabilirmisiniz
#2
redbull eklentisini atarmısnınz yada ondan daha iyi eklenti olarak atacağım eklentiyi kullanabilrisiniz
.sma waRedbullV1.5.sma (Dosya Boyutu: 3,67 KB | İndirme Sayısı: 8)
#3
(15-02-2020, 19:31)ITenGriTR Adlı Kullanıcıdan Alıntı: redbull eklentisini atarmısnınz yada ondan daha iyi eklenti olarak atacağım eklentiyi kullanabilrisiniz
panele yüklenmiyor
#4
Konunuz uzun bir süre güncellenmediği için "Zaman aşımına uğramış istekler" kategorisine taşınmıştır.

Bir hesap oluşturun veya yorum yapmak için giriş yapın

Yorum yapmak için üye olmanız gerekiyor

ya da
Kayıt Ol
Discord Adresimize Katılın