RSSy MYGO.pl Opublikowano Grudzień 10, 2020 o 11:54 RSSy Udostępnij Opublikowano Grudzień 10, 2020 o 11:54 hi i want add ct flash item to this shop. (only for TR team). PHP Code: #include <amxmodx> #include <cstrike> #include <engine> #include <fun> #include <hamsandwich> #define PLUGIN " Shop" #define VERSION "1.0" #define AUTHOR "mmd" #define ADMIN_JBVIP ADMIN_LEVEL_F new const PREFIX[] = { "!g[!tShop!g]!n" }; public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_clcmd("say /shop", "Vipshop"); } public Vipshop(id) { if(!(get_user_flags(id) & ADMIN_JBVIP)) { client_printc(id, "!tYou dont Have access") return PLUGIN_HANDLED; } if( !is_user_alive( id ) ) { client_printc( id, "!gYou must be alive to Use Shop."); return PLUGIN_HANDLED; } new text[ 100 ] new iMoney = cs_get_user_money(id) formatex( text, charsmax( text ), "\rSuper Vip Shop \w| \d[\wYoure Money: \y%i \y$\d]^n\d[Coded By Heisenberg] \rPage:", iMoney ) new menu = menu_create( text, "shop_handler" ) menu_additem(menu, "\w100 Hp \d[\r1000 \y$\d]", "1", cs_get_user_money(id) >= 1000 ? 0 : 1<<31); menu_additem(menu, "\w100 Armor \d[\r1000 \y$\d]", "2", cs_get_user_money(id) >= 1000 ? 0 : 1<<31); menu_setprop(menu, MPROP_EXIT, MEXIT_ALL); menu_display(id, menu, 0); } public shop_handler(id, menu, item) { if( item == MENU_EXIT ) { menu_destroy(menu); return PLUGIN_HANDLED; } new name[33] get_user_name(id, name, 32) new data[6], iName[64]; new access, callback; menu_item_getinfo(menu, item, access, data,5, iName, 63, callback); new key = str_to_num(data); switch(key) { case 1: { cs_set_user_money(id, cs_get_user_money(id) - 1000); set_user_health(id, get_user_health(id) + 100); } case 2: { cs_set_user_money(id, cs_get_user_money(id) - 1000); set_user_armor(id, get_user_armor(id) + 100); } } menu_destroy(menu); return PLUGIN_HANDLED; } // Colour Chat stock client_printc(const id, const input[], any:...) { new count = 1, players[32]; static msg[191]; vformat(msg, 190, input, 3); replace_all(msg, 190, "!g", "^x04"); // Green Color replace_all(msg, 190, "!n", "^x01"); // Default Color replace_all(msg, 190, "!t", "^x03"); // Team Color 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(); } } } } Thanks Przeczytaj cały wpis Odnośnik do komentarza Udostępnij na innych stronach Więcej opcji udostępniania...
Rekomendowane odpowiedzi