Raised This Month: $ Target: $400
 0% 

How to get the unique ID of weapon


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
wwzw
Member
Join Date: Feb 2009
Old 01-15-2012 , 23:29   How to get the unique ID of weapon
Reply With Quote #1

In game:
1) Players get (buy or admin give) a weapon.
2) When the weapon is thrown away.
3) The other players pick up this weapon.
How can I get this weapon the same ID?
wwzw is offline
ot_207
Veteran Member
Join Date: Jan 2008
Location: Romania The Love Country
Old 01-16-2012 , 04:23   Re: How to get the unique ID of weapon
Reply With Quote #2

http://www.amxmodx.org/funcwiki.php?...n_id&go=search
__________________
My approved plug-ins | Good for newbies! | Problems?

Back, will come around when I have time.
ot_207 is offline
wwzw
Member
Join Date: Feb 2009
Old 01-17-2012 , 06:36   Re: How to get the unique ID of weapon
Reply With Quote #3

cs_get_weapon_id ( index )
What is the index?
When a palyer have this weapon : new hid = cs_get_weapon_id ( index )
When this weapon has droped on ground : new gid = cs_get_weapon_id ( index )
When this has pick up by other palyer: new pid = cs_get_weapon_id ( index )

I need:
hid == gid == pid

I'm sorry for my bad English .
wwzw is offline
Devil259
Veteran Member
Join Date: Dec 2009
Location: France (59)
Old 01-17-2012 , 06:37   Re: How to get the unique ID of weapon
Reply With Quote #4

Quote:
Notes:

index is the entity index of the weapon
__________________
You can do anything you set your mind to, man.

Devil259 is offline
wwzw
Member
Join Date: Feb 2009
Old 01-17-2012 , 07:05   Re: How to get the unique ID of weapon
Reply With Quote #5

But it still can not achieve my goal.
Or:
When I pick up a weapon, how can I know who is falling for this weapon?
wwzw is offline
wwzw
Member
Join Date: Feb 2009
Old 01-17-2012 , 07:52   Re: How to get the unique ID of weapon
Reply With Quote #6

Like:
new oid;
pev(ent, pev_owner, oid);
But it is error .
Please help me .
wwzw is offline
Devil259
Veteran Member
Join Date: Dec 2009
Location: France (59)
Old 01-17-2012 , 11:28   Re: How to get the unique ID of weapon
Reply With Quote #7

To detect weapon pickup, hook Ham_Touch on pre with "armoury_entity" and "weaponbox" entities.
__________________
You can do anything you set your mind to, man.

Devil259 is offline
Reply



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 00:21.


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