(Yardım) ~ Takıma Özel Silah Menüsü ~

Konu

#1
Bu eklentiyi sadece T takımının kullanabilmesi şeklinde düzenler misiniz?
.sma menu.sma (Dosya Boyutu: 1,69 KB | İndirme Sayısı: 2)
#2
denermisin?
Kod:
#include <amxmodx>
#include <reapi>

public plugin_init()
{
    register_plugin("My Menu", "1.0", "Me");
    register_clcmd("say /menu", "ShowMenu", _, "");
    register_clcmd("menu", "ShowMenu", _, "");
}

public ShowMenu(id)
{
    if(get_member(id,m_iTeam) != TEAM_TERRORIST) client_print_color(id,id,"^4[%s] - ^1Bu menuyu sadece T takımı kullanabilir.");
    else {
    new menu = menu_create("Altin Silahlar:", "MohammadHlwani");

    menu_additem(menu, "GoldenM4 \y(15000$)", "", 0); // case 0
    menu_additem(menu, "GoldenAWP \y(15000$)", "", 0); // case 1
    menu_additem(menu, "GoldenDeagle \y(16000$)", "", 0); // case 2
    menu_additem(menu, "RareKnife \y(5000$)", "", 0); // case 3
    menu_additem(menu, "GoldenXM1014 \y(16000$)", "", 0); // case 4
    menu_additem(menu, "GoldenAK47 \y(15000$)", "", 0); // case 5
    menu_additem(menu, "Get 16000$ \w[\rAdmin\w]", "", 0); // case 6

    menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
    menu_setprop(menu, MPROP_PERPAGE, 6);

    menu_display(id, menu, 0);}

    return PLUGIN_HANDLED;
}

public MohammadHlwani(id, menu, item)
{
    if(item == MENU_EXIT)
    {
        menu_cancel(id);
        return PLUGIN_HANDLED;
    }

    new command[6], name[64], access, callback;

    menu_item_getinfo(menu, item, access, command, sizeof command - 1, name, sizeof name - 1, callback);

    switch(item)
    {
        case 0: client_cmd(id, "goldenm4");
        case 1: client_cmd(id, "goldenawp");
        case 2: client_cmd(id, "goldende");
        case 3: client_cmd(id, "rarekn");
        case 4: client_cmd(id, "goldenxm");
        case 5: client_cmd(id, "say /revmenu");
        case 6: client_cmd(id, "say /m");
    }

    menu_display(id, menu, 0)

    return PLUGIN_HANDLED;
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ ansicpg1252\\ deff0{\\ fonttbl{\\ f0\\ fnil\\ fcharset0 Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang10241\\ f0\\ fs16 \n\\ par }
*/

reCs:Go Rank Menu (%50)
#3
(21-09-2020, 16:53)bilalgecer47 Adlı Kullanıcıdan Alıntı: denermisin?
Kod:
#include <amxmodx>
#include <reapi>

public plugin_init()
{
    register_plugin("My Menu", "1.0", "Me");
    register_clcmd("say /menu", "ShowMenu", _, "");
    register_clcmd("menu", "ShowMenu", _, "");
}

public ShowMenu(id)
{
    if(get_member(id,m_iTeam) != TEAM_TERRORIST) client_print_color(id,id,"^4[%s] - ^1Bu menuyu sadece T takımı kullanabilir.");
    else {
    new menu = menu_create("Altin Silahlar:", "MohammadHlwani");

    menu_additem(menu, "GoldenM4 \y(15000$)", "", 0); // case 0
    menu_additem(menu, "GoldenAWP \y(15000$)", "", 0); // case 1
    menu_additem(menu, "GoldenDeagle \y(16000$)", "", 0); // case 2
    menu_additem(menu, "RareKnife \y(5000$)", "", 0); // case 3
    menu_additem(menu, "GoldenXM1014 \y(16000$)", "", 0); // case 4
    menu_additem(menu, "GoldenAK47 \y(15000$)", "", 0); // case 5
    menu_additem(menu, "Get 16000$ \w[\rAdmin\w]", "", 0); // case 6

    menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
    menu_setprop(menu, MPROP_PERPAGE, 6);

    menu_display(id, menu, 0);}

    return PLUGIN_HANDLED;
}

public MohammadHlwani(id, menu, item)
{
    if(item == MENU_EXIT)
    {
        menu_cancel(id);
        return PLUGIN_HANDLED;
    }

    new command[6], name[64], access, callback;

    menu_item_getinfo(menu, item, access, command, sizeof command - 1, name, sizeof name - 1, callback);

    switch(item)
    {
        case 0: client_cmd(id, "goldenm4");
        case 1: client_cmd(id, "goldenawp");
        case 2: client_cmd(id, "goldende");
        case 3: client_cmd(id, "rarekn");
        case 4: client_cmd(id, "goldenxm");
        case 5: client_cmd(id, "say /revmenu");
        case 6: client_cmd(id, "say /m");
    }

    menu_display(id, menu, 0)

    return PLUGIN_HANDLED;
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ ansicpg1252\\ deff0{\\ fonttbl{\\ f0\\ fnil\\ fcharset0 Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang10241\\ f0\\ fs16 \n\\ par }
*/

Son Düzenleme: 21-09-2020, 17:04, Düzenleyen: knaoz1903.
#4
(21-09-2020, 16:53)bilalgecer47 Adlı Kullanıcıdan Alıntı: denermisin?
Kod:
#include <amxmodx>
#include <reapi>

public plugin_init()
{
    register_plugin("My Menu", "1.0", "Me");
    register_clcmd("say /menu", "ShowMenu", _, "");
    register_clcmd("menu", "ShowMenu", _, "");
}

public ShowMenu(id)
{
    if(get_member(id,m_iTeam) != TEAM_TERRORIST) client_print_color(id,id,"^4[%s] - ^1Bu menuyu sadece T takımı kullanabilir.");
    else {
    new menu = menu_create("Altin Silahlar:", "MohammadHlwani");

    menu_additem(menu, "GoldenM4 \y(15000$)", "", 0); // case 0
    menu_additem(menu, "GoldenAWP \y(15000$)", "", 0); // case 1
    menu_additem(menu, "GoldenDeagle \y(16000$)", "", 0); // case 2
    menu_additem(menu, "RareKnife \y(5000$)", "", 0); // case 3
    menu_additem(menu, "GoldenXM1014 \y(16000$)", "", 0); // case 4
    menu_additem(menu, "GoldenAK47 \y(15000$)", "", 0); // case 5
    menu_additem(menu, "Get 16000$ \w[\rAdmin\w]", "", 0); // case 6

    menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
    menu_setprop(menu, MPROP_PERPAGE, 6);

    menu_display(id, menu, 0);}

    return PLUGIN_HANDLED;
}

public MohammadHlwani(id, menu, item)
{
    if(item == MENU_EXIT)
    {
        menu_cancel(id);
        return PLUGIN_HANDLED;
    }

    new command[6], name[64], access, callback;

    menu_item_getinfo(menu, item, access, command, sizeof command - 1, name, sizeof name - 1, callback);

    switch(item)
    {
        case 0: client_cmd(id, "goldenm4");
        case 1: client_cmd(id, "goldenawp");
        case 2: client_cmd(id, "goldende");
        case 3: client_cmd(id, "rarekn");
        case 4: client_cmd(id, "goldenxm");
        case 5: client_cmd(id, "say /revmenu");
        case 6: client_cmd(id, "say /m");
    }

    menu_display(id, menu, 0)

    return PLUGIN_HANDLED;
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ ansicpg1252\\ deff0{\\ fonttbl{\\ f0\\ fnil\\ fcharset0 Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang10241\\ f0\\ fs16 \n\\ par }
*/


hata vericektir.
#5
(21-09-2020, 17:03)Possidentis Adlı Kullanıcıdan Alıntı:
(21-09-2020, 16:53)bilalgecer47 Adlı Kullanıcıdan Alıntı: denermisin?
Kod:
#include <amxmodx>
#include <reapi>

public plugin_init()
{
    register_plugin("My Menu", "1.0", "Me");
    register_clcmd("say /menu", "ShowMenu", _, "");
    register_clcmd("menu", "ShowMenu", _, "");
}

public ShowMenu(id)
{
    if(get_member(id,m_iTeam) != TEAM_TERRORIST) client_print_color(id,id,"^4[%s] - ^1Bu menuyu sadece T takımı kullanabilir.");
    else {
    new menu = menu_create("Altin Silahlar:", "MohammadHlwani");

    menu_additem(menu, "GoldenM4 \y(15000$)", "", 0); // case 0
    menu_additem(menu, "GoldenAWP \y(15000$)", "", 0); // case 1
    menu_additem(menu, "GoldenDeagle \y(16000$)", "", 0); // case 2
    menu_additem(menu, "RareKnife \y(5000$)", "", 0); // case 3
    menu_additem(menu, "GoldenXM1014 \y(16000$)", "", 0); // case 4
    menu_additem(menu, "GoldenAK47 \y(15000$)", "", 0); // case 5
    menu_additem(menu, "Get 16000$ \w[\rAdmin\w]", "", 0); // case 6

    menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
    menu_setprop(menu, MPROP_PERPAGE, 6);

    menu_display(id, menu, 0);}

    return PLUGIN_HANDLED;
}

public MohammadHlwani(id, menu, item)
{
    if(item == MENU_EXIT)
    {
        menu_cancel(id);
        return PLUGIN_HANDLED;
    }

    new command[6], name[64], access, callback;

    menu_item_getinfo(menu, item, access, command, sizeof command - 1, name, sizeof name - 1, callback);

    switch(item)
    {
        case 0: client_cmd(id, "goldenm4");
        case 1: client_cmd(id, "goldenawp");
        case 2: client_cmd(id, "goldende");
        case 3: client_cmd(id, "rarekn");
        case 4: client_cmd(id, "goldenxm");
        case 5: client_cmd(id, "say /revmenu");
        case 6: client_cmd(id, "say /m");
    }

    menu_display(id, menu, 0)

    return PLUGIN_HANDLED;
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ ansicpg1252\\ deff0{\\ fonttbl{\\ f0\\ fnil\\ fcharset0 Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang10241\\ f0\\ fs16 \n\\ par }
*/


hata vericektir.

Evet, menü çalışmadı.
#6
Kod:
#include <amxmodx>

#define TAG "REKLAM"

public plugin_init()
{
    register_plugin("My Menu", "1.0", "Me");
    register_clcmd("say /menu", "ShowMenu", _, "");
    register_clcmd("menu", "ShowMenu", _, "");
}

public ShowMenu(id)
{
    if(get_user_team(id) == 1 && is_user_alive(id)){
    new menu = menu_create("Altin Silahlar:", "MohammadHlwani");

    menu_additem(menu, "GoldenM4 \y(15000$)", "", 0); // case 0
    menu_additem(menu, "GoldenAWP \y(15000$)", "", 0); // case 1
    menu_additem(menu, "GoldenDeagle \y(16000$)", "", 0); // case 2
    menu_additem(menu, "RareKnife \y(5000$)", "", 0); // case 3
    menu_additem(menu, "GoldenXM1014 \y(16000$)", "", 0); // case 4
    menu_additem(menu, "GoldenAK47 \y(15000$)", "", 0); // case 5
    menu_additem(menu, "Get 16000$ \w[\rAdmin\w]", "", 0); // case 6

    menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
    menu_setprop(menu, MPROP_PERPAGE, 6);

    menu_display(id, menu, 0);
}
    else{
       client_print_color(id,id,"^4[%s] - ^1Bu menuyu sadece T takımı kullanabilir.",TAG )
    }
    return PLUGIN_HANDLED;
}

public MohammadHlwani(id, menu, item)
{
    if(item == MENU_EXIT)
    {
        menu_cancel(id);
        return PLUGIN_HANDLED;
    }

    new command[6], name[64], access, callback;

    menu_item_getinfo(menu, item, access, command, sizeof command - 1, name, sizeof name - 1, callback);

    switch(item)
    {
        case 0: client_cmd(id, "goldenm4");
        case 1: client_cmd(id, "goldenawp");
        case 2: client_cmd(id, "goldende");
        case 3: client_cmd(id, "rarekn");
        case 4: client_cmd(id, "goldenxm");
        case 5: client_cmd(id, "say /revmenu");
        case 6: client_cmd(id, "say /m");
    }

    menu_display(id, menu, 0)

    return PLUGIN_HANDLED;
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ fbidis\\ ansi\\ ansicpg1252\\ deff0{\\ fonttbl{\\ f0\\ fnil\\ fcharset0 Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ ltrpar\\ lang10241\\ f0\\ fs16 \n\\ par }
*/

denermisin?

tag kismindaki server ismini yaz.
#7
(21-09-2020, 17:06)Possidentis Adlı Kullanıcıdan Alıntı:
Kod:
#include <amxmodx>

#define TAG "REKLAM"

public plugin_init()
{
    register_plugin("My Menu", "1.0", "Me");
    register_clcmd("say /menu", "ShowMenu", _, "");
    register_clcmd("menu", "ShowMenu", _, "");
}

public ShowMenu(id)
{
    if(get_user_team(id) == 1 && is_user_alive(id)){
    new menu = menu_create("Altin Silahlar:", "MohammadHlwani");

    menu_additem(menu, "GoldenM4 \y(15000$)", "", 0); // case 0
    menu_additem(menu, "GoldenAWP \y(15000$)", "", 0); // case 1
    menu_additem(menu, "GoldenDeagle \y(16000$)", "", 0); // case 2
    menu_additem(menu, "RareKnife \y(5000$)", "", 0); // case 3
    menu_additem(menu, "GoldenXM1014 \y(16000$)", "", 0); // case 4
    menu_additem(menu, "GoldenAK47 \y(15000$)", "", 0); // case 5
    menu_additem(menu, "Get 16000$ \w[\rAdmin\w]", "", 0); // case 6

    menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
    menu_setprop(menu, MPROP_PERPAGE, 6);

    menu_display(id, menu, 0);
}
    else{
       client_print_color(id,id,"^4[%s] - ^1Bu menuyu sadece T takımı kullanabilir.",TAG )
    }
    return PLUGIN_HANDLED;
}

public MohammadHlwani(id, menu, item)
{
    if(item == MENU_EXIT)
    {
        menu_cancel(id);
        return PLUGIN_HANDLED;
    }

    new command[6], name[64], access, callback;

    menu_item_getinfo(menu, item, access, command, sizeof command - 1, name, sizeof name - 1, callback);

    switch(item)
    {
        case 0: client_cmd(id, "goldenm4");
        case 1: client_cmd(id, "goldenawp");
        case 2: client_cmd(id, "goldende");
        case 3: client_cmd(id, "rarekn");
        case 4: client_cmd(id, "goldenxm");
        case 5: client_cmd(id, "say /revmenu");
        case 6: client_cmd(id, "say /m");
    }

    menu_display(id, menu, 0)

    return PLUGIN_HANDLED;
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ fbidis\\ ansi\\ ansicpg1252\\ deff0{\\ fonttbl{\\ f0\\ fnil\\ fcharset0 Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ ltrpar\\ lang10241\\ f0\\ fs16 \n\\ par }
*/

denermisin?

tag kismindaki server ismini yaz.

Eklenti tamamdır usta, teşekkür ediyorum : ))
#8
(21-09-2020, 17:05)cArm0y Adlı Kullanıcıdan Alıntı:
(21-09-2020, 17:03)Possidentis Adlı Kullanıcıdan Alıntı:
(21-09-2020, 16:53)bilalgecer47 Adlı Kullanıcıdan Alıntı: denermisin?
Kod:
#include <amxmodx>
#include <reapi>

public plugin_init()
{
    register_plugin("My Menu", "1.0", "Me");
    register_clcmd("say /menu", "ShowMenu", _, "");
    register_clcmd("menu", "ShowMenu", _, "");
}

public ShowMenu(id)
{
    if(get_member(id,m_iTeam) != TEAM_TERRORIST) client_print_color(id,id,"^4[%s] - ^1Bu menuyu sadece T takımı kullanabilir.");
    else {
    new menu = menu_create("Altin Silahlar:", "MohammadHlwani");

    menu_additem(menu, "GoldenM4 \y(15000$)", "", 0); // case 0
    menu_additem(menu, "GoldenAWP \y(15000$)", "", 0); // case 1
    menu_additem(menu, "GoldenDeagle \y(16000$)", "", 0); // case 2
    menu_additem(menu, "RareKnife \y(5000$)", "", 0); // case 3
    menu_additem(menu, "GoldenXM1014 \y(16000$)", "", 0); // case 4
    menu_additem(menu, "GoldenAK47 \y(15000$)", "", 0); // case 5
    menu_additem(menu, "Get 16000$ \w[\rAdmin\w]", "", 0); // case 6

    menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
    menu_setprop(menu, MPROP_PERPAGE, 6);

    menu_display(id, menu, 0);}

    return PLUGIN_HANDLED;
}

public MohammadHlwani(id, menu, item)
{
    if(item == MENU_EXIT)
    {
        menu_cancel(id);
        return PLUGIN_HANDLED;
    }

    new command[6], name[64], access, callback;

    menu_item_getinfo(menu, item, access, command, sizeof command - 1, name, sizeof name - 1, callback);

    switch(item)
    {
        case 0: client_cmd(id, "goldenm4");
        case 1: client_cmd(id, "goldenawp");
        case 2: client_cmd(id, "goldende");
        case 3: client_cmd(id, "rarekn");
        case 4: client_cmd(id, "goldenxm");
        case 5: client_cmd(id, "say /revmenu");
        case 6: client_cmd(id, "say /m");
    }

    menu_display(id, menu, 0)

    return PLUGIN_HANDLED;
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ ansicpg1252\\ deff0{\\ fonttbl{\\ f0\\ fnil\\ fcharset0 Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang10241\\ f0\\ fs16 \n\\ par }
*/


hata vericektir.

Evet, menü çalışmadı.

(21-09-2020, 17:08)cArm0y Adlı Kullanıcıdan Alıntı:
(21-09-2020, 17:06)Possidentis Adlı Kullanıcıdan Alıntı:
Kod:
#include <amxmodx>

#define TAG "REKLAM"

public plugin_init()
{
    register_plugin("My Menu", "1.0", "Me");
    register_clcmd("say /menu", "ShowMenu", _, "");
    register_clcmd("menu", "ShowMenu", _, "");
}

public ShowMenu(id)
{
    if(get_user_team(id) == 1 && is_user_alive(id)){
    new menu = menu_create("Altin Silahlar:", "MohammadHlwani");

    menu_additem(menu, "GoldenM4 \y(15000$)", "", 0); // case 0
    menu_additem(menu, "GoldenAWP \y(15000$)", "", 0); // case 1
    menu_additem(menu, "GoldenDeagle \y(16000$)", "", 0); // case 2
    menu_additem(menu, "RareKnife \y(5000$)", "", 0); // case 3
    menu_additem(menu, "GoldenXM1014 \y(16000$)", "", 0); // case 4
    menu_additem(menu, "GoldenAK47 \y(15000$)", "", 0); // case 5
    menu_additem(menu, "Get 16000$ \w[\rAdmin\w]", "", 0); // case 6

    menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
    menu_setprop(menu, MPROP_PERPAGE, 6);

    menu_display(id, menu, 0);
}
    else{
       client_print_color(id,id,"^4[%s] - ^1Bu menuyu sadece T takımı kullanabilir.",TAG )
    }
    return PLUGIN_HANDLED;
}

public MohammadHlwani(id, menu, item)
{
    if(item == MENU_EXIT)
    {
        menu_cancel(id);
        return PLUGIN_HANDLED;
    }

    new command[6], name[64], access, callback;

    menu_item_getinfo(menu, item, access, command, sizeof command - 1, name, sizeof name - 1, callback);

    switch(item)
    {
        case 0: client_cmd(id, "goldenm4");
        case 1: client_cmd(id, "goldenawp");
        case 2: client_cmd(id, "goldende");
        case 3: client_cmd(id, "rarekn");
        case 4: client_cmd(id, "goldenxm");
        case 5: client_cmd(id, "say /revmenu");
        case 6: client_cmd(id, "say /m");
    }

    menu_display(id, menu, 0)

    return PLUGIN_HANDLED;
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ fbidis\\ ansi\\ ansicpg1252\\ deff0{\\ fonttbl{\\ f0\\ fnil\\ fcharset0 Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ ltrpar\\ lang10241\\ f0\\ fs16 \n\\ par }
*/

denermisin?

tag kismindaki server ismini yaz.

Eklenti tamamdır usta, teşekkür ediyorum : ))

Rica Ederim Gülümse

@By.KinG
Son Düzenleme: 21-09-2020, 17:09, Düzenleyen: Possidentis.
#9
benim yatıgım hata ney yeniyimde bu konularda
reCs:Go Rank Menu (%50)
#10
(21-09-2020, 17:11)bilalgecer47 Adlı Kullanıcıdan Alıntı: benim yatıgım hata ney yeniyimde bu konularda

client print icin else kismi yanlis. ve if(get_user_team(id) = 1){ kısmında { eksik. else normalde benım koydugum yerde olması lazım. keske amxmodx de compile edip atsaydın

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

Yorum yapmak için üye olmanız gerekiyor

ya da

Benzer Konular

Task
Kayıt Ol