RSSy MYGO.pl Opublikowano Grudzień 7, 2022 o 17:58 RSSy Udostępnij Opublikowano Grudzień 7, 2022 o 17:58 About Something I've always wanted, for my hard realism server. I still couldn't get "m_iExtraPrimaryAmmo" to work, weapon's backup ammo still changes when I actively drop weapon. After rewriting the plugin several times, I gave up on using it. So I used a separate thing to hold the backup ammo value. Feature list -Randomizes ammo range for weapon clips (when you first pick up a new weapon). -Randomizes a weapon's reserve ammo amount (when you first pick up a new weapon). -Drop a weapon with the same equip slot as the target weapon before picking up the weapon. Prevents weapon ammo from being refreshed(When approaching the weapon_spawn). Credits -Psykotik (Crasher_3637) Ammunition Variation Plugin. Gave me the idea to write this plugin. -Machine, dcx2, Electr0 /z, Senip, Shao, Zheldorg L4D2] Weapon Drop Plugin. Refer to their code to solve the unexpected "IN_USE" problem. -NoroHime [L4D & L4D2] Take Ammo From Previous Weapon Plugin. Learned from his plugin how to set the reserve ammo value, although mine now uses a separate ammo count. The most surprising thing is that I now know that the "smlib" library. :) [L4D & L4D2] HUD Hiddens Plugin. Learn how to use Forward "OnGameFrame". ConVar Spoiler PHP Code: // This file was auto-generated by SourceMod (v1.11.0.6906) // ConVars for plugin "l4d2_RandomAmmo.smx" // Enabled Debug Mode? // 0 or other value= Disabled, 1 = Enabled // If Enabled,Check in-game chat and server console output. // - // Default: "0" l4d2_AR_Debug "0" // Enable this plugins? // 0 or other value = Disabled, 1 = Enabled // All ConVar naming rule below follow: // l4d2_AM_SmgMin SMG(mac-10) Min Primary Ammo // l4d2_AM_SmgRMin SMG(mac-10) Min Reserved Ammo // - // Default: "0" l4d2_AR_Enabled "0" // Sync spare ammo every how many server frames? // Should not be less than the weapon's minimum reload time. // For a server tick rate of 20, the default will be to sync every 0.25s. // - // Default: "5" l4d2_AR_FrameCount "5" // The size of the array used to store weapon data, this determines the maximum number of weapon entities allowed for the plugin to work properly. // Do not set this value too large! If the plugin works, it probably doesn't need to be changed. // - // Default: "128" l4d2_AR_MaxSaveWeapon "128" // - // Default: "30" l4d2_RA_Ak47Max "30" // - // Default: "0" l4d2_RA_Ak47Min "0" // - // Default: "120" l4d2_RA_Ak47_RMax "120" // - // Default: "90" l4d2_RA_Ak47_RMin "90" // - // Default: "6" l4d2_RA_AutoMax "6" // - // Default: "4" l4d2_RA_AutoMin "4" // - // Default: "20" l4d2_RA_Auto_RMax "20" // - // Default: "12" l4d2_RA_Auto_RMin "12" // - // Default: "10" l4d2_RA_AwpMax "10" // - // Default: "1" l4d2_RA_AwpMin "1" // - // Default: "40" l4d2_RA_Awp_RMax "40" // - // Default: "20" l4d2_RA_Awp_RMin "20" // - // Default: "6" l4d2_RA_ChromeMax "6" // - // Default: "3" l4d2_RA_ChromeMin "3" // - // Default: "20" l4d2_RA_Chrome_RMax "20" // - // Default: "10" l4d2_RA_Chrome_RMin "10" // - // Default: "30" l4d2_RA_DesertMax "30" // - // Default: "15" l4d2_RA_DesertMin "15" // - // Default: "120" l4d2_RA_Desert_RMax "120" // - // Default: "90" l4d2_RA_Desert_RMin "90" // - // Default: "10" l4d2_RA_HuntingMax "10" // - // Default: "0" l4d2_RA_HuntingMin "0" // - // Default: "40" l4d2_RA_Hunting_RMax "40" // - // Default: "20" l4d2_RA_Hunting_RMin "20" // - // Default: "5" l4d2_RA_Luncher_RMax "5" // - // Default: "2" l4d2_RA_Luncher_RMin "2" // - // Default: "30" l4d2_RA_M16Max "30" // - // Default: "0" l4d2_RA_M16Min "0" // - // Default: "120" l4d2_RA_M16_RMax "120" // - // Default: "90" l4d2_RA_M16_RMin "90" // - // Default: "200" l4d2_RA_M60Max "200" // - // Default: "100" l4d2_RA_M60Min "100" // - // Default: "20" l4d2_RA_MilitaryMax "20" // - // Default: "0" l4d2_RA_MilitaryMin "0" // - // Default: "80" l4d2_RA_Military_RMax "80" // - // Default: "40" l4d2_RA_Military_RMin "40" // - // Default: "7" l4d2_RA_PumpMax "7" // - // Default: "0" l4d2_RA_PumpMin "0" // - // Default: "24" l4d2_RA_Pump_RMax "24" // - // Default: "10" l4d2_RA_Pump_RMin "10" // - // Default: "10" l4d2_RA_ScoutMax "10" // - // Default: "4" l4d2_RA_ScoutMin "4" // - // Default: "40" l4d2_RA_Scout_RMax "40" // - // Default: "20" l4d2_RA_Scout_RMin "20" // - // Default: "30" l4d2_RA_Sg552Max "30" // - // Default: "0" l4d2_RA_Sg552Min "0" // - // Default: "120" l4d2_RA_Sg552_RMax "120" // - // Default: "90" l4d2_RA_Sg552_RMin "90" // - // Default: "32" l4d2_RA_SmgMax "32" // - // Default: "24" l4d2_RA_SmgMin "24" // - // Default: "160" l4d2_RA_Smg_RMax "160" // - // Default: "96" l4d2_RA_Smg_RMin "96" // - // Default: "30" l4d2_RA_Smg_mp5Max "30" // - // Default: "10" l4d2_RA_Smg_mp5Min "10" // - // Default: "150" l4d2_RA_Smg_mp5_RMax "150" // - // Default: "90" l4d2_RA_Smg_mp5_RMin "90" // - // Default: "30" l4d2_RA_Smg_sMax "30" // - // Default: "0" l4d2_RA_Smg_sMin "0" // - // Default: "150" l4d2_RA_Smg_s_RMax "150" // - // Default: "90" l4d2_RA_Smg_s_RMin "90" // - // Default: "8" l4d2_RA_SpasMax "8" // - // Default: "0" l4d2_RA_SpasMin "0" // - // Default: "32" l4d2_RA_Spas_RMax "32" // - // Default: "0" l4d2_RA_Spas_RMin "0" Changelog Spoiler 1.0 (07-Dec-2022) - Initial release. Dependencies Left 4 DHooks Default premise of this plugin: Weapons are not infinite. @Earendil [L4D1 & L4D2] Weapon Amount Modifier If the weapons in the gun cabinet are infinite, or the shotgun is a problem, try my version. Make sure "l4d_weapon_amount_modifier.cfg" is configured to only allow a single weapon to spawn. Here is my configuration: Spoiler PHP Code: // This file was auto-generated by SourceMod (v1.11.0.6906) // ConVars for plugin "l4d_wam.smx" // Amount of adrenaline shots per spot // - // Default: "2" // Minimum: "0.000000" l4d_wam_adrenaline_amount "1" // Amount of defibrillators per spot // - // Default: "1" // Minimum: "0.000000" l4d_wam_defibrillator_amount "1" // 1 = Plugin on, 0 = Plugin off // - // Default: "1" // Minimum: "0.000000" // Maximum: "1.000000" l4d_wam_enabled "1" // Amount of explosive ammo packs per spot // - // Default: "1" // Minimum: "0.000000" l4d_wam_explosive_ammo_amount "1" // Amount of grenade launchers per spot // - // Default: "1" // Minimum: "0.000000" l4d_wam_grenade_launcher_amount "1" // Amount of incendiary ammo packs per spot // - // Default: "1" // Minimum: "0.000000" l4d_wam_incendiary_ammo_amount "1" // Amount of m60 rifles per spot // - // Default: "1" // Minimum: "0.000000" l4d_wam_m60_amount "1" // Amount of first aid kits per spot // - // Default: "2" // Minimum: "0.000000" l4d_wam_medkit_amount "1" // Amount of melee weapons per spot // - // Default: "1" // Minimum: "0.000000" l4d_wam_melee_amount "1" // Amount of molotovs per spot // - // Default: "1" // Minimum: "0.000000" l4d_wam_molotov_amount "1" // Amount of pain pills per spot // - // Default: "2" // Minimum: "0.000000" l4d_wam_pain_pills_amount "1" // Amount of pipe bombs per spot // - // Default: "1" // Minimum: "0.000000" l4d_wam_pipe_bomb_amount "1" // Amount of pistols per spot // - // Default: "9" // Minimum: "0.000000" l4d_wam_pistol_amount "1" // Amount of magnum pistols per spot // - // Default: "9" // Minimum: "0.000000" l4d_wam_pistol_magnum_amount "1" // Modify only weapon amounts when round starts. // This prevents modifying weapon amount created by other plugins in midgame. // - // Default: "1" // Minimum: "0.000000" // Maximum: "1.000000" l4d_wam_roundstart_only "1" // Amount of vomitjars per spot // - // Default: "1" // Minimum: "0.000000" l4d_wam_vomitjar_amount "1" // Amount of primary weapons per spot // - // Default: "9" // Minimum: "0.000000" l4d_wam_weapon_amount "1" Recommended Plugins [L4D2] Weapon Drop I haven't tested too much, recommend @Zheldorg's version,no problems so far. [L4D/L4D2] Reserve (Ammo) Control No problems. [L4D1/2]]Limited Ammo Piles Remake and [L4D & L4D2] Percentage Limited Ammo Pile The latter I haven't tested yet, but it would be a nice addition. :) Install Don't click "Get Plugin", this plugin requires left4dhooks. 1.Download "l4d2_RandomAmmo.smx" and put it in "../addons/sourcemod/plugins/". 2.Download "l4d2_RandomAmmo.cfg" and put it in "../left4dead2/cfg/sourcemod/". You need to modify the configuration file of the plugin (l4d2_RandomAmmo.cfg),Because the plugin is disabled by default. Attached Files l4d2_RandomAmmo.smx (15.8 KB) Get Plugin or Get Source (l4d2_RandomAmmo.sp - 30.1 KB) l4d2_RandomAmmo.cfg (3.9 KB) Wyświetl pełny artykuł Odnośnik do komentarza Udostępnij na innych stronach Więcej opcji udostępniania...
Rekomendowane odpowiedzi