Checking Primary/Secondary Weapons
is there way to check if a weapon belongs to primary or secondary weapons group?
|
Re: Checking Primary/Secondary Weapons
Quote:
PHP Code:
|
Re: Checking Primary/Secondary Weapons
paste from csdm.inc
Code:
//Weapon slot lookup table |
Re: Checking Primary/Secondary Weapons
Try this:
PHP Code:
PHP Code:
|
Re: Checking Primary/Secondary Weapons
wow..very nice! :D
which way is the best. The way by Dores? And i also wonder if there is really no built in function somewhere to check if user has primary or secondary. edit i get a "tag missmatch" at this line: PHP Code:
|
Re: Checking Primary/Secondary Weapons
|
Re: Checking Primary/Secondary Weapons
Ways by Dores are always wrong :mrgreen:
PHP Code:
|
Re: Checking Primary/Secondary Weapons
@Arkshine
very nice, but as i tested, i found out the function checks if the player posesses a primary (not if he has switched to a primary). That means it returns 1 if player has a M4 in inventory..although he is holding a deagle. It checks if player carries only primary. Very interesting function ... @ConnorMcLeod As i see your code checks for weapon slots. Very smart, man! Can you show an example how to use it. |
Re: Checking Primary/Secondary Weapons
The function returns the slot # for the weapon he is currently holding.
Examples: 1. User holding AWP (or any primary weapon), Get_User_Weapon_ItemSlot( id ) returns 1 2. User holding Glock (or any pistol), Get_User_Weapon_ItemSlot( id ) returns 2 3. User holding Knife, Get_User_Weapon_ItemSlot( id ) returns 3 4. User holding Nade, Get_User_Weapon_ItemSlot( id ) returns 4 PHP Code:
|
Re: Checking Primary/Secondary Weapons
wow thanks! :)
and it works now! :D edit: do you maybe know a better way to realize pistol autofire? |
| All times are GMT -4. The time now is 01:37. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.