AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [TF2] Wearit (v1.6 dated 16Feb2022) (https://forums.alliedmods.net/showthread.php?t=329412)

PC Gamer 12-22-2020 15:26

[TF2] Wearit (v1.6 dated 16Feb2022)
 
2 Attachment(s)
Description:
This plugin allows players to wear what they want by typing the cosmetic item number(s) of the cosmetics they want to wear. Players can wear up to five cosmetic items. The cosmetics will not change when they touch a locker or die. The cosmetics will remain until the player removes it using a command, selects a different cosmetic, changes class, or the map changes.

This plugin also allows Admins to force up to five specific cosmetic items onto target players. The cosmetics will not change when they touch a locker or die. The cosmetics will remain until the Admin or player or removes it using a command, the player selects a different cosmetic, changes class, or the map changes. Normal targeting applies so you can target playername, @red, @blue, @bots, etc.

Note: Players can wear any combination of items, even if the cosmetic wasn't designed for the player's class. Expect a bit of weirdness.

Dependency:
Plugin requires TF2Attributes by FlaminSarge. Here's a link: https://github.com/FlaminSarge/tf2attributes

Player Commands:
To see command format and get help with cosmetic item numbers: !wearit
To equip items: !wearit <item1>, <item2>, <item3>, <item4>, <item5>, <unusual effect #>, <paint #>
Unusual numbers are currently: 1-278
Paint numbers are currently: 1-29
To remove items: !wearit 0
To show item numbers of items equipped: !showit
To toggle ability to view cosmetics created with the !wearit command: !hidehats

Additional Player Commands:
!wearit1 <itemid>, <unusual effect#>, <paint#>
!wearit2 <itemid>, <unusual effect#>, <paint#>
!wearit3 <itemid>, <unusual effect#>, <paint#>

Example: !wearit1 666, 13, 8 (wear a yellow Santa hat with burning flames)
Example: !wearit1 0 (remove wearit1 cosmetic)

Player Command Examples:
Wear a Santa hat: !wearit 666
Wear the Heavy's Fairy outfit: !wearit 930, 931, 932
Wear the Heavy's Fairy outfit with flame effect: !wearit 930, 931, 932, 0, 0, 13
Wear the Heavy's Yeti outfit, with unusual effect and yellow paint: !wearit 1187, 1188, 1189, 0, 0, 38, 8
Remove my outfit: !wearit 0
Stop showing me cosmetics created with !wearit: !hidehats
Resume showing me cosmetics created with !wearit: !hidehats

Admin Commands:
To see command format and get help with cosmetic item numbers: !forcewearit
To equip items on target: !forcewearit <target> <item1>, <item2>, <item3>, <item4>, <item5>, <unusual effect #>, <paint #>
Unusual numbers are currently: 1-278
Paint numbers are currently: 1-29
To remove items: !forcewearit <target> 0
To show item numbers of items equipped: !showit
To remove any model (if equipped with Model Manager) and all cosmetics: !strip <target>

Admin Command Examples:
Force player named Bob to wear the Christmas Tree hat: !forcewearit bob 341
Force player named Mary to Demoman Wolf outfit: !forcewearit mary 543, 544, 545
Force all Bots to wear the Scout Alien Isolationist outfit: !forcewearit @bots 30471, 30470, 30472
Force Red team to wear the Soldier Tin Soldier outfit: !forcewearit @red 555, 556, 557
Remove cosmetics from player named Sally: !forcewearit sally 0
Remove model and cosmetics from player named Steve: !strip steve
Force all players to wear a Santa hat: !forcewearit @all 666
Force all players to wear a Santa hat with flame effect: !forcewearit @all 666, 0, 0, 0, 0, 13
Force all players to wear a Santa hat with flame effect and yellow paint: !forcewearit @all 666, 0, 0, 0, 0, 13, 8

Video of Wearit Plugin:


Credits:
Thanks goes to StrikeR14 for sharing a way to avoid gamedata file.

Installation:
Put wearit.smx into the folder: /sourcemod/plugins/
Change map


Changelog:
v1.6 dated 16Feb2022: Plugin now sm1.11 compatible. Wearit items are now copied between maps.
v1.5 dated 08Mar2021: Plugin now removes cosmetics when !wearit1 is used
v1.4 dated 04Mar2021: Added !wearit1, !wearit2, !wearit3 commands requested by Teamkiller324
v1.3 dated 10Feb2021: Implemented updated Cookie code provided by Teamkiller324
v1.2 dated 06Jan2021: Added Unusual Effects and Paint at the request of H4rry
v1.1 dated 06Jan2021: Added !hidehats command at the request of Fearts

Fearts 12-24-2020 20:49

Re: [TF2] Wearit
 
Would it be possible to make a option so people could block seeing items created by this plugin?

PC Gamer 12-24-2020 21:53

Re: [TF2] Wearit
 
Quote:

Originally Posted by Fearts (Post 2730002)
Would it be possible to make a option so people could block seeing items created by this plugin?

I'm not aware of any method that makes cosmetic items invisible to a specific viewer and visible to all others. Sorry.

Fearts 12-24-2020 23:27

Re: [TF2] Wearit
 
Code:

SDKHook(hat, SDKHook_SetTransmit, HatTransmit);


public Action HatTransmit(int entity, int client)
{
    if(GetEntPropEnt(entity, Prop_Send, "m_hOwnerEntity") == client)
        return Plugin_Continue;

    return Plugin_Handled;
}

My friend sent me this code. This way if players on the server don't want to see plugin generated items they don't have to.

PC Gamer 12-25-2020 15:15

Re: [TF2] Wearit
 
Quote:

Originally Posted by Fearts (Post 2730002)
Would it be possible to make a option so people could block seeing items?

You might try using the [TF2] Hat Removal plugin by Monkeys. I haven't used it but maybe it will do what you want. Here's a link: https://forums.alliedmods.net/showthread.php?t=157319

Kleiner 12-26-2020 17:54

Re: [TF2] Wearit
 
translations support? please

PC Gamer 12-26-2020 20:50

Re: [TF2] Wearit
 
Quote:

Originally Posted by Kleiner (Post 2730228)
translations support? please

I don't see the benefit of adding translation support when the plugin itself only generates these lines of text to the user:

PHP Code:

   Usage: !wearit <item index1>, <item index2>, <item index3>, <item index4>, <item index5>
   
To Remove Items: !wearit 0
   Link to Index Numbers
https://wiki.alliedmods.net/Team_Fortress_2_Item_Definition_Indexes 

Do you have a lot of multilingual users on your server? If not, wouldn't it be easier to edit those lines in the source code to your language?

Kleiner 12-27-2020 04:52

Re: [TF2] Wearit
 
Chat text too please "You are wearing the following !wearit items:"

h4rry 01-05-2021 21:05

Re: [TF2] Wearit
 
Can you make it so we can wear unusuals too?, with specific effects?

PC Gamer 01-06-2021 01:21

Re: [TF2] Wearit
 
Quote:

Originally Posted by Fearts (Post 2730002)
Would it be possible to make a option so people could block seeing items created by this plugin?

Plugin in the original post updated to version 1.1 which added the new command requested by Fearts: !hidehats

Players who use the !hidehats command will no longer see cosmetics created with !wearit. To resume seeing cosmetics again the player can type !hidehats again.

Quote:

Originally Posted by h4rry (Post 2731512)
Can you make it so we can wear unusuals too?, with specific effects?

Just thinking out loud here.... I thought about giving every cosmetic a random paint, but that would require using TF2Attributes. If I did that you could just touch a locker to change your paint color. Unusual effects would be more difficult but possible. Unusual effects on anything other than a hat or weapon never seems to look right. I might be able to make it where the 6th item in the !wearit command was your unusual effect number for the first item. So if you wanted to give a santa hat with unusual effect of 'Stormy Storm' it might look something like this: !wearit 666, 0, 0, 0, 0, 29 Anyway... just a thought.


All times are GMT -4. The time now is 00:05.

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