Kod:
#include <amxmodx>
#include <reapi>
#define PLUGIN "Model Gizleme"
#define VERSION "1.0"
#define AUTHOR "Bilal Geçer"
#define tag "ThugsArmy"
new bool:gorunmezlik[33]
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("/gizle","fpsmenu")
register_clcmd("/kapat","fpsmenu")
register_clcmd("/fps","fpsmenu")
}
public fpsmenu(const id)
{
static menu[512],menuorient;
formatex(menu,charsmax(menu),"\w[\r%s\w] - \yModel Gizle MENU",tag);
menuorient=menu_create(menu,"fps_handler");
formatex(menu,charsmax(menu),"\w[\r%s\w] - \yModelleri \r%s \yyap",tag,gorunmezlik[id]?"gorunmez":"gorunur");
menu_additem(menuorient,menu,"1");
menu_setprop(menuorient,MPROP_EXITNAME,"\rCikis");
menu_setprop(menuorient,MPROP_EXIT,MEXIT_ALL);
menu_display(id,menuorient,0);
}
public fps_handler(const id, const menu, const item)
{
if(item == MENU_EXIT)
{
menu_destroy(menu);
return PLUGIN_HANDLED;
}
new data[6], name[32], access, callback;
menu_item_getinfo(menu, item, access, data, charsmax(data), name, charsmax(name), callback);
new key = str_to_num(data);
switch(key)
{
case 1:
{
degistir(id);
fpsmenu(id);
}
}
return PLUGIN_CONTINUE;
}
public degistir(id)
{
if(gorunmezlik[id]){
gorunmezlik[id]=false;
client_cmd(id,"cl_minmodels 1");
client_print_color(id,id, "^4[%s] - ^3Modelleri ^1gorunmez ^3yaptin.",tag)
}
else{
gorunmezlik[id]=true;
client_cmd(id,"cl_minmodels 0");
client_print_color(id,id, "^4[%s] - ^1Modelleri ^1gorunur^3yaptin.",tag)
}
return PLUGIN_HANDLED;
})



