Kod: Tümünü seç
#include <amxmodx>
#include <reapi>
#define ozelyetki ADMIN_LEVEL_E // Cuce ve Evoback icin gereken yetki
new const menuclcmd[][]={
"say /karakter","say /karakterler","say /karaktermenu","say /skin" // menuye giris cmdleri
}
new const tag[] = {
"[TeamTR]" // Menudeki ve chatteki taginiz
}
new const usttag[] = {
"TeamTR Community" // Menunun ust kismindaki taginiz
}
new const CTModels[][] = {
"van", //CTModels[0]
"catteam", //CTModels[1]
"big",
"evo_back"
};
new const TerrModels[][] = {
"cj", //TerrModels[0]
"matrix", //TerrModels[1]
"assasin",
"van",
"cuce"
}
public plugin_init()
{
register_plugin("Karaktermenu","0.1","bilalgecer47");
for(new i;i<sizeof(menuclcmd);i++){
register_clcmd(menuclcmd[i],"@anamenu");
}
}
public plugin_precache() {
for(new i = 0; i < sizeof(CTModels); i++) {
precache_model(fmt("models/player/%s/%s.mdl", CTModels));
}
for(new i = 0; i < sizeof(TerrModels); i++) {
precache_model(fmt("models/player/%s/%s.mdl", TerrModels));
}
}
@anamenu(id){
new menu = menu_create("\yBaslik", "@anamenu_devam");
if(get_member(id, m_iTeam) == TEAM_TERRORIST) {
for(new i = 0; i < sizeof(TerrModels); i++) {
menu_additem(menu, fmt("\y%s \rModel", TerrModels[i]), i);
}
}
else {
for(new i = 0; i < sizeof(CTModels); i++) {
menu_additem(menu, fmt("\y%s \rModel", CTModels[i]), i);
}
}
}
@anamenu_devam(const id,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);
switch(key){
case 1: {
rg_set_user_model(id,"assasin");
client_print_color(id,id,"^4%s : ^1Model basariyla aktiflestirildi.",tag);
}
case 2:{
rg_set_user_model(id,"cj");
client_print_color(id,id,"^4%s : ^1Model basariyla aktiflestirildi.",tag);
}
case 3:{
rg_set_user_model(id,"Matrix");
client_print_color(id,id,"^4%s : ^1Model basariyla aktiflestirildi.",tag);
}
case 4:{
rg_set_user_model(id,"Tommy");
client_print_color(id,id,"^4%s : ^1Model basariyla aktiflestirildi.",tag);
}
case 5:if(get_user_flags(id) & ozelyetki){
rg_set_user_model(id,"cuce");
client_print_color(id,id,"^4%s : ^1Model basariyla aktiflestirildi.",tag);
}
else{
client_print_color(id,id,"^4%s : ^1Bu Model Ucretlidir.",tag);
}
case 6: {
rg_set_user_model(id,"van");
client_print_color(id,id,"^4%s : ^1Model basariyla aktiflestirildi.",tag);
}
case 7: {
rg_set_user_model(id,"catteam");
client_print_color(id,id,"^4%s : ^1Model basariyla aktiflestirildi.",tag);
}
case 8:{
rg_set_user_model(id,"Big");
client_print_color(id,id,"^4%s : ^1Model basariyla aktiflestirildi.",tag);
}
case 9:if(get_user_flags(id) & ozelyetki){
rg_set_user_model(id,"evo_back")
client_print_color(id,id,"^4%s : ^1Model basariyla aktiflestirildi.",tag);
}
else{
client_print_color(id,id,"^4%s : ^1Bu Model Ucretlidir.",tag);
}
}
menu_destroy(menu); return PLUGIN_HANDLED;
}