Raised This Month: $ Target: $400
 0% 

[TF2] Weapon slot enum for GetPlayerWeaponSlot


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 08-06-2012 , 13:07   [TF2] Weapon slot enum for GetPlayerWeaponSlot
Reply With Quote #1

As suggested by psychonic, I created an enum with a correct mapping of the TF2 weapon slots, based on empirical testing. It is intended to be used in place of the existing TFWeaponSlot values.

PHP Code:
enum
{
    
TFRealWeaponSlot_Primary,
    
TFRealWeaponSlot_Secondary,
    
TFRealWeaponSlot_Sapper 1,
    
TFRealWeaponSlot_Melee,
    
TFRealWeaponSlot_PDA,
    
TFRealWeaponSlot_BuildTool 3,
    
TFRealWeaponSlot_DisguiseKit 3,
    
TFRealWeaponSlot_PDA2,
    
TFRealWeaponSlot_DestroyTool 4,
    
TFRealWeaponSlot_CloakingDevice 4,
    
TFRealWeaponSlot_EngineerBuilder
}; 
As you can see, I included aliases for PDA and PDA2 to make them easier to use. Also note that a Spy's revolver is in the Primary slot despite being a secondary item in the schema.

EngineerBuilder is used by an invisible item with item index 28 that allows the Engineer to build his various buildings... the BuildTool and DestroyTool alone are not enough and will not work if the Engy doesn't have an item index 28.
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 08-06-2012 at 13:14.
Powerlord is offline
 


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 18:30.


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