#include < amxmodx >
#include < cstrike >
new acAltMenuTag[32],acUstMenuTag[32];
public plugin_init(){
register_plugin("Naber","v1.0","Aconyonn");
register_clcmd("say /kostummenu","aeKostumMenu");
new acMenuTag = register_cvar("ac_MenuTag","\w[\rwD\w]");
get_pcvar_string(acMenuTag,acAltMenuTag,charsmax(acAltMenuTag));
new acUstTag = register_cvar("ac_UstMenuTag","WEBDiyo");
get_pcvar_string(acUstTag,acUstMenuTag,charsmax(acUstMenuTag));
}
public plugin_precache(){
precache_model("models/player/model1/model1.mdl");
precache_model("models/player/model2/model2.mdl");
precache_model("models/player/model3/model3.mdl");
precache_model("models/player/model4/model4.mdl");
precache_model("models/player/model5/model5.mdl");
precache_model("models/player/model6/model6.mdl");
precache_model("models/player/model7/model7.mdl");
}
public aeKostumMenu(acID){
new acMenu = acMenuOlustur("Kostum Seciniz","aeKostumMenu_devam");
acMenuSecenekEkle(acMenu,"ModelIsmi1","1");
acMenuSecenekEkle(acMenu,"ModelIsmi2","2");
acMenuSecenekEkle(acMenu,"ModelIsmi3","3");
acMenuSecenekEkle(acMenu,"ModelIsmi4","4");
acMenuSecenekEkle(acMenu,"ModelIsmi5","5");
acMenuSecenekEkle(acMenu,"ModelIsmi6","6");
acMenuSecenekEkle(acMenu,"ModelIsmi7","7");
acMenuBitir(acID,acMenu);
}
public aeKostumMenu_devam(acID,acMenu,acMEsya){
if(acMEsya == MENU_EXIT){ menu_destroy(acMenu); return PLUGIN_HANDLED; }
new acMVeri[6],acBos;
menu_item_getinfo(acMenu,acMEsya,acBos,acMVeri,5,_,_,acBos);
new acKey = str_to_num(acMVeri);
switch(acKey){
case 1 : { cs_set_user_model(acID,"model1"); }
case 2 : { cs_set_user_model(acID, "model2"); }
case 3 : { cs_set_user_model(acID, "model3"); }
case 4 : { cs_set_user_model(acID, "model4"); }
case 5 : { cs_set_user_model(acID, "model5"); }
case 6 : { cs_set_user_model(acID, "model6"); }
case 7 : { cs_set_user_model(acID, "model7"); }
}
menu_destroy(acMenu);
return PLUGIN_HANDLED;
}
stock acMenuOlustur(const acBaslik[],const acDevam[], any:...){
new acYeniBaslik[256],acDuzeltBaslik[256];
vformat(acDuzeltBaslik,charsmax(acDuzeltBaslik),acBaslik,3);
formatex(acYeniBaslik,charsmax(acYeniBaslik),"\r( \w%s \r~\w> \yKostum Menu \r) \y>> \r( \w%s \r)",acUstMenuTag,acDuzeltBaslik);
new acMenu = menu_create(acYeniBaslik,acDevam);
return acMenu;
}
stock acMenuSecenekEkle(acMenuID,const acSecenekBaslik[],const acBilgi[],acTag = 1, any:...){
new acYeniSecenekBaslik[256],acSecenekDuzelt[256];
vformat(acSecenekDuzelt,charsmax(acSecenekDuzelt),acSecenekBaslik,5);
if(acTag == 1){
formatex(acYeniSecenekBaslik,charsmax(acYeniSecenekBaslik),"%s \w~\r> \w%s",acAltMenuTag,acSecenekDuzelt);
} else {
formatex(acYeniSecenekBaslik,charsmax(acYeniSecenekBaslik),"%s",acSecenekDuzelt);
}
menu_additem(acMenuID,acYeniSecenekBaslik,acBilgi);
}
stock acMenuBitir(acID,acMenuID,acSecenek = 1,acCikis = 1,acSayfa = 0){
menu_setprop(acMenuID,MPROP_EXITNAME,"\rCikis");
menu_setprop(acMenuID,MPROP_PERPAGE, acSecenek ? 7:0 );
menu_setprop(acMenuID,MPROP_EXIT,acCikis ? MEXIT_ALL:MEXIT_NEVER);
menu_display(acID,acMenuID,acSayfa);
}
#if AMXX_VERSION_NUM < 183
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", "^x01"); // Default Renk(Sarı)
replace_all(msg, 190, "!n", "^x04"); // Yeşil Renk
replace_all(msg, 190, "!t", "^x03"); // Takım Renk( CT mavi , T kırmızı )
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, get_user_msgid("SayText"), _, players[i]);
write_byte(players[i]),write_string(msg),message_end();
}
}
}
}
#else
stock renkli_yazi(const id, const input[], any:...){
static msg[191];
vformat(msg, 190, input, 3);
replace_all(msg, 190, "!g", "^x01");
replace_all(msg, 190, "!n", "^x04");
replace_all(msg, 190, "!t", "^x03");
client_print_color(id, id, msg);
}
#endif