Kod:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fakemeta>
#include <fun>
#define KLANADI "\r[Union CSGO]"
/********************/
new bicagim[33]
/********************/
/********************************************/
new const bicak1[] = "models/v_bayonet_user.mdl"
new const bicak2[] = "models/v_bowie_user.mdl"
new const bicak3[] = "models/v_karambit_user.mdl"
new const bicak4[] = "models/v_kelebek_user.mdl"
new const bicak5[] = "models/v_shadow_user.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 \wBicak Menusu ^nHosgeldin : %s ^n\dTSIP : 95.173.173.127^n\dCSIP : 95.173.173.127",KLANADI,isimcik)
menuz = menu_create(amenu,"anamenucuk_devam")
formatex(amenu,charsmax(amenu),"\w.:: \r[BAYONET] \w::.")
menu_additem(menuz,amenu,"1")
formatex(amenu,charsmax(amenu),"\w.:: \r[Bowie] \w::.")
menu_additem(menuz,amenu,"2")
formatex(amenu,charsmax(amenu),"\w.:: \r[Karambit] \w::.")
menu_additem(menuz,amenu,"3")
formatex(amenu,charsmax(amenu),"\w.:: \r[Kelebek] \w::.")
menu_additem(menuz,amenu,"4")
formatex(amenu,charsmax(amenu),"\w.:: \r[Shadow] \w::.")
menu_additem(menuz,amenu,"5")
menu_setprop( menuz, MPROP_PERPAGE, "Cikis" );
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)
}
else if(key == 6){
bicagim[id] = 6
beWM(id)
}
else if(key == 7){
bicagim[id] = 7
beWM(id)
}
else if(key == 8){
bicagim[id] = 8
beWM(id)
}
else if(key == 9){
bicagim[id] = 9
beWM(id)
}
menu_destroy(menu)
return PLUGIN_HANDLED;
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ ansicpg1254\\ deff0\\ deflang1055{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ f0\\ fs16 \n\\ par }
*/
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ ansicpg1254\\ deff0\\ deflang1055{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ f0\\ fs16 \n\\ par }
*/
Tamam Çözdüm