Raised This Month: $ Target: $400
 0% 

Checking Primary/Secondary Weapons


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 02-07-2009 , 01:35   Re: Checking Primary/Secondary Weapons
Reply With Quote #2

Quote:
Originally Posted by Mlk27 View Post
is there way to check if a weapon belongs to primary or secondary weapons group?
There may be a better way but here's what I do:

PHP Code:
public WeaponGroup(iWeapID)
{
    
//primary returns 1, secondary returns 2
    
switch (iWeapID)
    {
        case 
CSW_SCOUT,CSW_XM1014,CSW_MAC10CSW_AUGCSW_UMP45,CSW_SG550,CSW_GALIL,CSW_FAMAS,CSW_AWP,CSW_MP5NAVY,CSW_M249,CSW_M3CSW_M4A1,CSW_TMP,CSW_G3SG1,CSW_SG552,CSW_AK47,CSW_P90: return 1;
        case 
CSW_P228CSW_ELITECSW_FIVESEVENCSW_USPCSW_GLOCK18CSW_DEAGLE: return 2;
    }
    
    return 
0;

__________________

Last edited by Bugsy; 02-07-2009 at 01:45.
Bugsy 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 01:37.


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