I do something similar in my mod:
- added CBaseCombatWeapon *primary/seconary_weapon... to HL2MP_Player- then 
GiveDefaultItems() has: GiveNamedItem(...); primary_weapon = 
Weapon_OwnsThisType(...)- added commands like use_primary/secondary so that I 
could switch to them
You could have the player drop primary or secondary like that too.  The only 
catch would be if your playerspick up weapons by touching them.. you'd have to 
add some callbacks so that primary/secondary_weaponget set appropriately.

Date: Thu, 1 May 2014 19:37:26 -0400
From: joshcod...@gmail.com
To: hlcoders@list.valvesoftware.com
Subject: [hlcoders] Getting active weapon in a certain bucket- Source SDK       
2013

Hello,
I'm working on a mod where you can only have one primary weapon and one 
secondary weapon at a time. The secondary guns will all share the same buckets 
in the scripts files so only one can be used at a time. I'm working on a 
modified DropActiveWeapon function: 

void CHL2MP_Player::DropActiveWeapon( void ){   Vector VecForward;      
VecForward *= 300.0f;
        BaseClass::Weapon_Drop (GetActiveWeapon(), NULL, &VecForward );}
On that last line, what can I put instead of GetActiveWeapon() to get the 
current weapon in a specific bucket? I want it to call that bucket each time so 
that even if your primary (non changing) weapon is out, it'll drop the other 
weapon whenever I need to DropActiveWeapn().

Any ideas would be greatly appreciated.
Thank you,Joshua

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders                
                          
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders

Reply via email to