Raised This Month: $32 Target: $400
 8% 

[TF2] Fashion (v1.3 04Mar2023)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
PC Gamer
Veteran Member
Join Date: Mar 2014
Plugin ID:
7426
Plugin Version:
1.3
Plugin Category:
Fun Stuff
Plugin Game:
Team Fortress 2
Plugin Dependencies:
Servers with this Plugin:
 
Plugin Description:
Allows players to pick a cosmetic outfit to wear from a menu
Old 12-21-2020 , 22:48   [TF2] Fashion (v1.3 04Mar2023)
Reply With Quote #1

Description:
This plugin allows players to pick a cosmetic outfit to wear from a menu. The outfit will not change when they touch a locker or die. The outfit will remain until the player removes it using the fashion menu, selects a different outfit from the menu, or changes class.

Video of Fashion Plugin:


Dependencies:
This plugin requires TF2Attributes by FlaminSarge or nosoop. Link: https://forums.alliedmods.net/showthread.php?t=210221

Installation:
Put fashion.smx into your /sourcemod/plugins/ folder
Change map

Change Log:
V1.3, 04Mar2023: Menus now stay open after selection
V1.2, 11Dec2022: Plugin is now SM 1.11 compliant
Attached Files
File Type: sp Get Plugin or Get Source (fashion.sp - 148 views - 98.9 KB)
File Type: smx fashion.smx (25.5 KB, 178 views)

Last edited by PC Gamer; 03-05-2023 at 00:34.
PC Gamer is offline
Mr_panica
Senior Member
Join Date: Jan 2017
Location: Russia, Saint-Petersburg
Old 12-22-2020 , 09:34   Re: [TF2] Fashion (v1.0 21Dec2020)
Reply With Quote #2

I think it would be nice to add a config for setting up sets or just individual hats.
__________________
Sorry for my English.
Mr_panica is offline
StrikeR14
AlliedModders Donor
Join Date: Apr 2016
Location: Behind my PC
Old 12-22-2020 , 11:23   Re: [TF2] Fashion (v1.0 21Dec2020)
Reply With Quote #3

Nice releases, as always!

Suggestion: Instead of worrying about updating your gamedata, you can use

PHP Code:
GameData hTF2 = new GameData("sm-tf2.games"); // sourcemod's tf2 gamdata

if (!hTF2)
    
SetFailState("This plugin is designed for a TF2 dedicated server only.");

StartPrepSDKCall(SDKCall_Player);
PrepSDKCall_SetVirtual(hTF2.GetOffset("RemoveWearable") - 1);    // EquipWearable offset is always behind RemoveWearable, subtract its value by 1
PrepSDKCall_AddParameter(SDKType_CBaseEntitySDKPass_Pointer);
g_hEquipWearable EndPrepSDKCall();

if (!
g_hEquipWearable)
    
SetFailState("Failed to create call: CBasePlayer::EquipWearable");

delete hTF2
__________________
Currently taking TF2/CSGO paid private requests!

My Plugins | My Discord Account

Last edited by StrikeR14; 12-22-2020 at 11:26.
StrikeR14 is offline
Mr_panica
Senior Member
Join Date: Jan 2017
Location: Russia, Saint-Petersburg
Old 12-22-2020 , 13:01   Re: [TF2] Fashion (v1.0 21Dec2020)
Reply With Quote #4

I would like to inform you that you can cheat with this plugin.

When removing all cosmetic items, the player updates the value of his health points and ammunition to the maximum values.

__________________
Sorry for my English.

Last edited by Mr_panica; 12-22-2020 at 13:03.
Mr_panica is offline
PC Gamer
Veteran Member
Join Date: Mar 2014
Old 12-22-2020 , 13:49   Re: [TF2] Fashion (v1.1 22Dec2020)
Reply With Quote #5

Updated to version 1.1 implementing suggestions from StrikeR14 and Mr_panica.

StrikeR14: Thanks for sharing. I've added that method into the plugin. That's one less file server operators have to deal with.

Mr_panica. At your request players are no longer regenerated when they remove their clothing items. I was a bit reluctant to remove the regeneration. When you remove cosmetics like legs/feet items it will remove the leg and/or feet from the player model which makes the player look very weird with no legs. When regeneration is used the player model is made whole. But... as you noticed the player can use this to cheat, so I removed it.

If anyone has any ideas how to regenerate a player model without restoring health please share.
PC Gamer is offline
StrikeR14
AlliedModders Donor
Join Date: Apr 2016
Location: Behind my PC
Old 12-22-2020 , 14:48   Re: [TF2] Fashion (v1.1 22Dec2020)
Reply With Quote #6

You can set a cooldown to remove wearables so people won't exploit this with their binds or just apply the removal on spawn.
__________________
Currently taking TF2/CSGO paid private requests!

My Plugins | My Discord Account
StrikeR14 is offline
Mr_panica
Senior Member
Join Date: Jan 2017
Location: Russia, Saint-Petersburg
Old 12-22-2020 , 15:19   Re: [TF2] Fashion (v1.1 22Dec2020)
Reply With Quote #7

Quote:
Originally Posted by PC Gamer View Post
Updated to version 1.1 implementing suggestions from StrikeR14 and
If anyone has any ideas how to regenerate a player model without restoring health please share.
You can simply memorize the values ​​of health, clip and total ammunition and apply them after the player's regeneration.
__________________
Sorry for my English.
Mr_panica is offline
venter25
Member
Join Date: Jul 2019
Old 01-06-2021 , 16:34   Re: [TF2] Fashion (v1.1 22Dec2020)
Reply With Quote #8

Any chance you can add weapons to this?
venter25 is offline
PC Gamer
Veteran Member
Join Date: Mar 2014
Old 12-11-2022 , 06:12   Re: [TF2] Fashion (v1.2 11Dec2022)
Reply With Quote #9

Quote:
Originally Posted by venter25 View Post
Any chance you can add weapons to this?
Wow, sorry I missed this question before. Just now noticed it. Anyway, yes, you could add weapons very easily with this if you wanted to edit it. However, there are other plugins that you may want to consider.

The easiest way to give yourself or others any weapon or cosmetic is to use the plugin titled '[TF2] Gimme' written by... me. Link: https://forums.alliedmods.net/showthread.php?p=2766587

The easiest way to give yourself or others any cosmetic, even if not designed for your class, and allows up to 5 wearable cosmetics, with or without paint and unusual effect is to use the plugin titled '[TF2] Wearit' written by... me. Link: https://forums.alliedmods.net/showthread.php?p=2729790

The easiest way to give yourself random outfits and random weapons every time you spawn is to use the plugin titled '[TF2] Bling' written by... me. Link: https://forums.alliedmods.net/showthread.php?p=2728917

Also... The plugin in the original post was updated to version 1.2. This version adds several outfits and is now SM 1.11 compliant.
PC Gamer is offline
Ubercharge
Junior Member
Join Date: Oct 2022
Old 12-30-2022 , 15:55   Re: [TF2] Fashion (v1.2 11Dec2022)
Reply With Quote #10

make clientprefs not required
Ubercharge 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 08:34.


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