Raised This Month: $ Target: $400
 0% 

[L4D2] Weapons Skins RNG [v1.1.1 | 05-February-2024]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Plugin ID:
7307
Plugin Version:
1.1.1
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    555 
    Plugin Description:
    Applies random skins to spawned weapons
    Old 09-29-2020 , 11:10   [L4D2] Weapons Skins RNG [v1.1.1 | 05-February-2024]
    Reply With Quote #1

    L4D2 ONLY

    Description

    With the L4D2 Last Stand update, some of the new things brought are new skins for weapons (e.g.: golden crowbar).

    This plugin applies random skins to spawned weapons.

    Features
    • Applies a random skin to weapon entities on spawn.
    • Allows equipping weapons with the same skin from the spawner entities. (e.g.: weapon_rifle_spawn)
    • Allows configuring which weapons should have RNG skin.
    • Ignore weapons that already have a skin different than default.

    Preview



    Note: This video is not mine. (Credits: Lucarbuncle)



    Cvars

    A configuration file named "l4d2_wskin_rng.cfg" will automatically be created for you upon the first run in the "\cfg\sourcemod\" folder.

    PHP Code:
    // Weapon skin RNG for Auto Shotgun.
    // 0 = OFF, 1 = ON.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d2_wskin_rng_auto_shotgun "1"

    // Weapon skin RNG for Cricket Bat melee.
    // 0 = OFF, 1 = ON.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d2_wskin_rng_cricket_bat "1"

    // Weapon skin RNG for Crowbar melee.
    // 0 = OFF, 1 = ON.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d2_wskin_rng_crowbar "1"

    // Enable/Disable the plugin.
    // Note: Enabling this may glitch some plugins that checks the gascan skin to detect if is a scavenge one.
    // 0 = Disable, 1 = Enable.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d2_wskin_rng_enable "1"

    // Weapon skin RNG for Gascan.
    // 0 = OFF, 1 = ON.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d2_wskin_rng_gascan "1"

    // Weapon skin RNG for Hunting Rifle.
    // 0 = OFF, 1 = ON.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d2_wskin_rng_hunting_rifle "1"

    // Ignore weapons that already have a skin different than default.
    // 0 = OFF, 1 = ON.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d2_wskin_rng_ignore_skin "1"

    // Weapon skin RNG for Pistol Magnum.
    // 0 = OFF, 1 = ON.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d2_wskin_rng_pistol_magnum "1"

    // Weapon skin RNG for Pump Shotgun.
    // 0 = OFF, 1 = ON.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d2_wskin_rng_pump_shotgun "1"

    // Weapon skin RNG for AK47 Rifle.
    // 0 = OFF, 1 = ON.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d2_wskin_rng_rifle_ak47 "1"

    // Weapon skin RNG for M16 Rifle.
    // 0 = OFF, 1 = ON.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d2_wskin_rng_rifle_m16 "1"

    // Weapon skin RNG for Chrome Shotgun.
    // 0 = OFF, 1 = ON.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d2_wskin_rng_shotgun_chrome "1"

    // Weapon skin RNG for SMG Uzi.
    // 0 = OFF, 1 = ON.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d2_wskin_rng_smg_uzi "1"

    // Weapon skin RNG for Silenced SMG.
    // 0 = OFF, 1 = ON.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d2_wskin_rng_smg_silenced "1" 
    Admin Commands
    • sm_wskin_rng => Scramble the weapon skins randomly in real time. (z flag required)
    • sm_print_cvars_l4d2_wskin_rng => Print the plugin related cvars and their respective values to the console. (z flag required)

    Change Log

    Spoiler


    Notes
    • The skin change was achieved by changing the weapon "m_nSkin" netprop value.
    • For spawner entities the "m_nWeaponSkin" is also changed to the same value.
    • If the map, by default, changes the skin of a weapon, this plugin won't prevent it.
    • When the weapon is already equipped (active) I had to apply the skin also to the "m_hViewModel" netprop, otherwise there is some delay on skins changes.
    • Not all weapons have new skins and some aren't so different from the original one.
    • The currently supported weapons are:
      Melees: Crowbar, Cricket Bat
      Pistols: Magnum
      SMGs: Uzi; Silenced
      Shotguns: Pump; Chrome; Auto
      Rifles: M16; AK47
      Sniper: Hunting Rifle
      Gascan
    • These weapons have 2 new skins: Magnum; M16; AK47, the others just 1.
    • Total of 14 new skins from 11 weapons.
    • The gas can skin isn't affected by this plugin.
    • By now, 29-September-2020, there are no more skins available.
    • The plugin may not work properly for clients that use addons to change the weapon appearance.
    • Enabling gascan RNG skin may glitch some plugins that check the skin to detect if is a scavenge one.
    • I don't know if it conflicts with the "Golden Crowbar" achievement.

    To Do
    • Create a config to select the % chance to apply a different skin.

    Thank you!
    • Alex Alcalá - for testing in his server and reporting some bugs.
    • Tonblader - for testing in his server and reporting some bugs.
    • larrybrains - for requesting a cvar to control which weapons should RNG.
    • Krufftys Killers - for reporting an issue.
    • TrevorSoldier - for requesting the gascan skin.
    • Toranks - for reporting gascan skin not working on pickup.
    • ryzewash - for reporting skins not working on prop_physics gascans and for the snippet code to fix gascan skin on pickup.
    • HarryPotter - for reporting errors and requesting a cvar to ignore weapons with skin.

    Related Plugins

    Post Reply
    • Any feedback, bug reports, fixes, improvements, translations or suggestions for the plugin are welcome.

    Installation
    • Put the "l4d2_wskin_rng.smx" file (click Get Plugin) in your "\addons\sourcemod\plugins\" folder.
    Attached Files
    File Type: sp Get Plugin or Get Source (l4d2_wskin_rng.sp - 212 views - 28.3 KB)
    __________________

    Last edited by Marttt; 02-05-2024 at 10:13.
    Marttt is offline
     



    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 23:29.


    Powered by vBulletin®
    Copyright ©2000 - 2024, vBulletin Solutions, Inc.
    Theme made by Freecode