How to get Armoury Entity Weapon ID ( CSW_* ) ?
How to get Armoury Entity Weapon ID ( CSW_* ) ?
I am trying Ham_touch for armoury_entity but how to resolve the entity into its Weapon ID? For WeaponBox types, we have fm_get_weaponbox_type () but that doesn't work on Maps where weapons are dropped by default ( no owner ). eg. aa_dima2, $1000$, etc. Only Once we pickup the weapon and drop it back, that this function responds to it on Touch. ( In Simple Words, If I want to touch an already dropped weapons on certain maps, I should be able to get its weapon id even before picking it up ) I was thinking of somehow temporarily faking weaponbox for armoury_entity. But I don't know how to do so. Thanks! |
Re: How to get Armoury Entity Weapon ID ( CSW_* ) ?
Code:
|
Re: How to get Armoury Entity Weapon ID ( CSW_* ) ?
can you tell me the difference b/w cs_get_weapon_id(index) and cs_get_armoury_type(index). I mean, difference in usage. eg. Can I directly use cs_get_weapon_id(index) with weapon entities having class "weaponbox" ?
|
Re: How to get Armoury Entity Weapon ID ( CSW_* ) ?
Quote:
cs_get_weapon_id(index) returns type of weapon the answer to your question that should solve all questions is that weapons on the ground on maps like fy_snow are armoury_entity(is that even spelled right?) from mapping knowledge, so you will need to use it to detect weapons that are on the ground(if it's the only one you want to detect) use cs_get_weapon_id(index) if you want to detect all weapons including the ones that spawn on the ground at newround |
Re: How to get Armoury Entity Weapon ID ( CSW_* ) ?
@aron9forever - Then what is this -_- :
PHP Code:
What I think is, it's based on the class of weapons. Armoury Entity is what we get in maps where weapons are spawned on the ground. Once we pick it up, it turns into Weaponbox type ( as tested from Ham_Touch ). So I will have to make 2 different checks for that. |
Re: How to get Armoury Entity Weapon ID ( CSW_* ) ?
The function above is for "weaponbox" entity.
cs_get_armoury_type() is for "armoury_entity" entity. |
Re: How to get Armoury Entity Weapon ID ( CSW_* ) ?
Quote:
the correct way to get the CSW_* equivalent of the weapon a player touches then use the snippet taken from connormcleod. his snippet goes all the way trough checking what weapon was picked up by index, then transforming said index and returning it as a CSW_* cs_get_armoury_type(index) is for an entity, index as in entity index not as in weapon index, a weapon is an entity when it's on the ground, but it's armoury only when it was spawned with the map once the gun is in your hand it's no longer an entity, you are the entity holding the gun(I think, I'm not sure of this one) |
Re: How to get Armoury Entity Weapon ID ( CSW_* ) ?
There're 3 different things.
1) A "weaponbox" entity 2) An "armoury_entity" entity 3) A "weapon_*" entity A weaponbox it's an entity that carries a weapon_* entity on it. An armoury_entity it's an entity which just gives a new weapon (defined on a member(offset)) when touching it A weapon_* entity it's the weapon attached to the player. (it doesn't have model) |
| All times are GMT -4. The time now is 09:45. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.