Monthly Target: $400 Donations: $14
 3% 

[CS:GO] Always Weapon Skins [2.2.2 :: 2015.08.22]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Plugin ID:
4135
Plugin Version:
2.2.2
Plugin Category:
Fun Stuff
Plugin Game:
Counter-Strike: GO
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Old 03-18-2014 , 07:52   [CS:GO] Always Weapon Skins [2.2.2 :: 2015.08.22]
    Reply With Quote #1

    [CS:GO] Always Weapon Skins 2.2.2 [updated: 2015.08.22]
    This plugin now supports Last Request for the Hosties jail break mod. Players in last request will no longer have their weapons replaced. - Requested by The1Speck and Bchewy.
    Description
    A Useful plugin for servers that have shops/markets that allow players to purchase weapons from the opposite team. This plugin allows players who purchase weapons for the opposite team, to still receive their weapon skin based on their CS:GO weapon layout. So regardless of the team. Players always get their weapon skins. Hence the name. Always Weapon Skin
    Installation instructions
    Install the latest version of DHooks
    Copy the contents of the attached zip into your "/csgo/" directory
    Configuration (convars)
    aws_enable - Enables plugin
    1 - Enabled (default)
    0 - Disabled
    aws_skipmapweapons - Disables replacement of map weapons
    1 - Enabled
    0 - Disabled (default)
    aws_skipnamedweapons - Disables replacement of map weapons which have names (special weapons)
    1 - Enabled (default)
    0 - Disabled
    aws_debugmessages - Display debug messages in client console
    1 - Enabled
    0 - Disabled (default)

    Spoiler

    Updates
    Version 1.1
    - Using SetEntProp with m_iTeamNum instead of full teamswitch
    - This is much more efficient as an actual team switch is not taking place
    - Bots don't process weapon respawning

    Version 1.2
    - Added detection for spawning of weapon_m4a1_silencer, weapon_usp_silencer and weapon_cz75a

    Version 1.3
    - Fixed error spewing in console about an invalid entity index

    Version 1.5
    - Using an improved method to detect if weapons need to be respawned
    - Fixed crashing on Sourcemod 1.6.1

    Version 1.6
    - Added cvar 'aws_alwaysreplace' to allow replacing of all map weapons

    Version 1.7
    - Added cvar 'aws_enable' to disable/enable plugin
    - Added cvar 'aws_delay' which delays the weapon respawn
    - Added support for sm_hosties - Players in last request wont have their weapons replaced

    Version 1.8
    - Added cvar 'aws_skipnamedweapons' to disable replacement of special map weapons
    - Weapon information is now stored in a Trie (Thanks Root_)

    Version 1.9
    - Added cvar 'aws_debugmessages' to enable/disable debug messages
    - Cleaned up code (readability) and added more comments

    Version 1.9.1
    - Recompiled using the Sourcemod 1.7.1 compiler

    Version 2.0.0 (Requires GNI 1.0.4)
    - Rebuilt using DHooks and GNI resulting in much better performance

    Version 2.0.1 (Requires GNI 1.0.6)
    - Compatibility update to stop paintkit plugin crashes

    Version 2.0.3 (Requires GNI 1.0.8)
    - Fixed dependency linking to GNI
    - Improved hook processing

    Version 2.0.4 (Requires GNI 1.0.8)
    - Fixed map weapon m4a1-s not replacing correctly

    Version 2.2.2
    - Merged GiveNamedItemEx (removed dependency)
    - Fixed crashes on Linux
    - Added cvar aws_skipmapweapons
    - Moved to transitional syntax
    Important Upgrade Information:
    Install the latest version of DHooks!
    Attached Files
    File Type: zip alwaysweaponskins-1.6.zip (11.3 KB, 574 views)
    File Type: zip alwaysweaponskins-1.7.zip (17.3 KB, 245 views)
    File Type: zip alwaysweaponskins-1.8.zip (17.0 KB, 162 views)
    File Type: zip alwaysweaponskins-1.9.zip (17.5 KB, 965 views)
    File Type: zip alwaysweaponskins-1.9.1.zip (18.4 KB, 1268 views)
    File Type: zip alwaysweaponskins-2.0.zip (15.5 KB, 62 views)
    File Type: zip alwaysweaponskins-2.0.1.zip (15.7 KB, 382 views)
    File Type: zip alwaysweaponskins-2.0.3.zip (15.6 KB, 259 views)
    File Type: zip alwaysweaponskins-2.0.4.zip (16.3 KB, 389 views)
    File Type: zip alwaysweaponskins-2.2.2.zip (23.1 KB, 171 views)

    Last edited by Neuro Toxin; 08-22-2015 at 02:23. Reason: Updated post detail
    Neuro Toxin is offline
    Dr!fter
    SourceMod Developer
    Join Date: Mar 2007
    Old 03-18-2014 , 13:09   Re: [CS:GO] Always Weapon Skins [1.0 :: 18.03.2014]
    Reply With Quote #2

    Or just use https://forums.alliedmods.net/showthread.php?t=236199

    Last edited by Dr!fter; 03-18-2014 at 13:09.
    Dr!fter is offline
    Neuro Toxin
    Veteran Member
    Join Date: Oct 2013
    Location: { closing the void; }
    Old 03-18-2014 , 20:39   Re: [CS:GO] Always Weapon Skins [1.0 :: 18.03.2014]
    Reply With Quote #3

    Hello Dr!fter,

    Nice extension! Although it's currently not working for Windows servers.

    Last edited by Neuro Toxin; 03-18-2014 at 20:55.
    Neuro Toxin is offline
    Neuro Toxin
    Veteran Member
    Join Date: Oct 2013
    Location: { closing the void; }
    Old 03-18-2014 , 20:39   Re: [CS:GO] Always Weapon Skins [1.0 :: 18.03.2014]
    Reply With Quote #4

    • Update 1.1
      • Using SetEntProp with m_iTeamNum instead of full teamswitch
        • This is much more efficient as an actual team switch is not taking place
      • Bots don't process weapon respawning

    Last edited by Neuro Toxin; 03-18-2014 at 20:41.
    Neuro Toxin is offline
    waltercl
    Member
    Join Date: Jun 2011
    Old 03-20-2014 , 01:51   Re: [CS:GO] Always Weapon Skins [1.1 :: 19.03.2014]
    Reply With Quote #5

    Just tested and seems to work just fine on a Windows server. Also it does not appear to block Knife Shop so you can get any of the knives regardless of what is in your loadout. We have a modified Buy plugin that was made for CSS and is limited to just a few weapons. The one thing that's been requested is the ability to buy the M4a1-S as a T. We'll see if we can modify the Buy Plugin a little more and make that happen. I'm going to assume that if we are successful at that then if you have an M4a1-S in your loadout then only that custom skin would transfer if on the T team? Or would you as a T be able to buy either the M4a4 or the M4a1S and both would have your custom skin?

    No one has tested this yet with a StatTrak so I don't know if StatTrak will work if you are using a weapon from the other team. Has anyone else tested this?

    Last edited by waltercl; 03-20-2014 at 01:55.
    waltercl is offline
    Neuro Toxin
    Veteran Member
    Join Date: Oct 2013
    Location: { closing the void; }
    Old 03-20-2014 , 07:56   Re: [CS:GO] Always Weapon Skins [1.2 :: 19.03.2014]
    Reply With Quote #6

    • Update 1.2
      • Added detection for spawning of weapon_m4a1_silencer, weapon_usp_silencer and weapon_cz75a
    Neuro Toxin is offline
    Neuro Toxin
    Veteran Member
    Join Date: Oct 2013
    Location: { closing the void; }
    Old 03-20-2014 , 08:11   Re: [CS:GO] Always Weapon Skins [1.2 :: 19.03.2014]
    Reply With Quote #7

    Hello waltercl,

    Quote:
    The one thing that's been requested is the ability to buy the M4a1-S as a T
    The updated plugin should be able to do this for you now. You might need to update your buy plugin to include options to purchase:

    Code:
    weapon_m4a1_silencer
    weapon_usp_silencer
    weapon_cz75a
    Eg. You would have an option for weapon_m4a1 and an option for m4a1_silencer.

    Quote:
    Or would you as a T be able to buy either the M4a4 or the M4a1S and both would have your custom skin?
    Ok. A little more complicated in the end. If your buy plugin spawns a weapon_m4a1 for a player on the Terrorist team while the player has a silenced version of the skin in their layout. They will receive an unskinned m4a1. However, if your plugin spawns a weapon_m4a1_silencer. Then the player will receive their skinned silenced weapon.

    Quote:
    No one has tested this yet with a StatTrak
    I tested this just before. A stat track weapon will spawn correctly with the correct stat tracking functionality.

    Last edited by Neuro Toxin; 03-20-2014 at 08:13.
    Neuro Toxin is offline
    waltercl
    Member
    Join Date: Jun 2011
    Old 03-21-2014 , 03:13   Re: [CS:GO] Always Weapon Skins [1.2 :: 20.03.2014]
    Reply With Quote #8

    Thanks for the info and updates. I'll see if I can alter the buy program to take advantage of the update you've done.
    waltercl is offline
    waltercl
    Member
    Join Date: Jun 2011
    Old 03-21-2014 , 04:20   Re: [CS:GO] Always Weapon Skins [1.2 :: 20.03.2014]
    Reply With Quote #9

    We're using a modified buy program from CSS, and it looks like the changes I'd need to make are with a config file. The layout of the config file is below:

    "CSSBuy_Weapons"
    {
    //Note: Any item not defined here will not be accessible via sm_buying_commands
    // - Not Defined (But Working): weapon_knife, weapon_c4

    //"item"
    //{
    // "slot" - The physical slot the item will occupy.
    // "-4" = Nightvision Goggles
    // "-3" = Defuser
    // "-2" = Vest & Helm
    // "-1" = Vest
    // "0" = Primary
    // "1" = Secondary
    // "2" = Knife
    // "3" = Grenade
    // "4" = C4
    // "team" - The required team to purchase the item.
    // "0" = The item is not restricted
    // "1" = The item cannot be purchased
    // "2" = Only Terrorists may purchase the item
    // "3" = Only Counter-Terrorists may purchase the item
    // "cost" - The price of the item. (-1 = Default, 0 = Free, # = Price)
    // The default option for c4 and knife will always return 0; use a hardcoded value
    // vest, vesthelm, and nvgs must either be free, or return the default value.
    // "index" - The corresponding index for CSWeaponID, located in cstrike.inc
    // The defuser occupies the Shield slot, mainly for shittles and giggles.
    // "orig" - The original team the weapon belongs to, this value is not to be changed!
    // "menu" - The menu category the item is classified into
    // Categories are defined first come first serve, so order appropriately.
    // "flag" - The optional admin flag to check for to allow the weapon to be purchased
    //}





    //Rifles
    "ak47"
    {
    "slot" "0"
    "team" "0"
    "cost" "-1"
    "index" "27"
    "orig" "2"
    "menu" "Rifles"
    "flag" "o"
    }
    "m4a4"
    {
    "slot" "0"
    "team" "0"
    "cost" "-1"
    "index" "21"
    "orig" "3"
    "menu" "Rifles"
    "flag" "o"
    }
    "sg556"
    {
    "slot" "0"
    "team" "0"
    "cost" "-1"
    "index" "48"
    "orig" "2"
    "menu" "Rifles"
    "flag" "o"
    }
    "aug"
    {
    "slot" "0"
    "team" "0"
    "cost" "-1"
    "index" "8"
    "orig" "3"
    "menu" "Rifles"
    "flag" "o"
    }
    "awp"
    {
    "slot" "0"
    "team" "1"
    "cost" "-1"
    "index" "17"
    "orig" "0"
    "menu" "Rifles"
    "flag" ""
    }


    }

    So it looks like I need to find the index value of the M4a1-S to make this work. Any idea where to get that?
    waltercl is offline
    Neuro Toxin
    Veteran Member
    Join Date: Oct 2013
    Location: { closing the void; }
    Old 03-21-2014 , 04:53   Re: [CS:GO] Always Weapon Skins [1.3 :: 21.03.2014]
    Reply With Quote #10

    Hello waltercl,

    Quote:
    I need to find the index value of the M4a1-S to make this work. Any idea where to get that?
    You can try the follow indexes.

    60 weapon_m4a1_silencer
    61 weapon_usp_silencer
    63 weapon_cz75a

    PS...
    • Update 1.3
      • Fixed error spewing in console about an invalid entity index
    Neuro Toxin is offline
    Reply


    Thread Tools
    Display Modes

    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 10:49.


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