Grade: Trainee thiagoott | Date: Tuesday, 28 April 15, 11:06 AM | Message # 1 |
Trainee
Clan: Member
Experience: 4
Status: Offline
| Good Morning, first thank you for the help provided case possible, I would like to request to add code, so that this list of models, get access ADMIN_KICK and only team CTS.
Sorry Bad English. Thanks Code #include <amxmodx> #include <amxmisc> #include <cstrike> #include <colorchat>
#define PLUGIN "Admin Model Menu" #define VERSION "1.0" #define AUTHOR "Dimision"
public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_clcmd("say /model", "admin") }
public plugin_precache() { precache_model("models/player/terror/terror.mdl") precache_model("models/player/gsg9/gsg9.mdl") precache_model("models/player/vip/vip.mdl") precache_model("models/player/admin1/admin1.mdl") precache_model("models/player/admin2/admin2.mdl") precache_model("models/player/admin3/admin3.mdl") }
public admin(id) { if (get_user_flags(id) & ADMIN_KICK) { model_menu(id) } else { ColorChat(id, GREEN, "**Error-Menu Tylko Dla Admina**") }
} public model_menu(id) { new menu = menu_create("\rAdmin Model Menu", "menu_wybierz") menu_additem(menu, "\wModel \yTT", "1", 0) menu_additem(menu, "\wModel \yCT", "2", 0) menu_additem(menu, "\wModel \yVipa", "3", 0) menu_additem(menu, "\wModel \yDodatkowy1", "4", 0) menu_additem(menu, "\wModel \yDodatkowy2", "5", 0) menu_additem(menu, "\wModel \yDodatkowy3", "6", 0)
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL) menu_display(id, menu, 0) }
public menu_wybierz(id, menu, item) { if (item == MENU_EXIT) { menu_destroy(menu) return PLUGIN_HANDLED } new data[6], iName[64] new acces, callback menu_item_getinfo(menu, item, acces, data,5, iName, 63, callback) new key = str_to_num(data) switch(key) { case 1 : cs_set_user_model(id, "terror") case 2 : cs_set_user_model(id, "gsg9") case 3 : cs_set_user_model(id, "vip") case 4 : cs_set_user_model(id, "admin1") case 5 : cs_set_user_model(id, "admin2") case 6 : cs_set_user_model(id, "admin3") } menu_destroy(menu) return PLUGIN_HANDLED }
|
|
| |
Grade: Commander DavidJr | Date: Tuesday, 28 April 15, 12:02 PM | Message # 2 |
Commander
Clan: Executive
Experience: 2256
Status: Offline
| thiagoott, you want to make it available for admin in CT team? If so, you can add this before get_user_flags.
Code new CsTeams:gTeam = cs_get_user_team(id)
if (gTeam != CS_TEAM_T) return;
posted via BlackBerry
Personal Site | CSF Website
|
|
| |
Grade: Trainee thiagoott | Date: Wednesday, 29 April 15, 8:33 PM | Message # 3 |
Trainee
Clan: Member
Experience: 4
Status: Offline
| Thanks david Works! Added (29 April 15, 8:20 PM) --------------------------------------------- Hi need another david help, I wish you add a code that when I was transferred to CT or TR resets models because I'm making a list admin CTS and other admin list TR different models. Added (29 April 15, 8:33 PM) --------------------------------------------- HI need another david help, I wish you add a code that when I was transferred to CT or TR resets models because I'm making a list admin CTS and other admin list TR different models.
|
|
| |
Grade: Commander DavidJr | Date: Thursday, 30 April 15, 8:48 AM | Message # 4 |
Commander
Clan: Executive
Experience: 2256
Status: Offline
| Quote thiagoott ( ) Hi need another david help, I wish you add a code that when I was transferred to CT or TR resets models because I'm making a list admin CTS and other admin list TR different models. Just add cs_reset_model(id) after the player transferred
posted via BlackBerry
Personal Site | CSF Website
|
|
| |