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

[CS:GO] Always Weapon Skins [2.2.8 :: 2018.12.09]


Post New Thread Reply   
 
Thread Tools Display Modes
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 03-21-2014 , 05:30   Re: [CS:GO] Always Weapon Skins [1.3 :: 21.03.2014]
Reply With Quote #11

Actually.

Looking at: cstrike.inc.

Their are no indexes for the replacement weapons. Can you please show me the call to create the weapon in the plugin.

It might be something like: GivePlayerItem(client, classname);

Last edited by Neuro Toxin; 03-21-2014 at 05:31.
Neuro Toxin is offline
waltercl
Member
Join Date: Jun 2011
Old 03-22-2014 , 03:15   Re: [CS:GO] Always Weapon Skins [1.3 :: 21.03.2014]
Reply With Quote #12

edit: sending code via pm

Last edited by waltercl; 03-22-2014 at 14:42.
waltercl is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 03-22-2014 , 05:12   Re: [CS:GO] Always Weapon Skins [1.3 :: 21.03.2014]
Reply With Quote #13

Hello waltercl,

After close inspection. The weapon argument for CS_OnBuyCommand is what contains the weapon that is going to be purchased/reskinned.

If CS_OnBuyCommand receives "weapon_m4a1_silencer" in the weapon argument. If the player also has their slot layout with a weapon_m4a1_silencer skin. Then it will replace correctly for the player.

If CS_OnBuyCommand receives"weapon_m4a1". If the player has a silencer weapon in their layout. They receive a plain old m4a1.

You need to make sure that what is causing the purchase (plugin?), is able to pass "weapon_m4a1_silencer" or "weapon_m4a1" to the CS_OnBuyCommand function.

Maybe if you could PM your plugin I can dive a little deeper for you.
Neuro Toxin is offline
waltercl
Member
Join Date: Jun 2011
Old 03-22-2014 , 14:02   Re: [CS:GO] Always Weapon Skins [1.3 :: 21.03.2014]
Reply With Quote #14

Thanks a lot for looking into this. I'll PM you the code for the plugin in about 30 minutes.
waltercl is offline
waltercl
Member
Join Date: Jun 2011
Old 03-22-2014 , 16:42   Re: [CS:GO] Always Weapon Skins [1.3 :: 21.03.2014]
Reply With Quote #15

PM Sent with code.

Last edited by waltercl; 03-23-2014 at 03:09.
waltercl is offline
h3bus
AlliedModders Donor
Join Date: Nov 2013
Old 05-19-2014 , 17:39   Re: [CS:GO] Always Weapon Skins [1.3 :: 21.03.2014]
Reply With Quote #16

Hi NeuroToxin!

I've been ask to integrate your great trick for weapon skin into my DM plugin (https://forums.alliedmods.net/showthread.php?t=233685)

Although I will not re-use your code as I would do a deep integration, I ask for your permission to re-use the idea!

Thanks in advance!

Last edited by h3bus; 05-19-2014 at 17:40.
h3bus is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 05-19-2014 , 17:44   Re: [CS:GO] Always Weapon Skins [1.3 :: 21.03.2014]
Reply With Quote #17

Quote:
Originally Posted by h3bus View Post
Hi NeuroToxin!

I've been ask to integrate your great trick for weapon skin into my DM plugin (https://forums.alliedmods.net/showthread.php?t=233685)

Although I will not re-use your code as I would do a deep integration, I ask for your permission to re-use the idea!

Thanks in advance!
Hello,

Go nuts. Your welcome to use my code
Neuro Toxin is offline
h3bus
AlliedModders Donor
Join Date: Nov 2013
Old 05-20-2014 , 15:12   Re: [CS:GO] Always Weapon Skins [1.3 :: 21.03.2014]
Reply With Quote #18

Thanks, it's integrated and working great!
h3bus is offline
waltercl
Member
Join Date: Jun 2011
Old 06-08-2014 , 16:49   Re: [CS:GO] Always Weapon Skins [1.3 :: 21.03.2014]
Reply With Quote #19

We use this on our CSGO Server in conjunction with a modified CSS Plugin to allow donators to buy rifles from the other team. Neuro Toxin was Super Helpful in getting it to work with our buy plugin and helping us to buy the Silenced M4.

It does what it is suppose to 95% of the time, although there are a few times when you'll buy a weapon from the other team and it won't be skinned. But 95% is a great percentage so we're very grateful for this plugin.

The main request we have now is to get it to where a T can buy a Five Seven, and a CT can buy a Tec 9 and it be skinned. The Five Seven was built into the original plugin so that should be easy enough, but the Tec 9 is new to CSGO so that will have to be figured out. I'll post the specifics of what is needed below. You may wonder why I don't post this in the thread with the buy plugin, but the reason is there's a far greater chance of getting a response here. There is no interest in the CSS world of modifying their buy plugins to work with GO.
waltercl is offline
waltercl
Member
Join Date: Jun 2011
Old 06-08-2014 , 16:54   Re: [CS:GO] Always Weapon Skins [1.3 :: 21.03.2014]
Reply With Quote #20

To be able to buy a Tec 9 on the CT side something would have to be added in two different files of the buy plugin. The translations file and the config file would have to be modified. Below is what is listed as an example for the Five Seven.

In the Translations file here is how the Five Seven is listed:

"fiveseven"
{
"#format" ""
"en" "ES Five-Seven (fiveseven)"
}

And in the config file:

"fiveseven"
{
"slot" "1"
"team" "0"
"cost" "-1"
"index" "11"
"orig" "3"
"menu" "Pistols"
"flag" ""
}

The challenge to adding the Tec 9 is to figure out which weapon index it is.
waltercl 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 07:25.


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