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

[TF2] Wearit (v1.6 dated 16Feb2022)


Post New Thread Reply   
 
Thread Tools Display Modes
PC Gamer
Veteran Member
Join Date: Mar 2014
Old 03-04-2021 , 03:00   Re: [TF2] Wearit (v1.3 dated 10Feb2021)
Reply With Quote #21

Quote:
Originally Posted by Teamkiller324 View Post
Possible idea of bringing in a sm_wearit2 command to manually add a wearable to yourself?

Example usage:
sm_wearit2 514 13 or better explained: sm_wearit2 <item index <effect number> <paintnumber>

this could enable unusual combos as potential.
Plugin in original post upgraded to version 1.4 which added this feature requested by Teamkiller324.

New commands:
!wearit1 <item index>, <unusual effect #>, <paint #>
!wearit2 <item index>, <unusual effect #>, <paint #>
!wearit3 <item index>, <unusual effect #>, <paint #>

Example: !wearit1 261, 13, 8 (wear the mann co. hat with burning flames, painted yellow)
Example: !wearit1 0 (remove the item)

Note: Only lightly tested. Let me know if you find any bugs.
PC Gamer is offline
Teamkiller324
Senior Member
Join Date: Feb 2014
Location: Earth
Old 03-04-2021 , 06:39   Re: [TF2] Wearit (v1.3 dated 10Feb2021)
Reply With Quote #22

Quote:
Originally Posted by PC Gamer View Post
Plugin in original post upgraded to version 1.4 which added this feature requested by Teamkiller324.

New commands:
!wearit1 <item index>, <unusual effect #>, <paint #>
!wearit2 <item index>, <unusual effect #>, <paint #>
!wearit3 <item index>, <unusual effect #>, <paint #>

Example: !wearit1 261, 13, 8 (wear the mann co. hat with burning flames, painted yellow)
Example: !wearit1 0 (remove the item)

Note: Only lightly tested. Let me know if you find any bugs.
The misc you already wear isn't properly removed, instead you're just overlapping the cosmetic with the one you already wear.

The main command does infact clear out the misc but the secondary ones doesn't.
__________________

Last edited by Teamkiller324; 03-04-2021 at 06:41.
Teamkiller324 is offline
PC Gamer
Veteran Member
Join Date: Mar 2014
Old 03-08-2021 , 01:04   Re: [TF2] Wearit (v1.5 dated 08March2021)
Reply With Quote #23

Plugin in original post upgraded to version 1.5.

Version 1.5 removes equipped cosmetics before adding new one when the !wearit1 command is used.

This was requested by Teamkiller324.
PC Gamer is offline
ThePianoNailer
Junior Member
Join Date: Feb 2021
Old 04-23-2021 , 12:15   Re: [TF2] Wearit (v1.5 dated 08March2021)
Reply With Quote #24

SM 1.10.6502, tf2attributes 1.3.2 (+ latest gamedata txt from https://github.com/FlaminSarge/tf2at...attributes.txt)

[SM] Exception reported: Client index 0 is invalid
[SM] Blaming: wearit.smx
[SM] Call stack trace:
[SM] [0] Cookie.Set
[SM] [1] Line 228, wearit.sp::Command_Don

appears on execution of sm_wearit, and the plugin doesn't work for me. Is it something i am missing on?


UPDATE: I am sorry, it works as intended when using the chat commands instead!!! Besides, I have tried Halloween accessories without forcing the Halloween event. Took a good while to figure that out, dummy i am, ikr

Last edited by ThePianoNailer; 05-07-2021 at 12:35. Reason: nvm
ThePianoNailer is offline
PC Gamer
Veteran Member
Join Date: Mar 2014
Old 04-23-2021 , 21:44   Re: [TF2] Wearit (v1.5 dated 08March2021)
Reply With Quote #25

Quote:
Originally Posted by ThePianoNailer View Post
it works as intended when using the chat commands instead!!!
The !wearit command from the server console. It only works in chat. The sm_forcewearit command works fine from the server console if you want to force cosmetics onto a target player.
PC Gamer is offline
ThePianoNailer
Junior Member
Join Date: Feb 2021
Old 05-07-2021 , 12:25   Re: [TF2] Wearit (v1.5 dated 08March2021)
Reply With Quote #26

Thank you for the WearIt plugin, very powerful code! If you don't mind, I've used some of it to force the official zombie skins for users in my ZF branch that i am working on. Needless to say, i've put your name in credits!

I have a small question though, why aren't you using Stringmaps instead of Cookies? You want the plugin to memorize players' loadouts on disconnect? I just heard that cookies are notorious for several reasons, and stringmaps is the safer alternative

Last edited by ThePianoNailer; 05-07-2021 at 12:27.
ThePianoNailer is offline
PC Gamer
Veteran Member
Join Date: Mar 2014
Old 05-08-2021 , 14:40   Re: [TF2] Wearit (v1.5 dated 08March2021)
Reply With Quote #27

Quote:
Originally Posted by ThePianoNailer View Post
why aren't you using Stringmaps instead of Cookies?
I only need a way to store player loadouts for the duration of the current map. I searched for examples of how to do that and found plenty examples for cookies and none for Stringmaps. If Stringmaps are more efficient I'm certainly open to that option provided there are a few examples to learn from.
PC Gamer is offline
ThePianoNailer
Junior Member
Join Date: Feb 2021
Old 05-09-2021 , 10:31   Re: [TF2] Wearit (v1.5 dated 08March2021)
Reply With Quote #28

Yep. Cookies always address HDD instead of RAM, and they store up the server disk space. Here's some info:
https://forums.alliedmods.net/showpo...23&postcount=9

The documentation on stringmaps is stored within adt_trie.inc.
Syntax-wise, stringmaps and cookies are pretty much alike, the main difference is that stringmap uses auth-id of a client in the field where a cookie requires an entity name.


In your instance, i think it can be rewritten somehow like this:

Spoiler


and be sure to delete client's data on map end (if you so desire):
PHP Code:
public OnMapEnd()
{
  
g_hClientItems.Clear();


Last edited by ThePianoNailer; 05-09-2021 at 11:10.
ThePianoNailer is offline
gdfsgdfg
Junior Member
Join Date: Jun 2013
Old 02-15-2022 , 18:44   Re: [TF2] Wearit (v1.5 dated 08March2021)
Reply With Quote #29

This might be the coolest plugin in here, I wish it kept the items you chose after map changes.

For those who wanted 4th and 5th cosmetics slots, this is the dream.

/wearit2 and /wearit3 seems to work for me, wearit1 not so much, there's no wearit4 and 5 though.

v I tried using that one, but it did not keep the cosmetics I have, it removed them completely even when touching the locker and also its missing the cool weapons from flaming sarge's gimme plugin like the extremely op rocket launchers and fan. Both use the same command so I'm gonna assume they are not compatible.

Last edited by gdfsgdfg; 02-16-2022 at 06:20.
gdfsgdfg is offline
PC Gamer
Veteran Member
Join Date: Mar 2014
Old 02-16-2022 , 00:27   Re: [TF2] Wearit (v1.5 dated 08March2021)
Reply With Quote #30

Quote:
Originally Posted by gdfsgdfg View Post
For those who wanted 4th and 5th cosmetics slots, this is the dream.
I'm glad you like it!

If you need more items consider using the [TF2] Gimme plugin which allows up to 12 items (weapons + cosmetics). Here's a link: https://forums.alliedmods.net/showthread.php?p=2766587
PC Gamer 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 06:30.


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