Raised This Month: $51 Target: $400
 12% 

[L4D2] Weapons Skins Menu [v1.0.5 | 04-June-2021]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Plugin ID:
7308
Plugin Version:
1.0.5
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    5 
    Plugin Description:
    Opens a menu for the client to choose their own weapons skin
    Old 09-29-2020 , 11:47   [L4D2] Weapons Skins Menu [v1.0.5 | 04-June-2021]
    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 opens a menu for the client to choose their own weapon skin.

    Features
    • Menu to change the client's weapon skin (!wskin).
    • Store client preferences (cookies).
    • Intro message in the chat showing up that the !wskin is available as command.
    • Allow admins to get or set target weapon skins through commands. (!getskin / !setskin <value>)

    Preview



    Cvars

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

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

    // Allow cookies for storing client preferences.
    // 0 = OFF, 1 = ON.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d2_wskin_cookies "1"

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

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

    // Enable/Disable the plugin.
    // 0 = Disable, 1 = Enable.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d2_wskin_enable "1"

    // Weapon skin option for Gascan.
    // Note: Enabling this may glitch some plugins that check the gascan skin to detect if is a scavenge one.
    // 0 = OFF, 1 = ON.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d2_wskin_gascan "1"

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

    // Show intro message in chat this many seconds after a client joins.
    // 0 = OFF.
    // -
    // Default: "60.0"
    // Minimum: "0.000000"
    l4d2_wskin_intro "60.0"

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

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

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

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

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

    // Shows a different icon for equipped weapons in menu if sorted (l4d2_wskin_sort_equipped_first = "1").
    // 0 = OFF, 1 = ON.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d2_wskin_show_equipped_icon "1"

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

    // Weapon skin option for Silenced SMG.
    // 0 = OFF, 1 = ON.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d2_wskin_smg_silenced "1"

    // Equipped weapons appear first in the menu.
    // 0 = OFF, 1 = ON.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d2_wskin_sort_equipped_first "1" 
    Public Commands
    • sm_wskin => Opens a menu to select and configure the weapon skins.

    Admin Commands
    • sm_getwskin => Output to the chat the target skin/classname/model value of entities with "weapon_*" classname. (z flag required)
    • sm_setwskin => Set the target skin value of entities with "weapon_*" classname. Usage: sm_setwskin <value>. (z flag required)
    • sm_print_cvars_l4d2_wskin => Print the plugin related cvars and their respective values to the console. (z flag required)

    Change Log

    Spoiler


    Current Translations
    • en - English
    • es - Spanish
    • hu - Hungarian
    • pt - Brazilian Portuguese
    • pt_p - Portuguese
    • ru - Russian
    • ua - Ukrainian
    • chi - Simplified Chinese
    • zho - Traditional Chinese

    Known issues
    • The skin doesn't apply very well while on the third person (e.g. thirdpersonshoulder). You may have to swap weapons to see the changes.

    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.
    • 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 (shoving for example, updates the view model).
    • You can use "cl_viewmodelfovsurvivor 80" while in the first person to be able to see the whole weapon easier.
    • 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.
    • 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.
    • I don't know if it conflicts with the "Golden Crowbar" achievement.
    • Enabling gascan RNG skin may glitch some plugins that check the skin to detect if is a scavenge one.

    Thank you!

    Related Plugins

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

    Installation
    • Put the "l4d2_wskin.phrases.txt" file in your "\addons\sourcemod\translations\" folder.
    • Put the "l4d2_wskin.smx" file (click Get Plugin) in your "\addons\sourcemod\plugins\" folder.
    Attached Files
    File Type: txt l4d2_wskin.phrases.txt (2.7 KB, 707 views)
    File Type: sp Get Plugin or Get Source (l4d2_wskin.sp - 399 views - 46.7 KB)
    __________________

    Last edited by Marttt; 03-04-2023 at 17:36.
    Marttt is offline
    GoGetSomeSleep
    Senior Member
    Join Date: Dec 2018
    Location: Miami/Florida
    Old 09-29-2020 , 12:31   Re: [L4D2] Weapons Skins Menu
    Reply With Quote #2

    so this basicly give a golden skin for any weapon? like golden ak47?
    GoGetSomeSleep is offline
    Marttt
    Veteran Member
    Join Date: Jan 2019
    Location: Brazil
    Old 09-29-2020 , 12:33   Re: [L4D2] Weapons Skins Menu
    Reply With Quote #3

    No, there are (now) 14 new weapons skins, but only the crowbar has the "golden" appearence. e.g. the AK has one that is more darker. I will post some images soon.
    __________________
    Marttt is offline
    KasperH
    Senior Member
    Join Date: Apr 2016
    Location: Hungary
    Old 09-29-2020 , 13:07   Re: [L4D2] Weapons Skins Menu
    Reply With Quote #4

    Added Hungarian. (Updated 2020.10.02)

    Some chat announcement would be good.
    The second magnum skin looks cool, thanks for making this plugin.
    Attached Files
    File Type: txt l4d2_wskin.phrases.txt (2.6 KB, 282 views)
    __________________

    "I've Got You In My Sights!"

    Last edited by KasperH; 10-02-2020 at 13:52.
    KasperH is offline
    GoGetSomeSleep
    Senior Member
    Join Date: Dec 2018
    Location: Miami/Florida
    Old 09-29-2020 , 13:15   Re: [L4D2] Weapons Skins Menu
    Reply With Quote #5

    Will there be a version that automatically changes skins with a 50% chance without command and menu?
    GoGetSomeSleep is offline
    Marttt
    Veteran Member
    Join Date: Jan 2019
    Location: Brazil
    Old 09-29-2020 , 13:31   Re: [L4D2] Weapons Skins Menu
    Reply With Quote #6

    You can try my other related plugin [L4D2] Weapons Skins RNG which already does that, it applies the new skins to some spawned weapons.
    Is a initial release, may have some bugs and I didn't implement the % change cvars yet because is a bit complicated since there are too many variations by now, but I can check the requests.
    __________________

    Last edited by Marttt; 09-29-2020 at 13:35.
    Marttt is offline
    HarryPotter
    Veteran Member
    Join Date: Sep 2017
    Location: Taiwan, Asia
    Old 09-29-2020 , 14:38   Re: [L4D2] Weapons Skins Menu [v1.0.0 | 29-September-2020]
    Reply With Quote #7

    traditional + Simplified Chinese (chi+zho)
    Attached Files
    File Type: txt l4d2_wskin.phrases.txt (1.8 KB, 337 views)
    __________________

    Last edited by HarryPotter; 09-29-2020 at 14:44.
    HarryPotter is offline
    HarryPotter
    Veteran Member
    Join Date: Sep 2017
    Location: Taiwan, Asia
    Old 09-29-2020 , 14:52   Re: [L4D2] Weapons Skins Menu [v1.0.0 | 29-September-2020]
    Reply With Quote #8

    It seems that this update not bad at all
    Surprise they add new skins we don't know
    __________________

    Last edited by HarryPotter; 09-29-2020 at 14:53.
    HarryPotter is offline
    Tank Rush
    Senior Member
    Join Date: May 2019
    Location: Argentina
    Old 10-01-2020 , 22:04   Re: [L4D2] Weapons Skins Menu [v1.0.1 | 30-September-2020]
    Reply With Quote #9

    It looks great, I'll try this later.
    __________________
    Sorry i don't speak english very well

    --->My name is Source and I'm on Steam<---
    Discord: Source#9382
    Tank Rush is offline
    Psyk0tik
    Veteran Member
    Join Date: May 2012
    Location: Homeless
    Old 10-05-2020 , 22:52   Re: [L4D2] Weapons Skins Menu [v1.0.1 | 30-September-2020]
    Reply With Quote #10

    The sm_setwskin command is using the wrong command callback. It should be using CmdSetWeaponSkin not CmdGetWeaponSkin.

    Line 140:
    PHP Code:
    RegAdminCmd("sm_setwskin"CmdGetWeaponSkinADMFLAG_ROOT"Set the target skin value of entities with \"weapon_*\" classname. Usage: !setwskin <value>."); 
    __________________
    Psyk0tik is offline
    Reply



    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 16:46.


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