RSSy MYGO.pl Opublikowano Lipiec 18, 2022 o 01:02 RSSy Udostępnij Opublikowano Lipiec 18, 2022 o 01:02 Do you have a chance to add vault to the code sequence below, so when players re-enter the models they choose, they will be selected automatically please help PHP Code: #include <amxmodx> #include <reapi> native crxranks_get_user_level(index); new const SERVERISMI[] = "TAGA"; enum _: g_info { menuName[40], modelName[40], yetki, glowKontrol, level }; new const modeller[][g_info] = { { "Seytan kuyruk \d[\rAdminlere Ozel\d]", "models/lego/devil2.mdl", ADMIN_KICK, 1, 1 }, { "Japon \d[\rLVL-12\d]", "models/xses/11.mdl", ADMIN_ALL, 0, 12 }, { "Kalkan \d[\rLVL-13\d]", "models/xses/17.mdl", ADMIN_ALL, 1, 13 }, { "BEYAZ KANAT \d[\rELITE-OZEL\d]", "models/arwel/50tl.mdl", ADMIN_IMMUNITY, 0, 1 }, { "Sinek \d[\rLVL-15\d]", "models/arwel/sinek.mdl", ADMIN_ALL, 0, 15 }, }; new g_MdlIndex[sizeof(modeller)], g_Ent[MAX_CLIENTS+1], sapka[MAX_CLIENTS+1][18]; public plugin_init() { register_plugin("Reapi Sapka", "1.0", "n.dgn"); register_clcmd("say /sapka", "sapkaMenu"); register_clcmd("say_team /sapka", "sapkaMenu"); } public sapkaMenu(id) { new ndmenu[128], num[4]; formatex(ndmenu, charsmax(ndmenu),"\w%s \d|| \ySapka Menusu \d[\r/sapka\d]\w",SERVERISMI); new Menu = menu_create(ndmenu, "sapkaMenu2"); if(g_Ent[id]) { formatex(ndmenu, charsmax(ndmenu), "\ySapkayi Kaldir \d[\r%s\d]^n\w", sapka[id]); menu_additem(Menu, ndmenu, "1"); } for(new i=0; i < sizeof(modeller); i++) { num_to_str(i+2, num, charsmax(num)); menu_additem(Menu, modeller[i][menuName], num); } menu_setprop(Menu, MPROP_EXITNAME, "\yCikis"); menu_display(id, Menu); } public sapkaMenu2(id, menu, item) { if(item == MENU_EXIT) { menu_destroy(menu); return PLUGIN_HANDLED; } new data[6], key; menu_item_getinfo(menu, item, _, data, charsmax(data)); key = str_to_num(data); switch(key) { case 1 : { sapkaKaldir(id); client_print_color(id, id, "^1[^3%s^1]^4 %s^1 modeliniz kaldirildi^3.", SERVERISMI, sapka[id]); } default : { key -= 2; if(crxranks_get_user_level(id) < modeller[key][level]) { client_print_color(id, id, "^1[^3%s^1] ^4Bu sapkayi kullanmak icin %d level olman gerek.", SERVERISMI, modeller[key][level]); return PLUGIN_HANDLED; } if( !modeller[key][yetki] || get_user_flags(id) & modeller[key][yetki] ) { sapkaKaldir(id); sapkaOlustur(id, modeller[key][modelName], key); parse(modeller[key][menuName], sapka[id], charsmax(sapka[])); client_print_color(id, id, "^1[^3%s^1]^4 %s^1 modelini taktiniz^3.", SERVERISMI, sapka[id]); if(modeller[key][glowKontrol]) { set_entvar(g_Ent[id], var_renderfx, kRenderFxGlowShell); set_entvar(g_Ent[id], var_rendercolor, Float:{250.0, 0.0, 0.0}); set_entvar(g_Ent[id], var_rendermode, kRenderNormal); set_entvar(g_Ent[id], var_renderamt, 30.0); } } else client_print_color(id, id, "^1[^3%s^1] ^4Bu sapkayi kullanamazsin.^1 Aramiza katilmak istersen ^3/dc^4 yazabilirsin.", SERVERISMI); } } sapkaMenu(id); menu_destroy(menu); return PLUGIN_HANDLED; } sapkaOlustur( id, MDL_FILE[], index = 0 ) { g_Ent[id] = rg_create_entity("info_target"); if(!is_nullent(g_Ent[id])) { set_entvar(g_Ent[id], var_model, MDL_FILE); set_entvar(g_Ent[id], var_modelindex, g_MdlIndex[index]); set_entvar(g_Ent[id], var_movetype, MOVETYPE_FOLLOW); set_entvar(g_Ent[id], var_aiment, id); } } public sapkaKaldir(id) { if(!is_nullent(g_Ent[id])) { set_entvar(g_Ent[id], var_flags, FL_KILLME); g_Ent[id] = 0; } } public client_putinserver(id) sapkaKaldir(id); public client_disconnected(id) sapkaKaldir(id); public plugin_precache() { for(new i = 0; i < sizeof(modeller); i++) g_MdlIndex[i] = precache_model(modeller[i][modelName]); } Przeczytaj cały wpis Odnośnik do komentarza Udostępnij na innych stronach Więcej opcji udostępniania...
Rekomendowane odpowiedzi