Raised This Month: $ Target: $400
 0% 

ammo


Post New Thread Closed Thread   
 
Thread Tools Display Modes
Author Message
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 04-06-2009 , 13:14   Re: ammo
#1

AFAIK, give_item return the entity index if it was actually given.

PHP Code:
new iWeapon give_item(id"weapon_m4a1")
if( 
iWeapon )
{
    
cs_set_weapon_ammp(iWeapon30// but should already be 30 when you receive it
}
cs_set_user_bpammo(idCSW_M4A190
If you need to retrieve player weapon entity index, then use my stock :
http://forums.alliedmods.net/showthread.php?t=85962

PHP Code:
new iM4A1 ham_get_user_weaponent(idCSW_M4A11)
//new iM4A1 = ham_get_user_weaponent2(id, CSW_M4A1) // 1st one is faster, but this one is fine too.
if( iM4A1 )
{
    
cs_set_weapon_ammo(iM4A130)

__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 04-06-2009 at 13:21.
ConnorMcLeod is offline
~Ice*shOt
Veteran Member
Join Date: Mar 2009
Location: Lithuania
Old 04-06-2009 , 14:01   Re: ammo
#2

Not so here as I?
~Ice*shOt is offline
Send a message via Skype™ to ~Ice*shOt
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 04-06-2009 , 14:05   Re: ammo
#3

I don't understand you.
Where are you from ?
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Closed Thread



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 02:28.


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