CSFWEED Posted October 20, 2019 Share Posted October 20, 2019 #Denumire plugin: Utility Menu #Autor: @CSFWEED #Informatii: Initial l-am folosit la propriul mod Zombie CSO pe care l-am abandonat , si tocmai ce am gasit o parte din mod , mai exact un meniu in pc. #Link download: #include <amxmodx> #include <amxmisc> #include <cstrike> new bool: has_opened[33]; public plugin_init() { register_clcmd("utilitymenu", "player"); } public handled(id) { if ( cs_get_user_team(id) == CS_TEAM_UNASSIGNED ) return PLUGIN_CONTINUE player(id) return PLUGIN_HANDLED } public player( id ) { new Name [ 32 ]; get_user_name ( id, Name, charsmax ( Name ) ); new Title [ 256 ]; formatex ( Title, charsmax ( Title ), "\r>> \yUtility Menu^n\r>> \wMode: \yZombie CSO", Name ); new menu = menu_create ( Title, "menu_handler" ); menu_additem( menu, "\r[\y\r] \wV.I.P Menu", "1", 0 ); menu_additem( menu, "\r[\y\r] \wCSO Costumes", "2", 0 ); menu_setprop( menu, MPROP_EXITNAME, "\yEXIT"); menu_display( id, menu, 0 ); } public menu_handler( id, menu, item ) { if(item == MENU_EXIT) { menu_destroy(menu); return PLUGIN_HANDLED; } switch( item ) { case 0: { client_cmd(id, "vm"); } case 1: { client_cmd(id, "costumes"); } } menu_destroy( menu ); return PLUGIN_HANDLED; } public schimba(id, menu, item) { if(item == MENU_EXIT) { menu_destroy(menu); return PLUGIN_HANDLED; } new data [6], szName [64]; new access, callback; menu_item_getinfo (menu, item, access, data,charsmax (data), szName,charsmax (szName), callback); new key = str_to_num (data); new name[32] get_user_name(id, name, 31); switch (key) { case 1: { if ( cs_get_user_team(id) == CS_TEAM_T ) { chat_color(id, "!g[Zombie CSO] !yYou're already !teamT!y, noob!") return PLUGIN_HANDLED; } cs_set_user_team(id,CS_TEAM_T); user_silentkill(id); return PLUGIN_CONTINUE; } case 2: { if ( cs_get_user_team(id) == CS_TEAM_CT ) { chat_color(id, "!g[Zombie CSO] !yYou're already !teamCT!y, noob!") return PLUGIN_HANDLED; } cs_set_user_team(id,CS_TEAM_CT); user_silentkill(id); return PLUGIN_CONTINUE; } } menu_destroy(menu); return PLUGIN_HANDLED; } stock chat_color(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, "!y", "^1") replace_all(msg, 190, "!team", "^3") 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(); } } } } /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE *{\\ rtf1\\ ansi\\ ansicpg1252\\ deff0\\ deflang1033{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ f0\\ fs16 \n\\ par } */ Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.