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

Ham_Weapon_ExtractClipAmmo


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 03-19-2017 , 15:04   Ham_Weapon_ExtractClipAmmo
Reply With Quote #1

Can someone show me an example of how to use that?
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 03-19-2017 , 15:24   Re: Ham_Weapon_ExtractClipAmmo
Reply With Quote #2

I think that's the same as cs_get_user_bpammo
__________________
edon1337 is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 03-19-2017 , 16:01   Re: Ham_Weapon_ExtractClipAmmo
Reply With Quote #3

Info is in ham_const.inc
Code:
	/**
	 * Description:		Gets clip ammo from the target weapon.
	 *					This function is not supported in Earth's Special Forces mod.
	 * Forward params:	function(this, idTarget)
	 * Return type:		Integer.
	 * Execute Params:	ExecuteHam(Ham_Weapon_ExtractAmmo, this, idTarget)
	 */
	Ham_Weapon_ExtractClipAmmo,
__________________
Bugsy is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 03-19-2017 , 16:15   Re: Ham_Weapon_ExtractClipAmmo
Reply With Quote #4

Then the this will be what?
Is better to use this or get_user_weapon()?
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo

Last edited by EFFx; 03-19-2017 at 16:15.
EFFx is offline
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 07-04-2017 , 12:27   Re: Ham_Weapon_ExtractClipAmmo
Reply With Quote #5

'this' will be the entity idk if the weapon entity or player entity, you can test and see.
__________________
Project: Among Us
Craxor is offline
Send a message via ICQ to Craxor
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 07-04-2017 , 12:55   Re: Ham_Weapon_ExtractClipAmmo
Reply With Quote #6

Quote:
Originally Posted by Craxor View Post
'this' will be the entity idk if the weapon entity or player entity, you can test and see.
int CBasePlayerWeapon::ExtractAmmo(CBasePlayerWea pon *pWeapon)

https://github.com/s1lentq/ReGameDLL...pons.cpp#L1509
__________________

Last edited by HamletEagle; 07-04-2017 at 12:56.
HamletEagle is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 07-04-2017 , 13:41   Re: Ham_Weapon_ExtractClipAmmo
Reply With Quote #7

Guess it's the same as get_user_weapon does.
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 07-04-2017 , 14:07   Re: Ham_Weapon_ExtractClipAmmo
Reply With Quote #8

It takes the weapon entity index, not a CSW_*. Read the comment, you will know what this function does, and no, it's not like get_user_weapon. It's totally not.
The name may confuse you.

Quote:
// called by the new item with the existing item as parameter
//
// if we call ExtractAmmo(), it's because the player is picking up this type of weapon for
// the first time. If it is spawned by the world, m_iDefaultAmmo will have a default ammo amount in it.
// if this is a weapon dropped by a dying player, has 0 m_iDefaultAmmo, which means only the ammo in
// the weapon clip comes along.
__________________

Last edited by HamletEagle; 07-04-2017 at 14:08.
HamletEagle is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 07-04-2017 , 14:14   Re: Ham_Weapon_ExtractClipAmmo
Reply With Quote #9

Aaah, got it. Thankiu.
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx 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 08:50.


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