RSSy MYGO.pl Opublikowano Grudzień 23, 2019 o 16:33 RSSy Udostępnij Opublikowano Grudzień 23, 2019 o 16:33 A friend made this plugin, but we are having some problems, there are some bugs still like a check for when the player changes teams doesn't have the same skin as before because this will be put into a flag capture mode and sometimes it happens that the team changes this is code someone knows how to do If someone has some suggestions will also be welcome PHP Code: #include <amxmodx> #include <amxmisc> #include <cstrike> #define PLUGIN "admin model" #define VERSION "1.0" #define AUTHOR "LKING01" #define ADMIN_LEVEL_Q ADMIN_LEVEL_C public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_clcmd("say /model", "admin") } public plugin_precache() { precache_model("models/player/new/TR_01/TR_01.mdl") precache_model("models/player/new/CT_01/CT_01.mdl") // precache_model("") // precache_model("") // precache_model("") // precache_model("") // precache_model("") // precache_model("") } public admin(id) { if (get_user_flags(id) & ADMIN_LEVEL_H) { model_menu(id) } else { ChatColor(id, "!t[!gFlag HunTer's!t] Somente para admin!") } } public model_menu(id) { if ( !is_user_connected( id ) ) { return; } new menu = menu_create("\r[\wMENU DE PLAYER MODELS\r]\r", "player_models") switch ( get_user_team( id ) ) { case 1: { menu_additem(menu, "\wPLAYER MODEL [ADMIN]-[TR]", "1", 0) menu_additem(menu, "\wPLAYER MODEL [ADMIN]-[TR]", "2", 0) menu_additem(menu, "\wPLAYER MODEL [ADMIN]-[TR]", "3", 0) menu_additem(menu, "\wPLAYER MODEL [ADMIN]-[TR]", "4", 0) } case 2: { menu_additem(menu, "\wPLAYER MODEL [ADMIN]-[CT]", "5", 0) menu_additem(menu, "\wPLAYER MODEL [ADMIN]-[CT]", "6", 0) menu_additem(menu, "\wPLAYER MODEL [ADMIN]-[CT]", "7", 0) menu_additem(menu, "\wPLAYER MODEL [ADMIN]-[CT]", "8", 0) } default: { menu_destroy( menu ); return; } } menu_setprop(menu, MPROP_EXITNAME, "Sair") menu_display(id, menu, 0); } public player_models(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, "TR_01") case 2 : cs_set_user_model(id, "") case 3 : cs_set_user_model(id, "") case 4 : cs_set_user_model(id, "") case 5 : cs_set_user_model(id, "CT_01") case 6 : cs_set_user_model(id, "") case 7 : cs_set_user_model(id, "") case 8 : cs_set_user_model(id, "") } menu_destroy(menu) return PLUGIN_HANDLED } stock ChatColor(const id, const input[], any:...) { new count = 1, players[32]; static msg[191]; vformat(msg, 190, input, 3); replace_all(msg, 190, "!g", "^4"); replace_all(msg, 190, "!n", "^1"); replace_all(msg, 190, "!t", "^3"); replace_all(msg, 190, "!t2", "^0"); 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(); } } } } Przeczytaj cały wpis Odnośnik do komentarza Udostępnij na innych stronach Więcej opcji udostępniania...
Rekomendowane odpowiedzi