Wszystko ładnie się komplikuje ale w grze w ogóle nie działa:
#include <amxmodx> #include <amxmisc> #include <colorchat> #include <hamsandwich> #include <cstrike> #include <fun> #include <fakemeta> #include <engine> #define PLUGIN "JailBreak SHOP" #define VERSION "1.4" #define AUTHOR "DAVIVAD" new name [32]; new speed[33]; new bool:weapon_id; new bool:norecoil[33] #pragma reqlib rocket_bb native rocket_give(id); #pragma reqlib lasermine_bb native lasermine_give(id); public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_clcmd("say /sklepCT", "jbshop") register_event( "CurWeapon", "Event_Change_Weapon", "be", "1=1" ); RegisterHam(Ham_Spawn, "player", "Fwd_PlayerSpawn_Post", 1) } public jbshop(id){ if(is_user_connected(id) && cs_get_user_team(id) == CS_TEAM_CT) { new menu = menu_create("\wJailbreak Shop","menu") menu_additem(menu,"\yMiekkie Kapcie \d[8000$]","1",0) menu_additem(menu,"\yButy Nike \d[16000$]","2",0) menu_additem(menu,"\yButy Skoczka \d[6000$]","3",0) menu_additem(menu,"\yNoRecoil \d[10000$]","4",0) menu_additem(menu,"\yRPG \d[16000$]","5",0) menu_additem(menu,"\yLaserMina \d[8000$]","6",0) menu_additem(menu,"\yNiesmiertelnosc na 20 sekund \d[16000$]","7",0) menu_additem(menu,"\yPortalGun \d[16000$]","8",0) menu_setprop(menu,MPROP_EXIT,MEXIT_ALL) menu_display(id,menu,0) } } public menu(id, menu, item){ if(item==MENU_EXIT) { menu_destroy(menu) return PLUGIN_HANDLED; } 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 :{ if (cs_get_user_money(id) < 8000){ get_user_name(id, name, 31) ColorChat(id, YELLOW, "%s ^x03Nie masz wystarczajaca ilosc hajsu!", name) return PLUGIN_HANDLED; } if (!is_user_alive(id)){ get_user_name(id, name, 31) ColorChat(id, YELLOW, "%s ^x03Tylko zywi moga kupowac!", name) return PLUGIN_HANDLED; } if (cs_get_user_money(id) >= 8000 ){ get_user_name(id, name, 31) set_user_footsteps( id, 1) ColorChat(0, BLUE, "Kupiono Miekkie Kapcie, dzięki ktorym nie slychac twoich krokow.", name) cs_set_user_money(id , cs_get_user_money(id) - 8000, 0) } } case 2 :{ if (cs_get_user_money(id) < 16000){ get_user_name(id, name, 31) ColorChat(id, YELLOW, "%s ^x03Nie masz wystarczajaca ilosc hajsu!", name) return PLUGIN_HANDLED; } if (!is_user_alive(id)){ get_user_name(id, name, 31) ColorChat(id, YELLOW, "%s ^x03Tylko zywi moga kupowac!", name) return PLUGIN_HANDLED; } if (cs_get_user_money(id) >= 16000 ){ get_user_name(id, name, 31) ColorChat(0, BLUE, "Kupiono Buty Nike, dzięki ktorym mozesz szybciej biegac.", name) speed[id] = 1; set_user_maxspeed(id, 500.0) cs_set_user_money(id , cs_get_user_money(id) - 16000, 0) } } case 3 : { if (cs_get_user_money(id) < 6000){ get_user_name(id, name, 31) ColorChat(id, YELLOW, "%s ^x03Nie masz wystarczajaca ilosc hajsu!", name) return PLUGIN_HANDLED; } if (!is_user_alive(id)){ get_user_name(id, name, 31) ColorChat(id, YELLOW, "%s ^x03Tylko zywi moga kupowac!", name) return PLUGIN_HANDLED; } if (cs_get_user_money(id) >= 6000 ){ get_user_name(id, name, 31) ColorChat(0, BLUE, "Kupiono Buty Skoczka, dzięki ktorym mozesz wyzej skakac.", name) set_user_gravity(id, 0.5) cs_set_user_money(id , cs_get_user_money(id) - 6000, 0) } } case 4 :{ if (cs_get_user_money(id) < 10000){ get_user_name(id, name, 31) ColorChat(id, YELLOW, "%s ^x03Nie masz wystarczajaca ilosc hajsu!", name) return PLUGIN_HANDLED; } if (!is_user_alive(id)){ get_user_name(id, name, 31) ColorChat(id, YELLOW, "%s ^x03Tylko zywi moga kupowac!", name) return PLUGIN_HANDLED; } if (cs_get_user_money(id) >= 10000 ){ get_user_name(id, name, 31) ColorChat(0, BLUE, "Kupiono No Recoil, przez to nie masz rozrzutu w broni.", name) norecoil[id] = true; cs_set_user_money(id , cs_get_user_money(id) - 10000, 0) } } case 5 :{ if (cs_get_user_money(id) < 16000){ get_user_name(id, name, 31) ColorChat(id, YELLOW, "%s ^x03Nie masz wystarczajaca ilosc hajsu!", name) return PLUGIN_HANDLED; } if (!is_user_alive(id)){ get_user_name(id, name, 31) ColorChat(id, YELLOW, "%s ^x03Tylko zywi moga kupowac!", name) return PLUGIN_HANDLED; } if (cs_get_user_money(id) >= 16000 ){ get_user_name(id, name, 31) ColorChat(0, BLUE, "Kupiono RPG, Wyrzutnie rakiet", name) rocket_give(id); cs_set_user_money(id , cs_get_user_money(id) - 16000, 0) } } case 6 :{ if (cs_get_user_money(id) < 8000){ get_user_name(id, name, 31) ColorChat(id, YELLOW, "%s ^x03Nie masz wystarczajaca ilosc hajsu!", name) return PLUGIN_HANDLED; } if (!is_user_alive(id)){ get_user_name(id, name, 31) ColorChat(id, YELLOW, "%s ^x03Tylko zywi moga kupowac!", name) return PLUGIN_HANDLED; } if (cs_get_user_money(id) >= 8000 ){ get_user_name(id, name, 31) ColorChat(0, BLUE, "Kupiono LaserMine, przez co mozesz podkladac przy dzwiach GR.", name) lasermine_give(id); cs_set_user_money(id , cs_get_user_money(id) - 16000, 0) } } case 7 :{ if (cs_get_user_money(id) < 16000){ get_user_name(id, name, 31) ColorChat(id, YELLOW, "%s ^x03Nie masz wystarczajaca ilosc hajsu!", name) return PLUGIN_HANDLED; } if (!is_user_alive(id)){ get_user_name(id, name, 31) ColorChat(id, YELLOW, "%s ^x03Tylko zywi moga kupowac!", name) return PLUGIN_HANDLED; } if (cs_get_user_money(id) >= 16000 ){ get_user_name(id, name, 31) ColorChat(0, BLUE, "Kupiono Niesmiertelnosc na 20 sekund", name) set_user_godmode(id, 1) set_task(20.0, "godoff", id) cs_set_user_money(id , cs_get_user_money(id) - 16000, 0) } } case 8 :{ if (cs_get_user_money(id) < 16000){ get_user_name(id, name, 31) ColorChat(id, YELLOW, "%s ^x03Nie masz wystarczajaca ilosc hajsu!", name) return PLUGIN_HANDLED; } if (!is_user_alive(id)){ get_user_name(id, name, 31) ColorChat(id, YELLOW, "%s ^x03Tylko zywi moga kupowac!", name) return PLUGIN_HANDLED; } if (cs_get_user_money(id) >= 16000 ){ get_user_name(id, name, 31) ColorChat(0, BLUE, "Kupiono PortalGuna, mozesz nim teleportowac sie za pomoca portali", name) client_cmd(id, "say /portal"); } } } return PLUGIN_HANDLED; } public Event_Change_Weapon(id){ if(speed[id] == 1){ set_user_maxspeed(id, 500.0) } } public Fwd_PlayerSpawn_Post(id){ if (is_user_alive(id)){ if(!speed[id]){ speed[id] = 0; } set_user_footsteps(id, 0) } } public clipoff(id) { set_user_noclip(id) } public godoff(id) { } public Koniec_Rundy(){ for(new i =1;i<33;i++){ norecoil[i] = false; } } public fw_PreThink(id){ if(!is_user_alive(id) || norecoil[id] == false){ return FMRES_IGNORED; } set_pev(id,pev_punchangle,{0.0,0.0,0.0}); return FMRES_HANDLED; } public fw_Update(id, sendweapons, cd_handle) { if(!is_user_alive(id) || norecoil[id] == false){ return FMRES_IGNORED; } set_cd(cd_handle, CD_PunchAngle, {0.0,0.0,0.0}) return FMRES_HANDLED } /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1045\\ f0\\ fs16 \n\\ par } */