Konu

#1
Merhaba Altta Verdiğim Pluginde 

M4A1 - AK47 - DEAGLE Skini Eklermisiniz 

Kod:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fakemeta>
#include <fun>

#define KLANADI "\yWebDiyo"

/********************/
new bicagim[33]
/********************/

/********************************************/
new const bicak1[] = "models/v_knife.mdl"
new const bicak2[] = "models/v_knife.mdl"
new const bicak3[] = "models/v_knife.mdl"
new const bicak4[] = "models/v_knife.mdl"
new const bicak5[] = "models/v_knife.mdl"
/********************************************/

public plugin_precache(){
    
/**********************************************/
    precache_model(bicak1)
    precache_model(bicak2)
    precache_model(bicak3)
    precache_model(bicak4)
    precache_model(bicak5)
/**********************************************/

}
public plugin_init() {
    register_plugin
    (
    "BicakMenu",
    "1.0",
    "BugraBey43"
    )
    register_clcmd("say /bicak","anamenucuk")
    register_clcmd("say /bicakmenu","anamenucuk")
    register_clcmd("say_team /bicak","anamenucuk")
    register_clcmd("say_team /bicakmenu","anamenucuk")
    register_event("CurWeapon", "beWM", "be", "1=1")
}
public beWM(id) {
    new silahID = get_user_weapon(id)
    if(silahID == CSW_KNIFE) {
        if(bicagim[id] == 1)
            set_pev(id,pev_viewmodel2,bicak1)
        else if(bicagim[id] == 2)
            set_pev(id,pev_viewmodel2,bicak2)
        else if(bicagim[id] == 3)
            set_pev(id,pev_viewmodel2,bicak3)
        else if(bicagim[id] == 4)
            set_pev(id,pev_viewmodel2,bicak4)
        else if(bicagim[id] == 5)
            set_pev(id,pev_viewmodel2,bicak5)    
    }
}
public anamenucuk(id) {
    new menuz;
    static amenu[512]
    new isimcik[64]
    get_user_name(id,isimcik,63)
    formatex(amenu,charsmax(amenu),"%s \rBicakMenu^n\yHosGeldin \r|| \d%s",KLANADI,isimcik)
    menuz = menu_create(amenu,"anamenucuk_devam")
    
    formatex(amenu,charsmax(amenu),"\r[Shadow] \wDeadly")
    menu_additem(menuz,amenu,"1")
    formatex(amenu,charsmax(amenu),"\r[Bowie] \wFade")
    menu_additem(menuz,amenu,"2")
    formatex(amenu,charsmax(amenu),"\r[Butterfly] \wTR")
    menu_additem(menuz,amenu,"3")
    formatex(amenu,charsmax(amenu),"\r[Karambit] \wBicak")
    menu_additem(menuz,amenu,"4")
    formatex(amenu,charsmax(amenu),"\r[Bayonet] \wLore")
    menu_additem(menuz,amenu,"5")
    
    menu_setprop( menuz, MPROP_PERPAGE, 0 );
    menu_display(id, menuz, 0)
}
public anamenucuk_devam(id,menu,item){
    if(item == MENU_EXIT){
        menu_destroy(menu)
        return PLUGIN_HANDLED
    }
    new access,callback,data[6],iname[64]
    
    menu_item_getinfo(menu,item,access,data,5,iname,63,callback)
    
    new key = str_to_num(data)
    
    if(key == 1){
        bicagim[id] = 1
        beWM(id)
    }
    else if(key == 2){
        bicagim[id] = 2
        beWM(id)
    }
    else if(key == 3){
        bicagim[id] = 3
        beWM(id)
    }
    else if(key == 4){
        bicagim[id] = 4
        beWM(id)
    }
    else if(key == 5){
        bicagim[id] = 5
        beWM(id)
    }
    menu_destroy(menu)
    return PLUGIN_HANDLED;
}

#2
Bu Eklenti Kötü, Yenisini Yaptım.

Kod:
#include <amxmodx>
#include <reapi>

#define PLUGIN "Models_Menu"
#define VERSION "1.0"
#define AUTHOR "By.KinG"

new const TAG[] = "WebAilesi GaminG";
new const KISATAG[] = "WAG";

new const KNIFE_Models[][] =
{
    { "Model_Name", "v_knife.mdl" }
}

new const M4A1_Models[][] =
{
    { "Model_Name", "v_m4a1.mdl" }
}

new const AK47_Models[][] =
{
    { "Model_Name", "v_ak47.mdl" }
}

new const DEAGLE_Models[][] =
{
    { "Model_Name", "v_deagle.mdl" }
}

new const Cl_ClCmd[][] =
{
    "say /bicak",
    "say /bicakmenu",
    "say_team /bicak",
    "say_team /bicakmenu"
}

new M4A1[33], AK47[33], DEAGLE[33], KNIFE[33];

public plugin_init()
{
    register_plugin(PLUGIN, VERSION, AUTHOR);
    
    for(new i; i < sizeof(Cl_ClCmd); i++)
    {
        register_clcmd(Cl_ClCmd[i], "Main_Menu");
    }
    
    register_event("CurWeapon", "Event_Cur_Weapon", "be", "1=1");
}

public plugin_precache()
{
    for(new i; i < sizeof(KNIFE_Models); i++)
    {
        precache_model(KNIFE_Models[i][1]);
    }
    
    for(new i; i < sizeof(M4A1_Models); i++)
    {
        precache_model(M4A1_Models[i][1]);
    }
    
    for(new i; i < sizeof(AK47_Models); i++)
    {
        precache_model(AK47_Models[i][1]);
    }
    
    for(new i; i < sizeof(DEAGLE_Models); i++)
    {
        precache_model(DEAGLE_Models[i][1]);
    }
}

public Event_Cur_Weapon(id)
{
    switch(get_entvar(id, var_weapons))
    {
        case CSW_M4A1 :
        {
            set_entvar(id, var_viewmodel, M4A1_Models[M4A1[id]][1]);
        }
        case CSW_AK47 :
        {
            set_entvar(id, var_viewmodel, AK47_Models[AK47[id]][1]);
        }
        case CSW_DEAGLE :
        {
            set_entvar(id, var_viewmodel, DEAGLE_Models[DEAGLE[id]][1]);
        }
        case CSW_KNIFE :
        {
            set_entvar(id, var_viewmodel, KNIFE_Models[KNIFE[id]][1]);
        }
    }
}

public Main_Menu(id)
{
    static Item[128];
    
    formatex(Item, charsmax(Item), "\d[\r%s\d] \w| \yMain Menu", TAG);
    new Menu = menu_create(Item, "Main_Menu_Handler");
    
    formatex(Item, charsmax(Item), "\d[\r%s\d] \w| \yM4A1", KISATAG);
    menu_additem(Menu, Item, "1");
    formatex(Item, charsmax(Item), "\d[\r%s\d] \w| \yAK47", KISATAG);
    menu_additem(Menu, Item, "2");
    formatex(Item, charsmax(Item), "\d[\r%s\d] \w| \yDEAGLE", KISATAG);
    menu_additem(Menu, Item, "3");
    formatex(Item, charsmax(Item), "\d[\r%s\d] \w| \yKNIFE", KISATAG);
    menu_additem(Menu, Item, "4");
    
    menu_setprop(Menu, MPROP_BACKNAME, "\wGeri");
    menu_setprop(Menu, MPROP_NEXTNAME, "\wIleri");
    menu_setprop(Menu, MPROP_EXITNAME, "\wCikis");
    menu_display(id, Menu, 0);
}

public Main_Menu_Handler(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 :
        {
            M4A1_Menu(id);
        }
        case 2 :
        {
            AK47_Menu(id);
        }
        case 3 :
        {
            DEAGLE_Menu(id);
        }
        case 4 :
        {
            KNIFE_Menu(id);
        }
    }
    return PLUGIN_HANDLED;
}

public M4A1_Menu(id)
{
    static Item[128];
    
    formatex(Item, charsmax(Item), "\d[\r%s\d] \w| \yM4A1 Menu", TAG);
    new Menu = menu_create(Item, "M4A1_Menu_Handler");
    
    new Str[6];
    
    for(new i; i < sizeof(M4A1_Models); i++)
    {
        num_to_str(i, Str, 5);
        formatex(Item, charsmax(Item), "\d[\r%s\d] \w| \y%s", M4A1_Models[i][0]);
        menu_additem(Menu, Item, Str);
    }
    
    menu_setprop(Menu, MPROP_BACKNAME, "\wGeri");
    menu_setprop(Menu, MPROP_NEXTNAME, "\wIleri");
    menu_setprop(Menu, MPROP_EXITNAME, "\wCikis");
    menu_display(id, Menu, 0);
}

public M4A1_Menu_Handler(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);
    
    M4A1[id] = Key;
    client_print_color(id, id, "^1[^3%s^1] ^4Sectigin Model ^1: ^3%s", M4A1_Models[Key][0]);
    
    return PLUGIN_HANDLED;
}

public AK47_Menu(id)
{
    static Item[128];
    
    formatex(Item, charsmax(Item), "\d[\r%s\d] \w| \yAK47 Menu", TAG);
    new Menu = menu_create(Item, "AK47_Menu_Handler");
    
    new Str[6];
    
    for(new i; i < sizeof(AK47_Models); i++)
    {
        num_to_str(i, Str, 5);
        formatex(Item, charsmax(Item), "\d[\r%s\d] \w| \y%s", AK47_Models[i][0]);
        menu_additem(Menu, Item, Str);
    }
    
    menu_setprop(Menu, MPROP_BACKNAME, "\wGeri");
    menu_setprop(Menu, MPROP_NEXTNAME, "\wIleri");
    menu_setprop(Menu, MPROP_EXITNAME, "\wCikis");
    menu_display(id, Menu, 0);
}

public AK47_Menu_Handler(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);
    
    AK47[id] = Key;
    client_print_color(id, id, "^1[^3%s^1] ^4Sectigin Model ^1: ^3%s", AK47_Models[Key][0]);
    
    return PLUGIN_HANDLED;
}

public DEAGLE_Menu(id)
{
    static Item[128];
    
    formatex(Item, charsmax(Item), "\d[\r%s\d] \w| \yDEAGLE Menu", TAG);
    new Menu = menu_create(Item, "DEAGLE_Menu_Handler");
    
    new Str[6];
    
    for(new i; i < sizeof(DEAGLE_Models); i++)
    {
        num_to_str(i, Str, 5);
        formatex(Item, charsmax(Item), "\d[\r%s\d] \w| \y%s", DEAGLE_Models[i][0]);
        menu_additem(Menu, Item, Str);
    }
    
    menu_setprop(Menu, MPROP_BACKNAME, "\wGeri");
    menu_setprop(Menu, MPROP_NEXTNAME, "\wIleri");
    menu_setprop(Menu, MPROP_EXITNAME, "\wCikis");
    menu_display(id, Menu, 0);
}

public DEAGLE_Menu_Handler(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);
    
    DEAGLE[id] = Key;
    client_print_color(id, id, "^1[^3%s^1] ^4Sectigin Model ^1: ^3%s", DEAGLE_Models[Key][0]);
    
    return PLUGIN_HANDLED;
}

public KNIFE_Menu(id)
{
    static Item[128];
    
    formatex(Item, charsmax(Item), "\d[\r%s\d] \w| \yKNIFE Menu", TAG);
    new Menu = menu_create(Item, "KNIFE_Menu_Handler");
    
    new Str[6];
    
    for(new i; i < sizeof(KNIFE_Models); i++)
    {
        num_to_str(i, Str, 5);
        formatex(Item, charsmax(Item), "\d[\r%s\d] \w| \y%s", KNIFE_Models[i][0]);
        menu_additem(Menu, Item, Str);
    }
    
    menu_setprop(Menu, MPROP_BACKNAME, "\wGeri");
    menu_setprop(Menu, MPROP_NEXTNAME, "\wIleri");
    menu_setprop(Menu, MPROP_EXITNAME, "\wCikis");
    menu_display(id, Menu, 0);
}

public KNIFE_Menu_Handler(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);
    
    KNIFE[id] = Key;
    client_print_color(id, id, "^1[^3%s^1] ^4Sectigin Model ^1: ^3%s", KNIFE_Models[Key][0]);
    
    return PLUGIN_HANDLED;
}

#3
@By.KinG Bu Menuyu Böyle Deiştirirmsnz

Bicak
bicak
bicak
bicak
bicak
AK47
M4A1
DEAGLE
AWP
#4
1.Hepsi tek bir menüde mi olsun?
2.Madem 1 tane model olacak neden adama direk verdir miyorsunuz?
#5
Konunuz "Çözülmüş İsteklere" 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
Task
Kayıt Ol