#include #include #include #include #include #include #include #include #define PLUGIN "Shop JailBreak" #define VERSION "1.0" #define AUTHOR "xxxxxxx" new name [32]; new bool:autobh[33]; #define FL_WATERJUMP (1<<11) // popping out of the water #define FL_ONGROUND (1<<9) // not moving on the ground public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_clcmd("say /jbshop", "jbshop") register_clcmd("say /shop", "jbshop") register_clcmd("say /sklep", "jbshop") register_event( "CurWeapon", "Event_Change_Weapon", "be", "1=1" ); register_forward(FM_CmdStart, "CmdStart"); } public jbshop(id){ if(is_user_connected(id) && cs_get_user_team(id) == CS_TEAM_T) { new menu = menu_create("\wMini Shop JailBreak","menu") menu_additem(menu,"\yMiekkie Kapcie \d[8000$] \r(ciche chodzenie)","1",0) menu_additem(menu,"\yButy Skoczka \d[6000$] \r(500 grawitki)","2",0) menu_additem(menu,"\yFlash \d[8000$]","3",0) menu_additem(menu,"\yAuto BH \d[6000$]","9",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, GREEN, "%s ^x03Nie masz wystarczajaca hajsu!", name) return PLUGIN_HANDLED; } if (!is_user_alive(id)){ get_user_name(id, name, 31) ColorChat(id, BLUE, "%s ^x03Tylko zywi moga kupowac!", name) return PLUGIN_HANDLED; } if (cs_get_user_money(id) >= 8000 ){ get_user_name(id, name, 31) ColorChat(0, RED, "Kupiono Miekkie Kapcie, dzieki ktorym nie slychac twoich krokow.", name) set_user_footsteps(id, 1) cs_set_user_money(id , cs_get_user_money(id) - 8000, 0) } } case 2 : { if (cs_get_user_money(id) < 6000){ get_user_name(id, name, 31) ColorChat(id, GREEN, "%s ^x03Nie masz wystarczajaca hajsu!", name) return PLUGIN_HANDLED; } if (!is_user_alive(id)){ get_user_name(id, name, 31) ColorChat(id, BLUE, "%s ^x03Tylko zywi moga kupowac!", name) return PLUGIN_HANDLED; } if (cs_get_user_money(id) >= 6000 ){ get_user_name(id, name, 31) ColorChat(0, RED, "Kupiono Buty Skoczka, dzieki ktorym mozesz wyzej skakac.", name) set_user_gravity(id, 0.5) cs_set_user_money(id , cs_get_user_money(id) - 6000, 0) } } case 3 :{ if (cs_get_user_money(id) < 8000){ get_user_name(id, name, 31) ColorChat(id, GREEN, "%s ^x03Nie masz wystarczajaca hajsu!", name) return PLUGIN_HANDLED; } if (!is_user_alive(id)){ get_user_name(id, name, 31) ColorChat(id, BLUE, "%s ^x03Tylko zywi moga kupowac!", name) return PLUGIN_HANDLED; } if (cs_get_user_money(id) >= 8000 ){ get_user_name(id, name, 31) ColorChat(0, RED, "Kupiono Flasha", name) give_item(id, "weapon_flashbang"); cs_set_user_money(id , cs_get_user_money(id) - 8000, 0) } } case 4 :{ if (cs_get_user_money(id) < 6000){ get_user_name(id, name, 31) ColorChat(id, GREEN, "%s ^x03Nie masz wystarczajaca hajsu!", name) return PLUGIN_HANDLED; } if (!is_user_alive(id)){ get_user_name(id, name, 31) ColorChat(id, BLUE, "%s ^x03Tylko zywi moga kupowac!", name) return PLUGIN_HANDLED; } if (cs_get_user_money(id) >= 6000 ){ get_user_name(id, name, 31) ColorChat(0, RED, "Kupiono Auto BH", name) autobh[id] = true; cs_set_user_money(id , cs_get_user_money(id) - 6000, 0) } } } return PLUGIN_HANDLED; } public client_PreThink(id) { if(autobh[id] == true){ entity_set_float(id, EV_FL_fuser2, 0.0) if (entity_get_int(id, EV_INT_button) & 2) { new flags = entity_get_int(id, EV_INT_flags) if (flags & FL_WATERJUMP) return PLUGIN_CONTINUE if ( entity_get_int(id, EV_INT_waterlevel) >= 2 ) return PLUGIN_CONTINUE if ( !(flags & FL_ONGROUND) ) return PLUGIN_CONTINUE new Float:velocity[3] entity_get_vector(id, EV_VEC_velocity, velocity) velocity[2] += 250.0 entity_set_vector(id, EV_VEC_velocity, velocity) entity_set_int(id, EV_INT_gaitsequence, 6) } } return PLUGIN_CONTINUE } /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1045\\ f0\\ fs16 \n\\ par } */