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

[TF2] Item/Class Scripting


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Laurens
Junior Member
Join Date: Apr 2018
Old 04-28-2018 , 13:08   [TF2] Item/Class Scripting
Reply With Quote #1

Hey everyone, I am new to scripting TF2 but I know C++.
I am trying to change the class of the player and remove all the items.
Only I don't know how to change the class or change the items.
BTW I know how to get the spawn event.
Anyways, thank you for reading.

Last edited by Laurens; 04-28-2018 at 13:19. Reason: Makes the problem more obvious.
Laurens is offline
ThatKidWhoGames
Veteran Member
Join Date: Jun 2013
Location: IsValidClient()
Old 04-28-2018 , 13:27   Re: [TF2] Item/Class Scripting
Reply With Quote #2

Here is the stock for setting a player's class:
https://sm.alliedmods.net/new-api/tf...SetPlayerClass

As for removing items, do you mean weapons or everything including cosmetics? If you are talking about weapons:
https://sm.alliedmods.net/new-api/tf...moveWeaponSlot
https://sm.alliedmods.net/new-api/tf...moveAllWeapons
ThatKidWhoGames is offline
Laurens
Junior Member
Join Date: Apr 2018
Old 04-28-2018 , 14:38   Re: [TF2] Item/Class Scripting
Reply With Quote #3

Thanks, it worked!
Laurens 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 02:44.


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