AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [TF2] Set Class (https://forums.alliedmods.net/showthread.php?t=141516)

Tylerst 10-25-2010 01:48

[TF2] Set Class
 
2 Attachment(s)
TF2 Set Class

Description: Set a target(s) class to the specified one, simple enough eh?

CVARs(Default Values Shown):
sm_setclass_version "1.2.2"

sm_setclass_chat "1" - Enable/Disable(1/0) Showing setclass changes in chat

sm_setclass_log "1" - Enable/Disable(1/0) Logging of setclass changes


Command: sm_setclass "target" "class" (Default Slay Flag)
Note: Canuse "random" for class to have the plugin choose a random class

Examples:
sm_setclass Thatonedude Soldier
sm_setclass "The Master Stalker" Spy
sm_setclass @me PYRO
sm_setclass @red EnGiNeEr
sm_setclass @humans scout
sm_setclass @bots medic
sm_setclass @all random

Changelog:
Code:

Version 1.0.0 - October 25, 2010
* Initial release.
 
Version 1.0.1 - October 26, 2010
* Fixed a glitch with setting a target's class while they're taunting (Thanks Thraka)
 
Version 1.1.0 - November 2, 2010
* Added ability to use 'random' to allow the plugin to pick a random class
* Logging will now specify whether the command or the admin menu was used to change class
 
Version 1.2.0 - July 23, 2011
* Overhaul of original plugin code for stability and optimization
* Removed menu version(adminmenu_custom example attached)

Version 1.2.1 - December 24, 2011
* Using "random" with multiple targets will now randomize each individual target's class

Version 1.2.2 - May 20, 2012
* Added extra Validity checks to prevent errors


Snaggle 10-25-2010 18:12

Re: TF2 Setclass
 
Awesome, fits my servers nicely. Good job!

Thraka 10-26-2010 13:11

Re: TF2 Setclass
 
Use this to force a player to select a weapon after you regenerate them

new weapon = GetPlayerWeaponSlot(client, 1);
SetEntPropEnt(client, Prop_Send, "m_hActiveWeapon", weapon);

Tylerst 10-26-2010 19:44

Re: TF2 Setclass
 
Quote:

Originally Posted by Thraka (Post 1334465)
Use this to force a player to select a weapon after you regenerate them

new weapon = GetPlayerWeaponSlot(client, 1);
SetEntPropEnt(client, Prop_Send, "m_hActiveWeapon", weapon);

Thanks for that, Plugin updated.

Also, I used slot 0 for primary instead of 1 for secondary.

Thraka 10-26-2010 19:56

Re: TF2 Setclass
 
Sure. I just pasted that from another plugin i know uses it :)

TimeShift 11-02-2010 00:11

Re: TF2 Setclass
 
Just what I needed, I love you :D

Could you make something to change the player's class to a random class?

Like "sm_setclass @bots random" then the plugin chooses a random class :)

Tylerst 11-02-2010 12:41

Re: TF2 Setclass
 
Quote:

Originally Posted by TimeShift (Post 1339748)
Just what I needed, I love you :D

Could you make something to change the player's class to a random class?

Like "sm_setclass @bots random" then the plugin chooses a random class :)

Done :D

Agentnightslayer 02-28-2011 15:47

Re: [TF2] Set Class
 
On my Server I run the High Five Plugin(https://forums.alliedmods.net/showthread.php?t=147305) with this and it seems to leave behind a lot of civilian models from the original class the person was. Is there any way to get rid of the models/fix this?


Tylerst 02-28-2011 18:31

Re: [TF2] Set Class
 
Quote:

Originally Posted by Agentnightslayer (Post 1425654)
On my Server I run the High Five Plugin(https://forums.alliedmods.net/showthread.php?t=147305) with this and it seems to leave behind a lot of civilian models from the original class the person was. Is there any way to get rid of the models/fix this?


Just glancing at the code, it should only be a problem if you use it mid high-five. If that's the case, I'll see what I can do, such as disallow setclass during taunts if sm_high_five_version cvar is found.

If you have this problem with setting class and doing the high-five after, then I'm not sure what I can do to fix it. The high-five plugin seems to check class/model, make the player invisible, and spawn a new model to play the animation during a stun state(to allow thirdperson I assume), hence this plugin shouldn't cause an issue since it changes the class(and the model) if used before the high-fire.

Agentnightslayer 03-01-2011 16:31

Re: [TF2] Set Class
 
Alright cool thanks. This plugin is very helpful otherwise


All times are GMT -4. The time now is 01:41.

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