Eklenti bu fakat /deagle yazınca acılmakta aiz onu ayarlarsınız taglar kısmınıda degiştirin
Eklentiyi indir
Eklenti açık kaynak kodu;
Eklentiyi indir
Eklenti açık kaynak kodu;
PHP Kod:
#include <amxmodx>
#include <reapi>
new const IP_IDsOnlTag[] = "ServerUzunTag";
new const IP_IDsOnlyTag[] = "KisaTag";
//Deagle Menu
new deaglemenu[][][]={
{"Deagle1","models/ixbir/deagle1.mdl"},
{"Deagle2","models/ixbir/deagle2.mdl"},
{"Deagle3","models/ixbir/deagle3.mdl"},
{"Deagle4","models/ixbir/deagle4.mdl"}
};
new IPDeagleGorunum[MAX_CLIENTS+1];
public plugin_init() {
register_plugin("DeagleMenu", "1.0", "QuryWesT");
register_clcmd("say /deagle", "deaglesmenu");
RegisterHookChain(RG_CBasePlayerWeapon_DefaultDeploy, "CBasePlayerWeapon_DefaultDeploy_Pre", .post = false);
}
public deaglesmenu(const IP_IDs){
new menu = menu_create(fmt("\r%s \w- \rDeagle Skin Menu", IP_IDsOnlTag), "deaglesmenu_devam");
for(new i = 0; i < sizeof(deaglemenu); i++) {
menu_additem(menu, fmt("\r%s \w| \y%s", IP_IDsOnlyTag, deaglemenu[i][0]), fmt("%d", i));
}
menu_setprop(menu, MPROP_EXITNAME, fmt("\r%s \w| \yCikis", IP_IDsOnlyTag));
menu_display(IP_IDs, menu);
}
public deaglesmenu_devam(const IP_IDs, const menu, const item) {
if(item == MENU_EXIT) {
menu_destroy(menu);
return PLUGIN_HANDLED;
}
new data[6];menu_item_getinfo(menu,item,_,data,charsmax(data));
new key = str_to_num(data);
IPDeagleGorunum[IP_IDs] = key;
rg_remove_item(IP_IDs,"weapon_deagle"),rg_give_item(IP_IDs,"weapon_deagle");
menu_destroy(menu); return PLUGIN_HANDLED;
}
public CBasePlayerWeapon_DefaultDeploy_Pre(const pEntity, szViewModel[], szWeaponModel[], iAnim, szAnimExt[], skiplocal) {
if(get_member(pEntity, m_iId) != WEAPON_DEAGLE) {
return;
}
new pPlayer = get_member(pEntity, m_pPlayer);
SetHookChainArg(2, ATYPE_STRING, deaglemenu[IPDeagleGorunum[pPlayer]][1]);
}