Raised This Month: $ Target: $400
 0% 

[STOCKS] Useful TF2 Functions


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 03-23-2008 , 15:03   [STOCKS] Useful TF2 Functions
Reply With Quote #1

PHP Code:
#define CLASS_SCOUT 1
#define CLASS_SNIPER 2
#define CLASS_SOLDIER 3
#define CLASS_DEMOMAN 4
#define CLASS_MEDIC 5
#define CLASS_HEAVY 6
#define CLASS_PYRO 7
#define CLASS_SPY 8
#define CLASS_ENGINEER 9
#define CLASS_RANDOM 69 // Used in my ClassChooser plugin.

stock TF_LoadOffsets() // Used for anything to do with the m_iClass offset.
stock TF_LoadGameData() // Used for the Weapon_Equip SDKCall.
stock RemoveWeaponSlot(clientslot// Removes all weapons on the chosen slot for a client
stock RemoveAllWeapons(client)
stock GetPlayerClass(client// Requires TF_LoadOffsets() to be called during plugin start
stock SetPlayerClass(client, class) // Requires TF_LoadOffsets() to be called during plugin start
stock EquipWeapons(client, class) // Requires TF_LoadGameData() to be called during plugin start
stock FindClass(const String:className[]) // Input class name such as "engineer" or "scout" and will output the correct CLASS_* symbol, 0 on failure 
These are just a few useful stocks until pRED releases his TF2 extension (which should be sometime later this week hopefully). If you have any ideas for any other stocks, just shoot them my way and I'll see what I can do.
Attached Files
File Type: zip tf.zip (2.1 KB, 237 views)

Last edited by bl4nk; 03-27-2008 at 04:14.
bl4nk is offline
 



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 21:48.


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