Raised This Month: $51 Target: $400
 12% 

[HELP] Ham_Weapon_Reload


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
keyblade
Member
Join Date: Nov 2010
Location: China
Old 10-22-2011 , 01:36   [HELP] Ham_Weapon_Reload
Reply With Quote #1

PHP Code:
...
RegisterHam(Ham_Weapon_Reloadszweaponname"Reload"1)
...
public 
Reload(iweapon
the iweapon is the weapon id?but in the game its value is 211...

how can i get the weapon id like this?
http://wiki.amxmodx.org/CS_Weapons_Information
keyblade is offline
jim_yang
Veteran Member
Join Date: Aug 2006
Old 10-22-2011 , 04:10   Re: [HELP] Ham_Weapon_Reload
Reply With Quote #2

const m_iId = 43;
get_pdata_int(iweapon, m_iId)
__________________
Project : CSDM all in one - 99%
<team balancer#no round end#entity remover#quake sounds#fake full#maps management menu#players punishment menu#no team flash#colored flashbang#grenade trails#HE effect#spawn protection#weapon arena#weapon upgrade#auto join#no weapon drop#one name>
jim_yang is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 10-22-2011 , 05:17   Re: [HELP] Ham_Weapon_Reload
Reply With Quote #3

get_pdata_int(iweapon, m_iId, 4) is more correct.

You can also use cs_get_weapon_id( iweapon )
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
keyblade
Member
Join Date: Nov 2010
Location: China
Old 10-22-2011 , 07:21   Re: [HELP] Ham_Weapon_Reload
Reply With Quote #4

thank you!
btw, iweapon is the entity index in the world?
keyblade is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 10-22-2011 , 08:06   Re: [HELP] Ham_Weapon_Reload
Reply With Quote #5

The entity index, yes.
__________________
Arkshine 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 15:44.


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