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

[TF2][Request] Class Swap Plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
badlet
Junior Member
Join Date: May 2020
Old 08-09-2021 , 03:42   [TF2][Request] Class Swap Plugin
Reply With Quote #1

Hey Everyone, I'm new to tf2 plugins and I just need a really simple plugin to use on my server, if anyone could help me out that would be greatly appreciated.

This plugin would simply swap the classes two people are playing.

Example: If I am a scout and my friend is a pyro, sm_swapclass "BADLET" "friend" would make me a pyro and my friend a scout.

Ideally this would work like other class setting plugins where you don't have to die or appear in spawn, you are just suddenly another class.

Any help would be much appreciated!

Thanks
badlet is offline
Teamkiller324
Senior Member
Join Date: Feb 2014
Location: Earth
Old 08-10-2021 , 21:25   Re: [TF2][Request] Class Swap Plugin
Reply With Quote #2

This should do the job.

Usage of the command:
sm_swapclass <target 1|#userid> <target 2|#userid>

Comes with a cvar tf_swapclass_version that is assured to not be able to be changed aswell as a custom print to chat so it is easily customizable to your liking.
Attached Files
File Type: sp Get Plugin or Get Source (tf2_class_swap.sp - 95 views - 2.9 KB)
File Type: smx tf2_class_swap.smx (5.7 KB, 69 views)
__________________
Teamkiller324 is offline
badlet
Junior Member
Join Date: May 2020
Old 08-11-2021 , 01:36   Re: [TF2][Request] Class Swap Plugin
Reply With Quote #3

Thanks, the class swapping works. Just one issue though, the weapons are extremely bugged as it looks like you're still equipped with your previous classes weapons until you touch a resupply cabinet.

I really appreciate you doing what you have so far, but could you please fix this so you are instantly refreshed. I've seen the plugin https://forums.alliedmods.net/showthread.php?t=141516 works in this regard, i'm not sure how it does it though.

Thanks again
badlet is offline
Teamkiller324
Senior Member
Join Date: Feb 2014
Location: Earth
Old 08-11-2021 , 13:46   Re: [TF2][Request] Class Swap Plugin
Reply With Quote #4

Updated to version 1.0.1

Changes:

Added cvar tf_swapclass_regenerate to define wheter the players should be regenerated or not upon being swapped classes.
Attached Files
File Type: sp Get Plugin or Get Source (tf2_class_swap.sp - 102 views - 2.9 KB)
File Type: smx tf2_class_swap.smx (5.7 KB, 45 views)
__________________
Teamkiller324 is offline
PC Gamer
Veteran Member
Join Date: Mar 2014
Old 08-12-2021 , 00:11   Re: [TF2][Request] Class Swap Plugin
Reply With Quote #5

Quote:
Originally Posted by Teamkiller324 View Post
Updated to version 1.0.1
I believe you accidentally uploaded version 1.0
PC Gamer is offline
badlet
Junior Member
Join Date: May 2020
Old 08-13-2021 , 18:36   Re: [TF2][Request] Class Swap Plugin
Reply With Quote #6

Hi, it looks like this is the same version
badlet is offline
Drixevel
AlliedModders Donor
Join Date: Sep 2009
Location: Somewhere headbangin'
Old 08-14-2021 , 04:13   Re: [TF2][Request] Class Swap Plugin
Reply With Quote #7

Attached Files
File Type: sp Get Plugin or Get Source (tf2-swapclasses.sp - 86 views - 2.9 KB)
Drixevel is offline
badlet
Junior Member
Join Date: May 2020
Old 08-14-2021 , 21:26   Re: [TF2][Request] Class Swap Plugin
Reply With Quote #8

This works perfectly! Thankyou so much!
badlet 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 02:52.


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