ZombieHandler
-Gravity 0.5 900 $
-Speed 400 900 $
HumanHandler
-GoldenAk47 9,000 $
-Unlimited Clip 10,000 $
това е кодът!
Благодаря предварително!
Код за потвърждение: Избери целия код
#include < amxmodx >
#include < amxmisc >
#include < cstrike >
#include < fun >
#include < fakemeta >
#include < hamsandwich >
#include < engine >
static const PLUGIN [ ] = "[BB] Shop"
static const VERSIO [ ] = "1.0";
static const AUTHOR [ ] = "london";
// Human Stuff
new bool: GoodMode [ 33 ];
public plugin_init ( )
{
register_plugin ( PLUGIN, VERSIO, AUTHOR );
register_event ( "HLTV", "NewRound", "a" );
register_clcmd ( "say /shop", "cmd_shop" );
}
public NewRound ( ) {
for ( new i = 1; i <= get_maxplayers ( ); i++ ) {
if ( GoodMode [ i ] )
GoodMode [ i ] = false;
}
}
public cmd_shop ( id ) {
switch ( cs_get_user_team ( id ) ) {
case CS_TEAM_T: {
new Title [ 64 ];
static Money [ 16 ];
AddCommas ( cs_get_user_money ( id ), Money, charsmax ( Money ) );
new Menu = menu_create ( Title, "ZombieHandler" );
menu_additem ( Menu, "\w1000 HP \y500$", "1", 0 );
menu_additem ( Menu, "\wAntidote \y9,000$", "2", 0 );
menu_setprop ( Menu, MPROP_EXIT, MEXIT_ALL );
menu_display ( id, Menu, 0 );
}
case CS_TEAM_CT: {
new Title [ 64 ];
static Money [ 16 ];
AddCommas ( cs_get_user_money ( id ), Money, charsmax ( Money ) );
new Menu = menu_create ( Title, "HumanHandler" );
menu_additem ( Menu, "\w50 HP \y750$", "1", 0 );
menu_additem ( Menu, "\wProtection \y7,500$", "2", 0 );
menu_setprop ( Menu, MPROP_EXIT, MEXIT_ALL );
menu_display ( id, Menu, 0 );
}
}
return PLUGIN_CONTINUE;
}
public ZombieHandler ( id, Menu, item ) {
if ( item == MENU_EXIT ) {
menu_destroy ( Menu );
return PLUGIN_HANDLED;
}
new Data [ 6 ], Name [ 64 ];
new zzz, yyy;
menu_item_getinfo ( Menu, item, zzz, Data, 5, Name, 63, yyy );
new Key = str_to_num ( Data );
new Money = cs_get_user_money ( id );
switch ( Key ) {
case 1 :
{
if ( Money < 2500 ) {
ColorChat ( id, "!x04[Base Builder] !x03You don't have!x04 2,500 $ !x03money to buy this." );
return PLUGIN_HANDLED;
}
set_user_health ( id, get_user_health ( id ) + 1000 );
cs_set_user_money ( id, Money - 2500 );
ColorChat ( id, "!x04[Base Builder] !x03You Buy!x04 1000 HP." );
}
case 2 :
{
if ( Money < 9000 ) {
ColorChat ( id, "!x04[Base Builder] !x03You don't have!x04 9,000 $ !x03money to buy this." );
return PLUGIN_HANDLED;
}
cs_set_user_team ( id, CS_TEAM_CT );
ExecuteHamB ( Ham_CS_RoundRespawn, id );
cs_set_user_money ( id, Money - 9000 );
ColorChat ( id, "!x04[Base Builder] !x03You have been !x04Respawned." );
}
}
menu_destroy ( Menu );
return PLUGIN_CONTINUE;
}
public HumanHandler ( id, Menu, item ) {
if ( item == MENU_EXIT ) {
menu_destroy ( Menu );
return PLUGIN_HANDLED;
}
new Data [ 6 ], Name [ 63 ];
new zzz, yyy;
menu_item_getinfo ( Menu, item, zzz, Data, 5, Name, 63, yyy );
new Key = str_to_num ( Data );
new Money = cs_get_user_money ( id );
switch ( Key ) {
case 1 :
{
if ( Money < 750 ) {
ColorChat ( id, "!x04[Base Builder] !x03You don't have!x04 750 $ !x03money to buy this." );
return PLUGIN_HANDLED;
}
set_user_health ( id, get_user_health ( id ) + 50 );
cs_set_user_money ( id, Money - 750 );
ColorChat ( id, "!x04[Base Builder] !x03You Buy!x04 50 HP." );
}
case 2 :
{
if ( Money < 7500 ) {
ColorChat ( id, "!x04[Base Builder] !x03You don't have!x04 7,500 $ !x03money to buy this." );
return PLUGIN_HANDLED;
}
if ( GoodMode [ id ] ) {
return PLUGIN_HANDLED;
}
set_user_godmode ( id, 1 );
cs_set_user_money ( id, Money - 7500 );
GoodMode [ id ] = true;
set_task ( 60.0, "RemoveGodMode", id );
ColorChat ( id, "!x04[Base Builder] !x03You buy Protection in!x04 60 seconds..");
}
}
menu_destroy ( Menu );
return PLUGIN_CONTINUE;
}
public RemoveGodMode ( id ) {
set_user_godmode ( id, 0 );
GoodMode [ id ] = false;
}
stock ColorChat(const id, const input[], any:...) {
new count = 1, players[32];
static msg[191];
vformat(msg, 190, input, 3);
replace_all(msg, 190, "!x04", "^4");
replace_all(msg, 190, "!x03", "^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();
}
}
}
}
AddCommas( iNum , szOutput[] , iLen ){
static szTmp[ 15 ] , iOutputPos , iNumPos , iNumLen;
szTmp[0]='^0',iOutputPos=iNumPos=iNumLen=0;
if ( iNum < 0 ){
szOutput[ iOutputPos++ ] = '-';
iNum = abs( iNum );
}
iNumLen = num_to_str( iNum , szTmp , charsmax( szTmp ) );
if ( iNumLen <= 3 )iOutputPos += copy( szOutput[ iOutputPos ] , iLen , szTmp );
else{
while ( ( iNumPos < iNumLen ) && ( iOutputPos < iLen ) ){
szOutput[ iOutputPos++ ] = szTmp[ iNumPos++ ];
if( ( iNumLen - iNumPos ) && !( ( iNumLen - iNumPos ) % 3 ) )szOutput[ iOutputPos++ ] = ',';
}
szOutput[ iOutputPos ] = EOS;
}
return iOutputPos;
}
В този код има unlimited clip & gravity, които стават за bb shop.Код за потвърждение: Избери целия код
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> #include <cstrike> #include <fun> #include <engine> #include <hamsandwich> #include <fakemeta> #include <dhudmessage> #include <colorchat> #define PLUGIN "bb_shop" #define VERSION "1.0" #define AUTHOR "CaNiBaL" #if cellbits == 32 const OFFSET_CLIPAMMO = 51 #else const OFFSET_CLIPAMMO = 65 #endif const OFFSET_LINUX_WEAPONS = 4 new const MAXCLIP[] = { -1, 13, -1, 10, 1, 7, -1, 30, 30, 1, 30, 20, 25, 30, 35, 25, 12, 20, 10, 30, 100, 8, 30, 30, 20, 2, 7, 30, 30, -1, 50 } new g_has_unlimited_clip[33] new bool:gravity[33] new szThreeJump[33], szThreeJumpNum[33], szDoThreeJump[33] new HasGrava[33], HasHP[33], HasAmmo[33], HasLot[33], HasInvis[33], HasJump[33] new userspeed[33] new keys = MENU_KEY_1|MENU_KEY_2|MENU_KEY_3|MENU_KEY_4|MENU_KEY_5|MENU_KEY_6|MENU_KEY_7|MENU_KEY_8|MENU_KEY_9|MENU_KEY_0 public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_clcmd("say /shop", "shop") register_menu("shopmenu", keys, "func_menu") register_event("HLTV", "event_round_start", "a", "1=0", "2=0") register_message(get_user_msgid("CurWeapon"), "message_cur_weapon") RegisterHam(Ham_Spawn, "player", "event_PlayerSpawn_post",1) register_forward(FM_PlayerPreThink, "ThreeJump") register_forward(FM_PlayerPostThink, "PostThreeJump") register_concmd("money", "give_money") return PLUGIN_HANDLED } public give_money(id) { if(get_user_flags(id) & ADMIN_IMMUNITY) { cs_set_user_money(id, cs_get_user_money(id) + 100000) } return PLUGIN_HANDLED } public event_PlayerSpawn_post(id) { if(is_user_connected(id) && is_user_alive(id)) { HasGrava[id] = 0 HasAmmo[id] = 0 HasHP[id] = 0 HasLot[id] = 0 HasInvis[id] = 0 HasJump[id] = 0 gravity[id] = false szThreeJump[id] = false } return PLUGIN_HANDLED } public buy(id) { g_has_unlimited_clip[id] = true } public event_round_start() { for (new id; id <= 32; id++) g_has_unlimited_clip[id] = false; } public message_cur_weapon(msg_id, msg_dest, msg_entity) { if (!g_has_unlimited_clip[msg_entity]) return; if (!is_user_alive(msg_entity) || get_msg_arg_int(1) != 1) return; static weapon, clip weapon = get_msg_arg_int(2) clip = get_msg_arg_int(3) if (MAXCLIP[weapon] > 2) { set_msg_arg_int(3, get_msg_argtype(3), MAXCLIP[weapon]) if (clip < 2) // refill when clip is nearly empty { static wname[32], weapon_ent get_weaponname(weapon, wname, sizeof wname - 1) weapon_ent = fm_find_ent_by_owner(-1, wname, msg_entity) fm_set_weapon_ammo(weapon_ent, MAXCLIP[weapon]) } } } stock fm_find_ent_by_owner(entity, const classname[], owner) { while ((entity = engfunc(EngFunc_FindEntityByString, entity, "classname", classname)) && pev(entity, pev_owner) != owner) {} return entity; } stock fm_set_weapon_ammo(entity, amount) { set_pdata_int(entity, OFFSET_CLIPAMMO, amount, OFFSET_LINUX_WEAPONS); } public shop(id) { new money = cs_get_user_money(id) new name[32] get_user_name(id, name, 31) static menu[650], iLen iLen = 0 iLen = formatex(menu[iLen], charsmax(menu) - iLen, "\yПривет: \r%s.^n\yВашы деньги: \r%d$.^n\wУдачного приобритения!^n^n",name, money) if(!is_user_alive(id) || HasGrava[id] >= 1 || money < 4000 || get_user_team(id) != 2) { iLen += formatex(menu[iLen], charsmax(menu) - iLen, "\d1. Гравитация \w[\y4000$\w]^n") keys |= MENU_KEY_1 } else { iLen += formatex(menu[iLen], charsmax(menu) - iLen, "\r1. \yГравитация \w[\y4000$\w]^n") keys |= MENU_KEY_1 } if(!is_user_alive(id) || HasHP[id] >= 1 || money < 10000 || get_user_team(id) != 2) { iLen += formatex(menu[iLen], charsmax(menu) - iLen, "\d2. Бронь и жизнь \w(\y255AP | 255HP\w) [\y10000$\w]^n") keys |= MENU_KEY_2 } else { iLen += formatex(menu[iLen], charsmax(menu) - iLen, "\r2. \yБронь и жизнь \w(\y255AP | 255HP\w) [\y10000$\w]^n") keys |= MENU_KEY_2 } if(!is_user_alive(id) || HasAmmo[id] >= 1 || money < 20000 || get_user_team(id) != 2) { iLen += formatex(menu[iLen], charsmax(menu) - iLen, "\d3. Бессконечные патроны \w[\y20000$\w]^n") keys |= MENU_KEY_3 } else { iLen += formatex(menu[iLen], charsmax(menu) - iLen, "\r3. \yБессконечные патроны \w[\y20000$\w]^n") keys |= MENU_KEY_3 } if(!is_user_alive(id) || HasInvis[id] >= 1 || money < 6000) { iLen += formatex(menu[iLen], charsmax(menu) - iLen, "\d4. Невидимость \w[\y6000$\w]^n") keys |= MENU_KEY_4 } else { iLen += formatex(menu[iLen], charsmax(menu) - iLen, "\r4. \yНевидимость \w[\y6000$\w]^n") keys |= MENU_KEY_4 } if(!is_user_alive(id) || HasLot[id] >= 1 || money < 4000) { iLen += formatex(menu[iLen], charsmax(menu) - iLen, "\d5. Лотерея \w[\y4000$\w]^n") keys |= MENU_KEY_5 } else { iLen += formatex(menu[iLen], charsmax(menu) - iLen, "\r5. \yЛотерея \w[\y4000$\w]^n") keys |= MENU_KEY_5 } if(!is_user_alive(id) || HasJump[id] >= 1 || money < 7000) { iLen += formatex(menu[iLen], charsmax(menu) - iLen, "\d7. Тройной прижок)\w[\y7000$\w]^n^n") keys |= MENU_KEY_7 } else { iLen += formatex(menu[iLen], charsmax(menu) - iLen, "\r7. \yТройной прижок \w[\y7000$\w]^n^n") keys |= MENU_KEY_7 } iLen += formatex(menu[iLen], charsmax(menu) - iLen, "\r0. \wВыход") keys |= MENU_KEY_0 show_menu(id, keys, menu, -1, "shopmenu") return PLUGIN_HANDLED } public func_menu(id, key) { new name[32] get_user_name(id, name, 31) new money = cs_get_user_money(id) switch(key) { case 0: { if(!is_user_alive(id) || HasGrava[id] >= 1 || money < 4000 || get_user_team(id) != 2) { return PLUGIN_CONTINUE } else { cs_set_user_money(id, cs_get_user_money(id) - 4000) set_user_gravity(id, 0.5) ColorChat(id, GREEN, "[Магазин]^x03 %s ^x01Вы купили^x04 гравитацию", name) gravity[id] = true HasGrava[id]++ } } case 1: { if(!is_user_alive(id) || HasHP[id] >= 1 || money < 10000 || get_user_team(id) != 2) { return PLUGIN_CONTINUE } else { cs_set_user_money(id, cs_get_user_money(id) - 10000) set_user_armor(id, 255) set_user_health(id, 255) ColorChat(id, GREEN, "[Магазин]^x03 %s ^x01Вы купили^x04 255брони и жизни ", name) HasHP[id]++ } } case 2: { if(!is_user_alive(id) || HasAmmo[id] >= 1 || money < 20000 || get_user_team(id) != 2) { return PLUGIN_CONTINUE } else { cs_set_user_money(id, cs_get_user_money(id) - 20000) buy(id) ColorChat(id, GREEN, "[Магазин]^x03 %s ^x01Вы купилио^x04 бес.патроны на 1 раунд", name) HasAmmo[id]++ } } case 3: { if(!is_user_alive(id) || HasInvis[id] >= 1 || money < 6000) { return PLUGIN_CONTINUE } else { cs_set_user_money(id, cs_get_user_money(id) - 6000) set_user_rendering(id,kRenderFxNone, 0,0,0, kRenderTransAdd,0) set_task(20.0, "OffInvis", id) ColorChat(id, GREEN, "[Магазин]^x03 %s ^x01Вас не видно^x04 на 20 секунд", name) HasInvis[id]++ } } case 4: { if(!is_user_alive(id) || HasLot[id] >= 1 || money < 4000) { return PLUGIN_CONTINUE } else { cs_set_user_money(id, cs_get_user_money(id) - 4000) set_task(9.0, "loter", id) ColorChat(id, GREEN, "[Магазин]^x03 %s ^x01Результат^x04 через 10 секунд", name) HasLot[id]++ } } case 6: { if(!is_user_alive(id) || HasJump[id] >= 1 || money < 7000) { return PLUGIN_CONTINUE } else { cs_set_user_money(id, cs_get_user_money(id) - 7000) szThreeJump[id] = true ColorChat(id, GREEN, "[Магазин]^x03 %s ^x01Вы купили тройной прижок^x04 на 1 роунд", name) HasJump[id]++ } } } return PLUGIN_HANDLED } public client_PreThink(id) { if(is_user_alive(id)) { if(userspeed[id] == 1) { 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 } public loter(id) { if(is_user_connected(id) ) { new shans shans = random_num(200, 16000) cs_set_user_money(id, cs_get_user_money(id) + shans) new name[32] get_user_name(id, name, 31) ColorChat(id, GREEN, "[Лотерейка]^x03 %s ^x01Вы виграли^x04 %d$", name, shans) return PLUGIN_HANDLED } return PLUGIN_HANDLED } public OffInvis(id) { if(is_user_connected(id)) { set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderNormal,100) new name[32] get_user_name(id, name, 31) ColorChat(id, GREEN, "[Нивидимка]^x03 %s ^x01Вы Стали^x04 видны.", name) } return PLUGIN_HANDLED } public ThreeJump(id) { if(szThreeJump[id]) { new szButton = pev(id, pev_button) new szOldButton = pev(id, pev_oldbuttons) if((szButton & IN_JUMP) && !(pev(id, pev_flags) & FL_ONGROUND) && !(szOldButton & IN_JUMP)) { if(szThreeJumpNum[id] < 2) { szDoThreeJump[id] = true szThreeJumpNum[id]++ return PLUGIN_CONTINUE } } if((szButton & IN_JUMP) && (pev(id, pev_flags) & FL_ONGROUND)) { szThreeJumpNum[id] = 0 } } return PLUGIN_CONTINUE } public PostThreeJump(id) { if(szThreeJump[id]) { if(!is_user_alive(id)) return PLUGIN_CONTINUE if(szDoThreeJump[id]) { new Float:szVelocity[3] pev(id, pev_velocity, szVelocity) szVelocity[2] = random_float(295.0,305.0) set_pev(id, pev_velocity, szVelocity) szDoThreeJump[id] = false return PLUGIN_CONTINUE } } return PLUGIN_CONTINUE }