Raised This Month: $ Target: $400
 0% 

Get slot weapon CSW ID


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 11-15-2014 , 07:17   Re: Get slot weapon CSW ID
Reply With Quote #3

@Bladell, the method from the topic you linked used for detecting if a player has primary weapons is somehow inneficient:
Code:
//You would need hamsandwich module stock const m_rgpPlayerItems_CBasePlayer[ 6 ] = { 367 , 368 , ... } const XO_PLAYER = 5 #define HasPrimaryWeapon(%0)   ( get_pdata_cbase(%0,  m_rgpPlayerItems_CBasePlayer[ 1 ], XO_PLAYER ) )

Then, just do HasPrimaryWeapon(index). I don't understood what you need, but if you want to get the weapon slot use Ham_ItemSlot.
__________________

Last edited by HamletEagle; 11-15-2014 at 07:18.
HamletEagle 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 17:38.


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