PDA

View Full Version : Any way to equip two skins, one for T and one for CT?


dilalmon
05-29-2013, 17:23
Is there any way to equip two skins, one for T and one for CT?

vodka00
05-29-2013, 17:36
You mean for the skin to be usable by one team only or....?

dilalmon
05-29-2013, 17:55
Yep!

My server has a strict policy on what type of color scheme goes on what team to make it very distinguishable.
So the store has separate skins for Ts and CTs.
The downside is that the users always have to change their skins whenever they change their teams.

vodka00
05-29-2013, 19:25
In that case, yes you can do it by going into skins attributes field and setting "team": flag

like so,

{
"model": "models/player/kirby/admin/umbrella_leet.mdl",
"teams": [2, 3]
}

applemes
05-29-2013, 19:35
I think he might mean where, you can have two skins like
Mario [E]
Lugi [E]

and depending on which team you are on it chooses that skin, like say who go CT you are lugi but if you go T you are Mario, and you dont have to constantly switch back and forth.

dilalmon
05-29-2013, 19:50
I think he might mean where, you can have two skins like
Mario [E]
Lugi [E]

and depending on which team you are on it chooses that skin, like say who go CT you are lugi but if you go T you are Mario, and you dont have to constantly switch back and forth.

This is what I exactly meant.

applemes
05-30-2013, 21:18
i dont think it is possible :/

thetwistedpanda
05-30-2013, 21:42
It's more than possible, but the easiest method isn't the most elegant. Instead of having one skin module for both teams, you have a skin plugin per team, and only list the models available for that team within that module. Then each skin plugin checks team before applying skin and only runs if team == desired.

The attached zip may work, but I can't guarantee it as it hasn't been tested. It's a bad solution to the problem, but it should tide you over (should it work) until someone does it properly. All I did was copy/paste the 1.1 release of skins, rename the files / json, and do a copy/replace for "skin" to "skin_t" and "skin_ct". You can run the original skin plugin with these two, but not recommended...

dilalmon
05-31-2013, 15:49
I'm grateful you did this for me, and for now I think it's the only but working solution.
If I want to import all the existing skins, what process would I have to go through?
I'm assuming this uses the same database table?

Arrow768
05-31-2013, 16:18
Existing skins ? - Skins from the old store skins plugin or from another skins plugin ?

thetwistedpanda
05-31-2013, 16:25
He's likely referring to importing "skins" to "skins_t" and "skins_ct" that the above zip uses, in which case it'd probably just be phpMyAdmin.

dilalmon
05-31-2013, 17:04
Skins that I've added with using the original 1.1 Store Skins plugin, Arrow768.

thetwistedpanda
06-01-2013, 13:00
You'll likely just have to hop into phpMyAdmin, find the skins in question, and change the category (not familiar with the structure unfortunately).