Modificare Shop Biohazard[rezolvat]
Posted: 03 Jul 2014, 23:59
by SomeWhere
Poate cineva sa-mi modifice la acest plugin urmatoarele lucruri ?
- Jetpack-ul sa fie VIP ONLY => Asta la Survivors
- Infect Grenade VIP ONLY => Asta laZombie
Daca nu se poate Infect grenade ma multumesc si cu prima .
Plugin by THE YONTU !
- Jetpack-ul sa fie VIP ONLY => Asta la Survivors
- Infect Grenade VIP ONLY => Asta laZombie
Daca nu se poate Infect grenade ma multumesc si cu prima .
Plugin by THE YONTU !
- | Afiseaza codul
#include < amxmodx > #include < hamsandwich > #include < fakemeta > #include < fun > // Armor & Health #include < cstrike > #include < engine > #include < xs > #include < biohazard > #include < ColorChat > #define MAX_ITEMS_HUMAN 11 #define MAX_ITEMS_ZOMBIE 5 #define JETPACK_SND "Biohazard30/Jetpack.wav" #define JETPACK2_SND "Biohazard30/Jetpack2.wav" #define SNIPER_SND "Biohazard30/SniperSound.wav" // Extra Offsets for player #if cellbits == 32 const OFFSET_CSMONEY = 115; #else const OFFSET_CSMONEY = 140; #endif const OFFSET_LINUX = 5; // CS Player PData Offsets (win32) #define OFFSET_MODELINDEX 491 #define OFFSET_LINUX_WEAPONS 4 #define OFFSET_WEAPON_OWNER 41 #define OFFSET_CLIPAMMO 51 #define OFFSET_ACTIVE_ITEM 373 #define OFFSET_AMMO_338MAGNUM 377 #define OFFSET_AMMO_762NATO 378 #define OFFSET_AMMO_556NATOBOX 379 #define OFFSET_AMMO_556NATO 380 #define OFFSET_AMMO_BUCKSHOT 381 #define OFFSET_AMMO_45ACP 382 #define OFFSET_AMMO_57MM 383 #define OFFSET_AMMO_50AE 384 #define OFFSET_AMMO_357SIG 385 #define OFFSET_AMMO_9MM 386 #define is_user_player(%1) ( 1 <= %1 <= 32 ) #define fm_set_weapon_ammo(%1,%2) set_pdata_int( %1, OFFSET_CLIPAMMO, %2, OFFSET_LINUX_WEAPONS ) #define fm_get_user_money(%1) get_pdata_int( %1, OFFSET_CSMONEY ) #define fm_get_user_button(%1) pev( %1, pev_button ) #define fm_get_user_oldbutton(%1) pev( %1, pev_oldbuttons ) new const PLUGIN_NAME[ ] = "[Bio] Addon: Simple SHOP", PLUGIN_VERSION[ ] = "1.4", PLUGIN_AUTHOR[ ] = "YONTU"; new const g_szTag[ ] = "[Biohazard Shop]^x01"; new const NameShop[ ] = "\wSlatina\r.\CCS1\r.\wRo"; new const g_iMaxClips[ ] = { 0, 13, 0, 10, 0, 7, 0, 30, 30, 0, 15, 20, 25, 30, 35, 25, 12, 20, 10, 30, 100, 8, 30, 30, 20, 0, 7, 30, 30, 0, 50 }; new const g_teaminfo[ ][ ] = { "UNASSIGNED", "TERRORIST", "CT", "SPECTATOR" } const PRIMARY_WEAPONS_BIT_SUM = ( ( 1<<CSW_SCOUT ) | ( 1<<CSW_XM1014 ) | ( 1<<CSW_MAC10 ) | ( 1<<CSW_AUG ) | ( 1<<CSW_UMP45 ) | ( 1<<CSW_SG550 ) | ( 1<<CSW_GALIL ) | ( 1<<CSW_FAMAS ) | ( 1<<CSW_AWP ) | ( 1<<CSW_MP5NAVY ) | ( 1<<CSW_M249 ) | ( 1<<CSW_M3 ) | ( 1<<CSW_M4A1 ) | ( 1<<CSW_TMP ) | ( 1<<CSW_G3SG1 ) | ( 1<<CSW_SG552 ) | ( 1<<CSW_AK47 ) | ( 1<<CSW_P90 ) ) const NULL_WPN_BS = ( ( 1<<2 ) | ( 1<<CSW_HEGRENADE ) | ( 1<<CSW_SMOKEGRENADE ) | ( 1<<CSW_FLASHBANG ) | ( 1<<CSW_KNIFE ) | ( 1<<CSW_C4 ) ); new Ham:Ham_Player_ResetMaxSpeed = Ham_Item_PreFrame; new WpnName[ 32 ]; new Float:cl_pushangle[ 33 ][ 3 ]; new Frame[ 33 ], jetpack_flame; new Float:g_fCooldown[ 32 ]; // Human new bool:Dmg[ 33 ]; new bool:Speed[ 33 ]; new bool:UnlimitedAmmo[ 33 ]; new bool:NoRecoil[ 33 ]; new bool:Jetpack[ 33 ]; new bool:Gravity[ 33 ]; // Zombie new bool:ZmNoClip[ 33 ]; new bool:ZmLongJump[ 33 ]; new gCvarCostHealth, gCvarHealth, gCvarMaxHealth, gCvarCostArmor, gCvarArmor, gCvarMaxArmor, gCvarCostMultiDmg, gCvarCostSpeed, gCvarSpeed, gCvarCostGravity, gCvarGravity, gCvarCostHeGrenade, gCvarCostFrostNade, gCvarCostUnAmmo, gCvarCostNoRecoil, gCvarCostInfectSelf, gCvarCostJetpack, gCvarJetpackSpeed; new gCvarCostZmHealth, gCvarZmHealth, gCvarZmMaxHealth, gCvarZmNoClipTime, gCvarZmNoClipCountdown, gCvarCostZmNoClip, gCvarCostAntidote, gCvarCostZmLongJump; public plugin_init( ) { register_plugin( PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR ); is_biomod_active( ) ? plugin_init2( ) : pause( "ad" ); } public plugin_init2( ) { register_clcmd( "say /shop", "OpenMenu" ); register_clcmd( "say_team /shop", "OpenMenu" ); register_clcmd( "power", "ClCmdUsePower" ); register_logevent( "logevent_RoundEnd", 2, "1=Round_End" ); register_event( "CurWeapon", "event_CurWeapon", "be", "1=1" ); register_event( "DeathMsg", "event_DeathMsg", "a" ); RegisterHam( Ham_Player_ResetMaxSpeed, "player", "Ham_ResetMaxSpeedPost", 1 ); RegisterHam( Ham_TakeDamage, "player", "Ham_TakeDamagePre" ); RegisterHam( Ham_Spawn, "player", "Ham_PlayerSpawnPost", 1 ); register_forward( FM_PlayerPreThink, "LongJump_PlayerPreThink", 1 ); for( new i = 1; i <= CSW_P90; i++ ) { if( !( NULL_WPN_BS & ( 1<<i ) ) && get_weaponname( i, WpnName, charsmax( WpnName ) ) ) { RegisterHam( Ham_Weapon_PrimaryAttack, WpnName, "Ham_PrimaryAttack" ); RegisterHam( Ham_Weapon_PrimaryAttack, WpnName, "Ham_PrimaryAttackPost", 1 ); } } // Human Cvars register_cvar( "shop_item_on", "1" ); gCvarCostHealth = register_cvar( "shop_cost_hp", "3500" ); gCvarHealth = register_cvar( "shop_hp", "50" ); gCvarMaxHealth = register_cvar( "shop_max_hp", "350" ); gCvarCostArmor = register_cvar( "shop_cost_ap", "3500" ); gCvarArmor = register_cvar( "shop_ap", "100" ); gCvarMaxArmor = register_cvar( "shop_max_ap", "200" ); gCvarCostGravity = register_cvar( "shop_cost_gravity", "3300" ); gCvarGravity = register_cvar( "shop_gravity", "300.0" ); gCvarCostMultiDmg = register_cvar( "shop_cost_multidmg", "8000" ); gCvarCostSpeed = register_cvar( "shop_cost_speed", "10000" ); // in golds gCvarSpeed = register_cvar( "shop_speed", "300.0" ); gCvarCostHeGrenade = register_cvar( "shop_cost_hegrenade", "3100" ); gCvarCostFrostNade = register_cvar( "shop_cost_frostnade", "3600" ); gCvarCostUnAmmo = register_cvar( "shop_cost_unammo", "8000" ); // in golds gCvarCostNoRecoil = register_cvar( "shop_cost_norecoil", "6350" ); gCvarCostInfectSelf = register_cvar( "shop_cost_infectself", "8700" ); gCvarCostJetpack = register_cvar( "shop_cost_jetpack", "16000" ); gCvarJetpackSpeed = register_cvar( "shop_speed_jetpack", "500" ); // Zombie Cvars gCvarCostZmHealth = register_cvar( "shop_cost_zm_hp", "10000" ); gCvarZmHealth = register_cvar( "shop_zm_hp", "300" ); gCvarZmMaxHealth = register_cvar( "shop_zm_maxhp", "7000" ); gCvarZmNoClipCountdown = register_cvar( "shop_zm_noclip_countdown", "35" ); gCvarZmNoClipTime = register_cvar( "shop_zm_noclip_time", "3.0" ); gCvarCostZmNoClip = register_cvar( "shop_cost_zm_noclip", "10000" ); // in golds gCvarCostAntidote = register_cvar( "shop_cost_antidote", "7000" ); gCvarCostZmLongJump = register_cvar( "shop_cost_zm_longjump", "6600" ); } public plugin_precache( ) { jetpack_flame = precache_model( "sprites/gate1.spr" ); precache_sound( JETPACK_SND ); precache_sound( JETPACK2_SND ); precache_sound( SNIPER_SND ); } public plugin_cfg( ) set_cvar_float( "sv_maxspeed", 1000.0 ); public client_disconnect( id ) { RemoveAllItemsHuman( id ); RemoveAllItemsZombie( id ); } public client_putinserver( id ) { client_disconnect( id ); client_cmd( id, ^"bind c say /shop^" ); } public event_CurWeapon( id ) { if( !is_user_alive( id ) || is_user_bot( id ) ) return 1; if( Gravity[ id ] ) { fm_set_user_gravity( id, get_pcvar_num( gCvarGravity ) * 0.00125 ); } else { Gravity[ id ] = false; } if( UnlimitedAmmo[ id ] ) { new iWeapon = read_data( 2 ); if( !( NULL_WPN_BS & ( 1 << iWeapon ) ) ) set_pdata_int( get_pdata_cbase( id, OFFSET_ACTIVE_ITEM ), OFFSET_CLIPAMMO, g_iMaxClips[ iWeapon ], OFFSET_LINUX_WEAPONS ); } return 0; } public event_infect( id, infector ) { if( is_user_zombie( id ) ) { RemoveAllItemsHuman( id ); } } public event_DeathMsg( ) { new Killer = read_data( 1 ); new Victim = read_data( 2 ); if( Killer == Victim || !is_user_alive( Killer ) ) return 1; RemoveAllItemsHuman( Victim ); RemoveAllItemsZombie( Victim ); return 0; } public logevent_RoundEnd( ) { new szPlayers[ 32 ], iNum; get_players( szPlayers, iNum, "ch" ); for( new i = 0; i < iNum; i++) { static id; id = szPlayers[ i ]; RemoveAllItemsHuman( id ); RemoveAllItemsZombie( id ); } } public Ham_ResetMaxSpeedPost( id ) { if( is_user_alive( id ) && fm_get_user_maxspeed( id ) != 1.0 ) { new Float:flMaxSpeed; if( Speed[ id ] ) { flMaxSpeed = float( get_pcvar_num( gCvarSpeed ) ); } if( flMaxSpeed > 0.0 ) { set_pev( id, pev_maxspeed, flMaxSpeed ); } } } public Ham_TakeDamagePre( iVictim, iInflictor, iAttacker, Float:fDamage ) { if( iVictim == iAttacker || !is_user_player( iAttacker ) || !is_user_alive( iAttacker ) ) return HAM_HANDLED; if( Dmg[ iAttacker ] && is_user_player( iAttacker ) ) { SetHamParamFloat( 4, fDamage * 2.0 ); return HAM_HANDLED; } return HAM_IGNORED; } public Ham_PlayerSpawnPost( id ) { if( !is_user_alive( id ) ) return HAM_IGNORED; RemoveAllItemsHuman( id ); RemoveAllItemsZombie( id ); return HAM_IGNORED; } public Ham_PrimaryAttack( ent ) { new id = pev( ent, pev_owner ); pev( id, pev_punchangle, cl_pushangle[ id ] ); return HAM_IGNORED; } public Ham_PrimaryAttackPost( ent ) { new id = pev( ent, pev_owner ); if( NoRecoil[ id ] ) { new Float:push[ 3 ]; pev( id, pev_punchangle, push ); xs_vec_sub( push, cl_pushangle[ id ], push ); xs_vec_mul_scalar( push, 0.0, push ); xs_vec_add( push, cl_pushangle[ id ], push ); set_pev( id, pev_punchangle, push ); return HAM_IGNORED; } return HAM_IGNORED; } public LongJump_PlayerPreThink( id ) { if( is_user_alive( id ) && fm_get_user_maxspeed( id ) > 1.0 && ZmLongJump[ id ] ) { if( !is_user_bot( id ) && !( fm_get_user_button( id ) & ( IN_JUMP | IN_DUCK ) == ( IN_JUMP | IN_DUCK ) ) ) return; if( pev( id, pev_flags ) & FL_ONGROUND && fm_get_speed( id ) > 80 ) { static Float:fVelocity[ 3 ]; velocity_by_aim( id, 900, fVelocity ); fVelocity[ 2 ] = 480.0; set_pev( id, pev_velocity, fVelocity ); } } if( is_user_alive( id ) && fm_get_user_button( id ) & IN_JUMP && Jetpack[ id ] && fm_get_user_maxspeed( id ) > 1.0 ) { new Float:fAim[ 3 ], Float:fVelocity[ 3 ]; VelocityByAim( id, get_pcvar_num( gCvarJetpackSpeed ), fAim ); fVelocity[ 0 ] = fAim[ 0 ]; fVelocity[ 1 ] = fAim[ 1 ]; fVelocity[ 2 ] = fAim[ 2 ]; fm_set_user_velocity( id, fVelocity ); entity_set_int( id, EV_INT_gaitsequence, 6 ); emit_sound( id, CHAN_VOICE, JETPACK2_SND, VOL_NORM, ATTN_NORM, 0, PITCH_NORM ); if( Frame[ id ] >= 3 ) { Frame[ id ] = 0; new iOrigin[ 3 ]; get_user_origin( id, iOrigin, 0 ); iOrigin[ 2 ] = iOrigin[ 2 ] - 10; message_begin(MSG_BROADCAST, SVC_TEMPENTITY); write_byte( 17 ); write_coord( iOrigin[ 0 ] ); write_coord( iOrigin[ 1 ] ); write_coord( iOrigin[ 2 ] ); write_short( jetpack_flame ); write_byte( 10 ); write_byte( 115 ); message_end( ); } Frame[ id ]++; } } public OpenMenu( id ) { if( !is_user_connected( id ) || is_user_bot( id ) ) return 1; if( !is_user_alive( id ) ) { ColorChat( id, GREEN, "%s^x01 Trebuie sa fii in viata ca sa poti accesa^x03 shop-ul^x01 !!!", g_szTag ); return 1; } else if( get_user_team( id ) == 3 ) { ColorChat( id, GREEN, "%s^x01 Nu poti accesa shop-ul cat timp esti spectator !!!", g_szTag ); return 1; } else { ShowShopMenu( id ); } return 0; } public ShowShopMenu( id ) { new szMenuName[ 64 ]; formatex( szMenuName, sizeof( szMenuName ) - 1, "%s^n\yYou are now\r %s\y.", NameShop, is_user_zombie( id ) ? "zombie" : "human" ); new szMenu = menu_create( szMenuName, "MenuHandlerOne" ); if( is_user_zombie( id ) ) { menu_additem( szMenu, "\dHumans Shop", "1", 0 ); } else { menu_additem( szMenu, "\wHumans\y Shop", "1", 0 ); } if( !is_user_zombie( id ) ) { menu_additem( szMenu, "\dZombies Shop", "2", 0 ); } else { menu_additem( szMenu, "\wZombies\y Shop", "2", 0 ); } menu_setprop( szMenu, MPROP_EXITNAME, "\wExit" ); menu_display( id, szMenu, 0 ); return 1; } public MenuHandlerOne( id, szMenu, szItem ) { if( szItem == MENU_EXIT ) { menu_destroy( szMenu ); return PLUGIN_HANDLED; } new szData[ 6 ], szName[ 64 ]; new iAccess, iCallBack; menu_item_getinfo( szMenu, szItem, iAccess, szData, charsmax( szData ), szName, charsmax( szName ), iCallBack ); new iKey = str_to_num( szData ); switch( iKey ) { case 1: { if( is_user_zombie( id ) ) { ColorChat( id, GREEN, "%s Nu poti accesa meniul pentru.^x03 supravietuitori^x01 cat timp esti zombie!", g_szTag ); set_task( 0.3, "ShowShopMenu", id ); return 1; } else { set_task( 0.1, "ShowShopHumans", id ); } } case 2: { if( !is_user_zombie( id ) ) { ColorChat( id, GREEN, "%s Nu poti accesa meniul pentru.^x03 zombie^x01 cat timp esti supravietuitor!", g_szTag ); set_task( 0.3, "ShowShopMenu", id ); return 1; } else { set_task( 0.1, "ShowShopZombies", id ); } } } menu_destroy( szMenu ); return PLUGIN_HANDLED; } public ShowShopHumans( id ) { new szMenuName[ 64 ]; formatex( szMenuName, sizeof( szMenuName ) - 1, "\w%s^n\yYour Money:\r %i\w |\y Page:\w", NameShop, fm_get_user_money( id ) ); new iMenu = menu_create( szMenuName, "MenuHandlerHumans" ); new szBuffer[ MAX_ITEMS_HUMAN ][ 64 ]; new szBufferKey[ MAX_ITEMS_HUMAN - 1 ]; new iBufferKey = 1; if( Speed[ id ] ) { formatex( szBuffer[ 0 ], sizeof( szBuffer[ ] ) - 1, "\d%i Speed\r - \w%i $", get_pcvar_num( gCvarSpeed ), get_pcvar_num( gCvarCostSpeed ) ); } else { formatex( szBuffer[ 0 ], sizeof( szBuffer[ ] ) - 1, "\y%i Speed\r - \w%i $", get_pcvar_num( gCvarSpeed ), get_pcvar_num( gCvarCostSpeed ) ); } if( Gravity[ id ] ) { formatex( szBuffer[ 1 ], sizeof( szBuffer[ ] ) - 1, "\d%0.1f Gravity\r - \w%i $", get_pcvar_float( gCvarGravity ), get_pcvar_num( gCvarCostGravity ) ); } else { formatex( szBuffer[ 1 ], sizeof( szBuffer[ ] ) - 1, "\y%0.1f Gravity\r - \w%i $", get_pcvar_float( gCvarGravity ), get_pcvar_num( gCvarCostGravity ) ); } if( get_user_health( id ) >= get_pcvar_num( gCvarMaxHealth ) ) { formatex( szBuffer[ 2 ], sizeof( szBuffer[ ] ) - 1, "\d%i Health\r - \w%i $", get_pcvar_num( gCvarHealth ), get_pcvar_num( gCvarCostHealth ) ); } else { formatex( szBuffer[ 2 ], sizeof( szBuffer[ ] ) - 1, "\y%i Health\r - \w%i $", get_pcvar_num( gCvarHealth ), get_pcvar_num( gCvarCostHealth ) ); } if( get_user_armor( id ) >= get_pcvar_num( gCvarMaxArmor ) ) { formatex( szBuffer[ 3 ], sizeof( szBuffer[ ] ) - 1, "\d%i Anti Infection Armor\r - \w%i $", get_pcvar_num( gCvarArmor ), get_pcvar_num( gCvarCostArmor ) ); } else { formatex( szBuffer[ 3 ], sizeof( szBuffer[ ] ) - 1, "\y%i Anti Infection Armor\r - \w%i $", get_pcvar_num( gCvarArmor ), get_pcvar_num( gCvarCostArmor ) ); } if( user_has_weapon( id, CSW_HEGRENADE ) ) { formatex( szBuffer[ 4 ], sizeof( szBuffer[ ] ) - 1, "\dNapalm Nade\r - \w%i $", get_pcvar_num( gCvarCostHeGrenade ) ); } else { formatex( szBuffer[ 4 ], sizeof( szBuffer[ ] ) - 1, "\yNapalm Nade\r - \w%i $", get_pcvar_num( gCvarCostHeGrenade ) ); } if( user_has_weapon( id, CSW_FLASHBANG ) ) { formatex( szBuffer[ 5 ], sizeof( szBuffer[ ] ) - 1, "\dFrost Nade\r - \w%i $", get_pcvar_num( gCvarCostFrostNade ) ); } else { formatex( szBuffer[ 5 ], sizeof( szBuffer[ ] ) - 1, "\yFrost Nade\r - \w%i $", get_pcvar_num( gCvarCostFrostNade ) ); } if( Dmg[ id ] ) { formatex( szBuffer[ 6 ], sizeof( szBuffer[ ] ) - 1, "\dx2 Dmg\r - \w%i $", get_pcvar_num( gCvarCostMultiDmg ) ); } else { formatex( szBuffer[ 6 ], sizeof( szBuffer[ ] ) - 1, "\yx2 Dmg\r - \w%i $", get_pcvar_num( gCvarCostMultiDmg ) ); } if( UnlimitedAmmo[ id ] ) { formatex( szBuffer[ 7 ], sizeof( szBuffer[ ] ) - 1, "\dUnlimited Ammo\r - \w%i $", get_pcvar_num( gCvarCostUnAmmo ) ); } else { formatex( szBuffer[ 7 ], sizeof( szBuffer[ ] ) - 1, "\yUnlimited Ammo\r - \w%i $", get_pcvar_num( gCvarCostUnAmmo ) ); } if( NoRecoil[ id ] ) { formatex( szBuffer[ 8 ], sizeof( szBuffer[ ] ) - 1, "\dNo Recoil\r - \w%i $", get_pcvar_num( gCvarCostNoRecoil ) ); } else { formatex( szBuffer[ 8 ], sizeof( szBuffer[ ] ) - 1, "\yNo Recoil\r - \w%i $", get_pcvar_num( gCvarCostNoRecoil ) ); } formatex( szBuffer[ 9 ], sizeof( szBuffer[ ] ) - 1, "\yMake Me\w Zombie\r - \w%i $", get_pcvar_num( gCvarCostInfectSelf ) ); if( Jetpack[ id ] ) { formatex( szBuffer[ 10 ], sizeof( szBuffer[ ] ) - 1, "\dJetpack\r - \w%i $", get_pcvar_num( gCvarCostJetpack ) ); } else { formatex( szBuffer[ 10 ], sizeof( szBuffer[ ] ) - 1, "\yJetpack\r - \w%i $", get_pcvar_num( gCvarCostJetpack ) ); } for( new i = 0; i < MAX_ITEMS_HUMAN; i++ ) { formatex( szBufferKey, sizeof( szBufferKey ) -1, "%i", iBufferKey ); menu_additem( iMenu, szBuffer[ i ], szBufferKey, 0 ); iBufferKey++; } menu_setprop( iMenu, MPROP_EXITNAME, "\wExit" ); menu_display( id, iMenu, 0 ); return 1; } public MenuHandlerHumans( id, szMenu, szItem ) { if( szItem == MENU_EXIT ) { menu_destroy( szMenu ); return PLUGIN_HANDLED; } new szData[ 6 ], szName[ 64 ]; new iAccess, iCallBack; menu_item_getinfo( szMenu, szItem, iAccess, szData, charsmax( szData ), szName, charsmax( szName ), iCallBack ); new iKey = str_to_num( szData ); switch( iKey ) { case 1: { // SPEED new CostSpeed = get_pcvar_num( gCvarCostSpeed ); new Golds = fm_get_user_money( id ) - CostSpeed; if( Golds < 0 ) { ColorChat( id, GREEN, "%s Mai ai nevoie de^x03 %i^x01 golds pentru a cumpara viteza!", g_szTag, CostSpeed - fm_get_user_money( id ) ); set_task( 0.3, "ShowShopMenu", id ); return 1; } else if( Speed[ id ] ) { ColorChat( id, GREEN, "%s Ai deja acest item!", g_szTag ); set_task( 0.3, "ShowShopMenu", id ); return 1; } else { Speed[ id ] = true; set_pev( id, pev_maxspeed, get_pcvar_float( gCvarSpeed ) ); new szCommand[ 128 ]; formatex( szCommand, sizeof( szCommand ) - 1, "cl_forwardspeed %.1f;cl_sidespeed %.1f;cl_backspeed %.1f", get_pcvar_float( gCvarSpeed ), get_pcvar_float( gCvarSpeed ), get_pcvar_float( gCvarSpeed ) ); client_cmd( id, szCommand ); ColorChat( id, GREEN, "%s Ai devenit mai rapid cu^x03 %0.1f^x01 unitati.", g_szTag, get_pcvar_float( gCvarSpeed ) ); fm_set_user_money( id, Golds ); return 1; } } case 2: { // GRAVITY new CostGravity = get_pcvar_num( gCvarCostGravity ); new Money = fm_get_user_money( id ) - CostGravity; if( Money < 0 ) { ColorChat( id, GREEN, "%s Mai ai nevoie de^x03 %i^x01 $ pentru a cumpara gravitate!", g_szTag, CostGravity - fm_get_user_money( id ) ); set_task( 0.3, "ShowShopMenu", id ); return 1; } else if( Gravity[ id ] ) { ColorChat( id, GREEN, "%s Ai deja acest item!", g_szTag ); set_task( 0.3, "ShowShopMenu", id ); return 1; } else { Gravity[ id ] = true; ColorChat( id, GREEN, "%s Ai devenit mai usor cu^x03 %0.1f^x01 unitati.", g_szTag, get_pcvar_float( gCvarGravity ) ); fm_set_user_money( id, Money ); return 1; } } case 3: { // HEALTH new CostHealth = get_pcvar_num( gCvarCostHealth ); new Money = fm_get_user_money( id ) - CostHealth; if( Money < 0 ) { ColorChat( id, GREEN, "%s Mai ai nevoie de^x03 %i^x01 $ pentru a cumpara viata in plus!", g_szTag, CostHealth - fm_get_user_money( id ) ); set_task( 0.3, "ShowShopMenu", id ); return 1; } else if( get_user_health( id ) >= get_pcvar_num( gCvarMaxHealth ) ) { ColorChat( id, GREEN, "%s Ai ajuns la numarul maxim de viata(^x04%i^x01).", g_szTag, get_pcvar_num( gCvarMaxHealth ) ); set_task( 0.3, "ShowShopMenu", id ); return 1; } else { set_user_health( id, get_user_health( id ) + get_pcvar_num( gCvarHealth ) ); message_begin( MSG_ONE, get_user_msgid( "ItemPickup" ), _, id ); write_string( "cross" ); write_byte( 255 ); write_byte( 0 ); write_byte( 0 ); message_end( ); ColorChat( id, GREEN, "%s Viata ta este acum cu^x03 %i^x01 mai mare.", g_szTag, get_pcvar_num( gCvarHealth ) ); fm_set_user_money( id, Money ); return 1; } } case 4: { // ANTI INFECTION ARMOR new CostArmor = get_pcvar_num( gCvarCostArmor ); new Money = fm_get_user_money( id ) - CostArmor; if( Money < 0 ) { ColorChat( id, GREEN, "%s Mai ai nevoie de^x03 %i^x01 $ pentru a cumpara armura!", g_szTag, CostArmor - fm_get_user_money( id ) ); set_task( 0.3, "ShowShopMenu", id ); return 1; } else if( get_user_health( id ) >= get_pcvar_num( gCvarMaxArmor ) ) { ColorChat( id, GREEN, "%s Ai ajuns la numarul maxim de armura(^x04%i^x01).", g_szTag, get_pcvar_num( gCvarMaxArmor ) ); set_task( 0.3, "ShowShopMenu", id ); return 1; } else { set_user_armor( id, get_user_armor( id ) + get_pcvar_num( gCvarArmor ) ); message_begin( MSG_ONE, get_user_msgid( "ItemPickup" ), _, id ); write_string( "cross" ); write_byte( 255 ); write_byte( 0 ); write_byte( 0 ); message_end( ); ColorChat( id, GREEN, "%s Ai devenit 50% imun(^x03 %i^x01 AP) impotriva infectiei.", g_szTag, get_pcvar_num( gCvarArmor ) ); fm_set_user_money( id, Money ); return 1; } } case 5: { // NAPALM NADE new CostHe = get_pcvar_num( gCvarCostHeGrenade ); new Money = fm_get_user_money( id ) - CostHe; if( Money < 0 ) { ColorChat( id, GREEN, "%s Mai ai nevoie de^x03 %i^x01 $ pentru a cumpara o grenada napalm !", g_szTag, CostHe - fm_get_user_money( id ) ); set_task( 0.3, "ShowShopMenu", id ); return 1; } else if( user_has_weapon( id, CSW_HEGRENADE ) ) { ColorChat( id, GREEN, "%s Ai deja acest item!", g_szTag ); set_task( 0.3, "ShowShopMenu", id ); return 1; } else { fm_give_item( id, "weapon_hegrenade" ); ColorChat( id, GREEN, "%s Ti-ai cumparat o grenada HE^x01.", g_szTag ); fm_set_user_money( id, Money ); return 1; } } case 6: { // FROST NADE new CostFb = get_pcvar_num( gCvarCostFrostNade ); new Money = fm_get_user_money( id ) - CostFb; if( Money < 0 ) { ColorChat( id, GREEN, "%s Mai ai nevoie de^x03 %i^x01 $ pentru a cumpara o grenada frost !", g_szTag, CostFb - fm_get_user_money( id ) ); set_task( 0.3, "ShowShopMenu", id ); return 1; } else if( user_has_weapon( id, CSW_FLASHBANG ) ) { ColorChat( id, GREEN, "%s Ai deja acest item!", g_szTag ); set_task( 0.3, "ShowShopMenu", id ); return 1; } else { fm_give_item( id, "weapon_flashbang" ); ColorChat( id, GREEN, "%s Ti-ai cumparat o grenada frost^x01.", g_szTag ); fm_set_user_money( id, Money ); return 1; } } case 7: { // x2 DMG new CostMultiDmg = get_pcvar_num( gCvarCostMultiDmg ); new Money = fm_get_user_money( id ) - CostMultiDmg; if( Money < 0 ) { ColorChat( id, GREEN, "%s Mai ai nevoie de^x03 %i^x01 $ pentru a cumpara dublu dmg!", g_szTag, CostMultiDmg - fm_get_user_money( id ) ); set_task( 0.3, "ShowShopMenu", id ); return 1; } else if( Dmg[ id ] ) { ColorChat( id, GREEN, "%s Ai deja acest item!", g_szTag ); set_task( 0.3, "ShowShopMenu", id ); return 1; } else { Dmg[ id ] = true; ColorChat( id, GREEN, "%s Acum dmg-ul tau este mai mare cu^x03 x2^x01.", g_szTag ); fm_set_user_money( id, Money ); return 1; } } case 8: { // UNLIMITED AMMO new CostAmmo = get_pcvar_num( gCvarCostUnAmmo ); new Golds = fm_get_user_money( id ) - CostAmmo; if( Golds < 0 ) { ColorChat( id, GREEN, "%s Mai ai nevoie de^x03 %i^x01 golds pentru a cumpara gloante inifite !", g_szTag, CostAmmo - fm_get_user_money( id ) ); set_task( 0.3, "ShowShopMenu", id ); return 1; } else if( UnlimitedAmmo[ id ] ) { ColorChat( id, GREEN, "%s Ai deja acest item!", g_szTag ); set_task( 0.3, "ShowShopMenu", id ); return 1; } else { UnlimitedAmmo[ id ] = true; ColorChat( id, GREEN, "%s Ai cumparat gloante infinite^x01.", g_szTag ); fm_set_user_money( id, Golds ); return 1; } } case 9: { // NO RECOIL new CostNoRecoil = get_pcvar_num( gCvarCostNoRecoil ); new Money = fm_get_user_money( id ) - CostNoRecoil; if( Money < 0 ) { ColorChat( id, GREEN, "%s Mai ai nevoie de^x03 %i^x01 $ pentru a cumpara no recoil !", g_szTag, CostNoRecoil - fm_get_user_money( id ) ); set_task( 0.3, "ShowShopMenu", id ); return 1; } else if( NoRecoil[ id ] ) { ColorChat( id, GREEN, "%s Ai deja acest item!", g_szTag ); set_task( 0.3, "ShowShopMenu", id ); return 1; } else { NoRecoil[ id ] = true; ColorChat( id, GREEN, "%s Ai cumparat no recoil. De acum tinta ta va fi fixa.", g_szTag ); fm_set_user_money( id, Money ); return 1; } } case 10: { // INFECT SELF new CostInfectSelf = get_pcvar_num( gCvarCostInfectSelf ); new Money = fm_get_user_money( id ) - CostInfectSelf; if( Money < 0 ) { ColorChat( id, GREEN, "%s Mai ai nevoie de^x03 %i^x01 $ pentru a te face zombie!", g_szTag, CostInfectSelf - fm_get_user_money( id ) ); set_task( 0.3, "ShowShopMenu", id ); return 1; } else if( is_user_zombie( id ) ) { ColorChat( id, GREEN, "%s Esti deja zombie!", g_szTag ); set_task( 0.3, "ShowShopMenu", id ); return 1; } else if( !game_started( ) ) { ColorChat( id, GREEN, "%s Jocul nu a inceput inca!", g_szTag ); set_task( 0.3, "ShowShopMenu", id ); return 1; } else { infect_user( id, 1 ); ColorChat( id, GREEN, "%s Tocmai ai devenit zombie^x01.", g_szTag ); fm_set_user_money( id, Money ); return 1; } } case 11: { // JETPACK new CostJetpack = get_pcvar_num( gCvarCostJetpack ); new Money = fm_get_user_money( id ) - CostJetpack; if( Money < 0 ) { ColorChat( id, GREEN, "%s Mai ai nevoie de^x03 %i^x01 $ pentru a cumpara jetpack !", g_szTag, CostJetpack - fm_get_user_money( id ) ); set_task( 0.3, "ShowShopMenu", id ); return 1; } else if( Jetpack[ id ] ) { ColorChat( id, GREEN, "%s Ai deja acest item!", g_szTag ); set_task( 0.3, "ShowShopMenu", id ); return 1; } else { emit_sound( id, CHAN_ITEM, JETPACK_SND, VOL_NORM, ATTN_NORM, 0, PITCH_NORM ); Jetpack[ id ] = true; ColorChat( id, GREEN, "%s Apasa pe tasta^x03 SPACE^x01 pentru a pune in miscare jetpack-ul.", g_szTag ); fm_set_user_money( id, Money ); return 1; } } } menu_destroy( szMenu ); return PLUGIN_HANDLED; } public ShowShopZombies( id ) { new szMenuName[ 64 ]; formatex( szMenuName, sizeof( szMenuName ) - 1, "\w%s^n\yYour Money:\r %i\w", NameShop, fm_get_user_money( id ) ); new iMenu = menu_create( szMenuName, "MenuHandlerZombies" ); new szBuffer[ MAX_ITEMS_ZOMBIE ][ 64 ]; new szBufferKey[ MAX_ITEMS_ZOMBIE - 1 ]; new iBufferKey = 1; if( get_user_health( id ) >= get_pcvar_num( gCvarZmMaxHealth ) ) { formatex( szBuffer[ 0 ], sizeof( szBuffer[ ] ) - 1, "\d%i Health\r - \w%i $", get_pcvar_num( gCvarZmHealth ), get_pcvar_num( gCvarCostZmHealth ) ); } else { formatex( szBuffer[ 0 ], sizeof( szBuffer[ ] ) - 1, "\y%i Health\r - \w%i $", get_pcvar_num( gCvarZmHealth ), get_pcvar_num( gCvarCostZmHealth ) ); } if( ZmNoClip[ id ] ) { formatex( szBuffer[ 1 ], sizeof( szBuffer[ ] ) - 1, "\dNo Clip\w(\y %0.1f sec\w )\r - \w%i $", get_pcvar_float( gCvarZmNoClipTime ), get_pcvar_num( gCvarCostZmNoClip ) ); } else { formatex( szBuffer[ 1 ], sizeof( szBuffer[ ] ) - 1, "\yNo Clip\w(\y %0.1f sec\w )\r - \w%i $", get_pcvar_float( gCvarZmNoClipTime ), get_pcvar_num( gCvarCostZmNoClip ) ); } formatex( szBuffer[ 2 ], sizeof( szBuffer[ ] ) - 1, "\yAntidote\r - \w%i $", get_pcvar_num( gCvarCostAntidote ) ); if( ZmLongJump[ id ] ) { formatex( szBuffer[ 3 ], sizeof( szBuffer[ ] ) - 1, "\dLong Jump\r - \w%i $", get_pcvar_num( gCvarCostZmLongJump ) ); } else { formatex( szBuffer[ 3 ], sizeof( szBuffer[ ] ) - 1, "\yLong Jump\r - \w%i $", get_pcvar_num( gCvarCostZmLongJump ) ); } for( new i = 0; i < MAX_ITEMS_ZOMBIE; i++ ) { formatex( szBufferKey, sizeof( szBufferKey ) -1, "%i", iBufferKey ); menu_additem( iMenu, szBuffer[ i ], szBufferKey, 0 ); iBufferKey++; } menu_setprop( iMenu, MPROP_EXITNAME, "\wExit" ); menu_display( id, iMenu, 0 ); return 1; } public MenuHandlerZombies( id, szMenu, szItem ) { if( szItem == MENU_EXIT ) { menu_destroy( szMenu ); return PLUGIN_HANDLED; } new szData[ 6 ], szName[ 64 ]; new iAccess, iCallBack; menu_item_getinfo( szMenu, szItem, iAccess, szData, charsmax( szData ), szName, charsmax( szName ), iCallBack ); new iKey = str_to_num( szData ); switch( iKey ) { case 1: { // HEALTH new CostZmHealth = get_pcvar_num( gCvarCostZmHealth ); new Money = fm_get_user_money( id ) - CostZmHealth; if( Money < 0 ) { ColorChat( id, GREEN, "%s Mai ai nevoie de^x03 %i^x01 $ pentru a cumpara viata in plus!", g_szTag, CostZmHealth - fm_get_user_money( id ) ); set_task( 0.3, "ShowShopMenu", id ); return 1; } else if( get_user_health( id ) >= get_pcvar_num( gCvarZmMaxHealth ) ) { ColorChat( id, GREEN, "%s Ai ajuns la numarul maxim de viata(^x04%i^x01).", g_szTag, get_pcvar_num( gCvarZmMaxHealth ) ); set_task( 0.3, "ShowShopMenu", id ); return 1; } else { set_user_health( id, get_user_health( id ) + get_pcvar_num( gCvarZmHealth ) ); message_begin( MSG_ONE, get_user_msgid( "ItemPickup" ), _, id ); write_string( "cross" ); write_byte( 255 ); write_byte( 0 ); write_byte( 0 ); message_end( ); ColorChat( id, GREEN, "%s Viata ta este acum cu^x03 %i^x01 mai mare.", g_szTag, get_pcvar_num( gCvarZmHealth ) ); fm_set_user_money( id, Money ); return 1; } } case 2: { // NO CLIP new CostZmNoClip = get_pcvar_num( gCvarCostZmNoClip ); new Golds = fm_get_user_money( id ) - CostZmNoClip; if( Golds < 0 ) { ColorChat( id, GREEN, "%s Mai ai nevoie de^x03 %i^x01 $ pentru a cumpara no clip!", g_szTag, CostZmNoClip - fm_get_user_money( id ) ); set_task( 0.3, "ShowShopMenu", id ); return 1; } else if( ZmNoClip[ id ] ) { ColorChat( id, GREEN, "%s Ai deja acest item!", g_szTag ); set_task( 0.3, "ShowShopMenu", id ); return 1; } else { ZmNoClip[ id ] = true; ColorChat( id, GREEN, "%s Acum poti trece prin pereti timp de^x03 %0.1f secunde^x01, apasand pe tasta^x03 X^x01.", g_szTag, get_pcvar_float( gCvarZmNoClipTime ) ); client_cmd( id, "bind x power" ); fm_set_user_money( id, Golds ); return 1; } } case 3: { // ANTIDOTE new CostAntidote = get_pcvar_num( gCvarCostAntidote ); new Money = fm_get_user_money( id ) - CostAntidote; if( Money < 0 ) { ColorChat( id, GREEN, "%s Mai ai nevoie de^x03 %i^x01 $ pentru a cumpara un antidot!", g_szTag, CostAntidote - fm_get_user_money( id ) ); set_task( 0.3, "ShowShopMenu", id ); return 1; } else if( !is_user_zombie( id ) ) { ColorChat( id, GREEN, "%s^x03 Nu esti zombie pentru a cumpara antidotul!", g_szTag ); set_task( 0.3, "ShowShopMenu", id ); return 1; } else { ColorChat( id, GREEN, "%s Te-ai dezinfectat cu succes! Primesti gratis^x03 M4a1^x01 +^x03 Deagle^x01.", g_szTag ); set_user_human( id ); fm_set_user_money( id, Money ); return 1; } } case 4: { // LONG JUMP new CostZmLJ = get_pcvar_num( gCvarCostZmLongJump ); new Money = fm_get_user_money( id ) - CostZmLJ; if( Money < 0 ) { ColorChat( id, GREEN, "%s Mai ai nevoie de^x03 %i^x01 $ pentru a cumpara long jump!", g_szTag, CostZmLJ - fm_get_user_money( id ) ); set_task( 0.3, "ShowShopMenu", id ); return 1; } else if( ZmLongJump[ id ] ) { ColorChat( id, GREEN, "%s Ai deja acest item!", g_szTag ); set_task( 0.3, "ShowShopMenu", id ); return 1; } else { ZmLongJump[ id ] = true; message_begin( MSG_ONE, get_user_msgid( "ItemPickup" ), _, id ); write_string( "item_longjump" ); message_end( ); message_begin( MSG_ONE, get_user_msgid( "StatusIcon" ), { 0, 0, 0 }, id ); write_byte( 1 ); write_string( "item_longjump" ); write_byte( 255 ); write_byte( 148 ); write_byte( 0 ); message_end( ); ColorChat( id, GREEN, "%s Apasa^x03 SPACE^x01 +^x03 CTRL^x01 pentru a executa o saritura in lungime.", g_szTag ); fm_set_user_money( id, Money ); return 1; } } } menu_destroy( szMenu ); return PLUGIN_HANDLED; } public RemoveAllItemsHuman( id ) { if( Dmg[ id ] ) Dmg[ id ] = false; if( Speed[ id ] ) Speed[ id ] = false; if( Gravity[ id ] ) Gravity[ id ] = false; if( UnlimitedAmmo[ id ] ) UnlimitedAmmo[ id ] = false; if( NoRecoil[ id ] ) NoRecoil[ id ] = false; if( Jetpack[ id ] ) Jetpack[ id ] = false; } public RemoveAllItemsZombie( id ) { if( ZmNoClip[ id ] ) ZmNoClip[ id ] = false; if( ZmLongJump[ id ] ) ZmLongJump[ id ] = false; } public ClCmdUsePower( id ) { if( !is_user_alive( id ) || !ZmNoClip[ id ] ) return 1; static Float:gametime; gametime = get_gametime( ); if( gametime - get_pcvar_float( gCvarZmNoClipCountdown ) > g_fCooldown[ id ] ) { new iTeam = get_user_team( id ); if( 1 <= iTeam <= 2 ) set_task( 0.1, "NoClip", id ); g_fCooldown[ id ] = gametime; } else { ColorChat( id, GREEN, "%s Puterea se incarca in^x03 %.1f^x01 secunde !", g_szTag, get_pcvar_float( gCvarZmNoClipCountdown ) - ( gametime - g_fCooldown[ id ] ) ); } return 1; } public NoClip( id ) { fm_set_user_noclip( id, 1 ); set_task( get_pcvar_float( gCvarZmNoClipTime ), "stop_noclip", id ); } public stop_noclip( id ) { fm_set_user_noclip( id, 0 ); ColorChat( id, GREEN, "%s Asteapta inca^x03 %.1f^x01 secunde ca sa-ti poti folosi puterea din nou !", g_szTag, get_pcvar_float( gCvarZmNoClipCountdown ) ); } stock set_user_human( id ) { cure_user( id ); RemoveAllItemsZombie( id ); set_user_gnvision( id, 0 ); set_user_health( id, 100 ); set_user_armor( id, 0 ); cs_set_user_team( id, CS_TEAM_CT ); fm_cs_reset_user_model( id ); fm_give_item( id, "weapon_m4a1" ); fm_give_item( id, "weapon_deagle" ); } /*public remove_user_ngv( id ) { new iNvgs = get_pdata_int( id, OFFSET_NVGOGGLES, 5 ); if( !iNvgs ) return; if( iNvgs & ( 1<<8 ) ) { emit_sound( id, CHAN_ITEM, "items/nvg_off.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM ); emessage_begin( MSG_ONE, get_user_msgid( "NVGToggle" ), _, id ); ewrite_byte( 0 ); emessage_end( ); } set_pdata_int( id, OFFSET_NVGOGGLES, 0, 5 ); }*/ set_user_gnvision( id, toggle ) { emit_sound( id, CHAN_ITEM, "items/nvg_off.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM ); message_begin( MSG_ONE, get_user_msgid( "NVGToggle" ), _, id ); write_byte( toggle ); message_end( ); } stock fm_set_user_money( id, money, flash = 1 ) { set_pdata_int( id, OFFSET_CSMONEY, money, OFFSET_LINUX ); message_begin( MSG_ONE, get_user_msgid( "Money" ), { 0, 0, 0 }, id ); write_long( money ); write_byte( flash ); message_end( ); } stock fm_give_item( index, const item[ ] ) { if( !equal( item, "weapon_", 7 ) && !equal( item, "ammo_", 5 ) && !equal( item, "item_", 5 ) && !equal( item, "tf_weapon_", 10 ) ) return 0; new ent = fm_create_entity( item ); if( !pev_valid( ent ) ) return 0; new Float:fOrigin[ 3 ]; pev( index, pev_origin, fOrigin ); set_pev( ent, pev_origin, fOrigin ); set_pev( ent, pev_spawnflags, pev( ent, pev_spawnflags ) | SF_NORESPAWN ); dllfunc( DLLFunc_Spawn, ent ); new save = pev( ent, pev_solid ); dllfunc( DLLFunc_Touch, ent, index ); if( pev( ent, pev_solid ) != save ) return ent; engfunc( EngFunc_RemoveEntity, ent ); return -1; } stock fm_create_entity( const classname[ ] ) return engfunc( EngFunc_CreateNamedEntity, engfunc( EngFunc_AllocString, classname ) ); stock fm_get_speed( iEntity ) { new Float:fVelocity[ 3 ]; pev( iEntity, pev_velocity, fVelocity ); return floatround( vector_length( fVelocity ) ); } stock fm_set_user_noclip( index, noclip = 0 ) { set_pev( index, pev_movetype, noclip == 1 ? MOVETYPE_NOCLIP : MOVETYPE_WALK ); return 1; } stock fm_set_user_velocity( iEntity, const Float:fVector[ 3 ] ) { set_pev( iEntity, pev_velocity, fVector ); return 1; } stock fm_set_user_maxspeed( id, Float:fSpeed = -1.0 ) { engfunc(EngFunc_SetClientMaxspeed, id, fSpeed ); set_pev( id, pev_maxspeed, fSpeed ); return 1; } stock Float:fm_get_user_maxspeed( id ) { new Float:fSpeed; pev( id, pev_maxspeed, fSpeed ); return fSpeed; } stock fm_set_user_team( index, team, update = 1 ) { set_pdata_int( index, 114, team ); if( update ) { emessage_begin( MSG_ALL, get_user_msgid( "TeamInfo" ) ); ewrite_byte( index ); ewrite_string( g_teaminfo[ team ] ); emessage_end( ); } return 1; } stock fm_cs_reset_user_model( id ) { if( pev_valid( id ) != 2 ) return; switch( cs_get_user_team( id ) ) { case CS_TEAM_T: set_pdata_int( id, OFFSET_MODELINDEX, engfunc( EngFunc_ModelIndex, "models/player/terror/terror.mdl" ), 5 ); case CS_TEAM_CT: set_pdata_int( id, OFFSET_MODELINDEX, engfunc( EngFunc_ModelIndex, "models/player/urban/urban.mdl" ), 5 ); } } stock fm_set_user_bpammo( id, szWeapon, Amount ) { static iOffset; switch( szWeapon ) { case CSW_AWP: iOffset = OFFSET_AMMO_338MAGNUM case CSW_SCOUT, CSW_AK47, CSW_G3SG1: iOffset = OFFSET_AMMO_762NATO case CSW_M249: iOffset = OFFSET_AMMO_556NATOBOX case CSW_FAMAS, CSW_M4A1, CSW_AUG, CSW_SG550, CSW_GALI, CSW_SG552: iOffset = OFFSET_AMMO_556NATO case CSW_M3, CSW_XM1014: iOffset = OFFSET_AMMO_BUCKSHOT case CSW_USP, CSW_UMP45, CSW_MAC10: iOffset = OFFSET_AMMO_45ACP case CSW_FIVESEVEN, CSW_P90: iOffset = OFFSET_AMMO_57MM case CSW_DEAGLE: iOffset = OFFSET_AMMO_50AE case CSW_P228: iOffset = OFFSET_AMMO_357SIG case CSW_GLOCK18, CSW_TMP, CSW_ELITE, CSW_MP5NAVY: iOffset = OFFSET_AMMO_9MM default: iOffset = 0 } if( iOffset ) set_pdata_int( id, iOffset, Amount ); return 1; } stock fm_set_user_gravity( index, Float:gravity = 1.0 ) { set_pev( index, pev_gravity, gravity ); return 1; } /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1066\\ f0\\ fs16 \n\\ par } */