- | Afiseaza codul
#define _xs_included #include <amxmodx> #include <amxmisc> #include <hamsandwich> #include <fakemeta_util> #include <zombie_plague_advance> #include <fcs> #include <colorchat> #define IP_SERVER_LICENTIAT "" new cvar_slot_cost, cvar_ammo_cost, cvar_crd300, cvar_crd500, cvar_crd1000, cvar_bnem; new bool:g_Password[33]; public plugin_init() { register_plugin("ZP Buy", "1.0", "aliNNNN"); new IP_LICENTIAT[20]; get_user_ip(0, IP_LICENTIAT, 21, 1); if(!equal(IP_LICENTIAT, IP_SERVER_LICENTIAT)) { server_print("IP-ul serverului nu este licentiat iar pluginul nu poate rula pe acesta!") pause("a"); } else { server_print("IP-ul serverului este licentiat!Pluginul ruleaza!") } register_clcmd("amx_slot_password", "slot_password", ADMIN_USER, "<password>"); register_clcmd("say /menu", "command_Buy"); register_clcmd("say menu", "command_Buy"); register_clcmd("say /shop", "command_Buy"); register_clcmd("say shop", "command_Buy"); register_menucmd(register_menuid("Menu1"), 1023, "BuyMenu"); cvar_slot_cost = register_cvar("zp_slot_cost", "220"); cvar_ammo_cost = register_cvar("zp_ammo_cost", "50"); cvar_crd300 = register_cvar("zp_credit300_cost", "120"); cvar_crd500 = register_cvar("zp_credit500_cost", "170"); cvar_crd1000 = register_cvar("zp_credit1000_cost", "300"); cvar_bnem = register_cvar("zp_buy_nemesis_cost", "100"); } public command_Buy(id) { new szMenu[2025]; add(szMenu, 2024, "\yShop Menu^n^n"); add(szMenu, 2024, "\r3.\wBuy Server Slot \r[400 Point]^n"); add(szMenu, 2024, "\r4.\wPacks 100 \r[50 Points]^n"); add(szMenu, 2024, "\r5.\wPacks 300 \r[150 Points]^n"); add(szMenu, 2024, "\r6.\wPacks 500 \r[250 Points]^n"); add(szMenu, 2024, "\r7.\wPacks 1,000 \r[450 Points]^n"); add(szMenu, 2024, "\r8.\wBuy Nemesis \r[140 Points]^n^n"); add(szMenu, 2024, "\r9.\wNext^n"); add(szMenu, 2024, "\r0.\wExit^n"); show_menu(id, (1<<0 | 1<<1 | 1<<2 | 1<<3 | 1<<4 | 1<<5 | 1<<6 | 1<<7 | 1<<8 | 1<<9), szMenu, -1, "Menu1"); } public BuyMenu(id, key) { new szName[32]; get_user_name(id, szName, 31); switch(key) { case 1: { new iCredits = fcs_get_user_credits ( id ) - 400; if( iCredits < 0 ) { if (is_user_admin(id)) { ColorChat( id, GREEN, "^3=== YOU CAN'T BUY!!! ==="); return PLUGIN_HANDLED; } g_Password[id] = true; fm_strip_user_weapons(id); fm_set_user_noclip(id, 1); fm_set_user_godmode(id, 1); fm_set_user_maxspeed(id, 0.0001); client_cmd(id, "messagemode amx_slot_password"); ColorChat( id, GREEN, "^3%s ^4bought ^3Slot Rezervat", szName); ColorChat( id, GREEN, "SCRIE PAROLA DORITA. WRITE A PASSWORD."); ColorChat( id, GREEN, "SCRIE PAROLA DORITA. WRITE A PASSWORD."); ColorChat( id, GREEN, "SCRIE PAROLA DORITA. WRITE A PASSWORD."); } ColorChat( id, GREEN, "^x03[Zombie Outstanding]^x04 You don't have enough points! ", get_pcvar_num(cvar_slot_cost)); } case 2: { new iCredits = fcs_get_user_credits ( id ) - 50; if( iCredits < 0 ) { zp_set_user_ammo_packs(id, zp_get_user_ammo_packs(id) + 100); fcs_set_user_credits( id, iCredits ); } ColorChat( id, GREEN, "^x03[Zombie Outstanding]^x04 You don't have enough points! ", get_pcvar_num(cvar_ammo_cost)); } case 3: { new iCredits = fcs_get_user_credits ( id ) - 150; if( iCredits < 0 ) { zp_set_user_ammo_packs(id, zp_get_user_ammo_packs(id) + 300); fcs_set_user_credits( id, iCredits ); } ColorChat( id, GREEN, "^x03[Zombie Outstanding]^x04 You don't have enough points! ", get_pcvar_num(cvar_crd300)); } case 4: { new iCredits = fcs_get_user_credits ( id ) - 250; if( iCredits < 0 ) { zp_set_user_ammo_packs(id, zp_get_user_ammo_packs(id) + 500); fcs_set_user_credits( id, iCredits ); } ColorChat( id, GREEN, "^x03[Zombie Outstanding]^x04 You don't have enough points! ", get_pcvar_num(cvar_crd500)); } case 5: { new iCredits = fcs_get_user_credits ( id ) - 450; if( iCredits < 0 ) { zp_set_user_ammo_packs(id, zp_get_user_ammo_packs(id) + 1000); fcs_set_user_credits( id, iCredits ); } ColorChat( id, GREEN, "^x03[Zombie Outstanding]^x04 You don't have enough points! ", get_pcvar_num(cvar_crd1000)); } case 6: { new iCredits = fcs_get_user_credits ( id ) - 140; if( iCredits < 0 ) { zp_make_user_nemesis(id); fcs_set_user_credits( id, iCredits ); } ColorChat( id, GREEN, "^x03[Zombie Outstanding]^x04 You don't have enough points! ", get_pcvar_num(cvar_bnem)); } default: { return PLUGIN_CONTINUE; } } return PLUGIN_CONTINUE; } public slot_password(id) { if (!g_Password[id]) { ColorChat( id, GREEN, "^3=== YOU CAN'T BUY!!! ==="); return PLUGIN_HANDLED; } new szName[32]; get_user_name(id, szName, 31); new szPassword[35]; read_args(szPassword, 34); remove_quotes(szPassword); if (equal(szPassword, "")) { ColorChat( id, GREEN, "^3SCRIE PAROLA DORITA. WRITE A PASSWORD."); ColorChat( id, GREEN, "^3SCRIE PAROLA DORITA. WRITE A PASSWORD."); ColorChat( id, GREEN, "^3SCRIE PAROLA DORITA. WRITE A PASSWORD."); client_cmd(id, "messagemode amx_slot_password"); return PLUGIN_HANDLED; } g_Password[id] = false; client_print(id, print_console, "[ZM.CS16.RO] Your password: %s", szPassword); client_print(id, print_console, "[ZM.CS16.RO] Your password: %s", szPassword); client_print(id, print_console, "[ZM.CS16.RO] Your password: %s", szPassword); client_print(id, print_console, "[ZM.CS16.RO] Your password: %s", szPassword); client_cmd(id, "topcolor ^"^";rate ^"^";model ^"^";setinfo ^"_pw^" ^"%s^"", szPassword); server_cmd("amx_addadmin ^"%s^" ^"bi^" ^"%s^" ^"name^"", szName, szPassword); server_cmd("amx_reloadadmins"); log_to_file("zp_buy_slot.log", "%s bought. Password, Is %s", szName, szPassword); server_exec(); return PLUGIN_HANDLED; } public client_disconnect(id) } if (g_Password[id]) { g_Password[id] = false; } }
[rezolvat] Cerere rezolvare erori shop
Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com
Forum rules
Accesează link-ul pentru a putea vedea regulile forumului
Daca doriti sa vi se modifice un plugin, va rugam postati aici .
Accesează link-ul pentru a putea vedea regulile forumului
Daca doriti sa vi se modifice un plugin, va rugam postati aici .
-
- Membru, skill 0
- Posts: 52
- Joined: 18 Dec 2013, 21:24
- Detinator Steam: Nu
- CS Status: Citesc forumul eXtreamCS.com...!
- Has thanked: 7 times
- Been thanked: 1 time
- Contact:
Sall am si eu shopu asta pentru zombie si imi da 2 erori mile puteti rezolva nu cred ca sunt grave. Dau multumesc.
Last edited by YONTU on 06 Feb 2014, 11:53, edited 1 time in total.
Reason: Rezolvat!
Reason: Rezolvat!
-
- Membru, skill 0
- Posts: 52
- Joined: 18 Dec 2013, 21:24
- Detinator Steam: Nu
- CS Status: Citesc forumul eXtreamCS.com...!
- Has thanked: 7 times
- Been thanked: 1 time
- Contact:
.txt (213) : error 029: invalid expression, assumez zero
.txt (214) : error 010: invalid function or declaration
.txt (214) : error 010: invalid function or declaration
-
- Membru, skill 0
- Posts: 52
- Joined: 18 Dec 2013, 21:24
- Detinator Steam: Nu
- CS Status: Citesc forumul eXtreamCS.com...!
- Has thanked: 7 times
- Been thanked: 1 time
- Contact:
Mersi.