Did you add the ammo type? Search for CAmmoDef *GetAmmoDef() and you'll see how 
HL2 adds ammo types.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Xas
Sent: Tuesday, December 14, 2004 12:17 AM
To: [EMAIL PROTECTED]
Subject: RE: [hlcoders] M_iPrimaryAmmoType

I know that.
I was asking about their initialization, because my GiveAmmo() doesn't work.
Isn't it supposed to add the value of default_clip variable in the script 
weapon file ?
In my script file I have :
"clip_size"                             "1"
"default_clip"                  "5"

But when I made an impulse 101, my weapon get 1 ammo, and nothing into the clip.
I got nothing in my reserv. I don't understand why.
Why GiveAmmo returns me 0 ?



-----Message d'origine-----
De : [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] De la part de Mike Dussault Envoy� : mardi 14 
d�cembre 2004 02:35 � : [EMAIL PROTECTED] Objet : RE: [hlcoders] 
M_iPrimaryAmmoType

m_iPrimaryAmmo tells the ammo type that a gun uses. It comes from the 
"primary_ammo" field of the weapon's script file (in scripts\weapon_<class
name>.txt). m_iAmmo tells how much of each type of ammo a character has
name>on
them.

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Xas
Sent: Sunday, December 12, 2004 6:57 AM
To: [EMAIL PROTECTED]
Subject: [hlcoders] M_iPrimaryAmmoType

Can someone explain me how works the m_iPrimaryAmmoType.
How is it initialized exactly ?
How the m_iAmmo array of CBaseCombatCharacter class is initialized too ?

Because I'm missing something about adding a new weapon (and not replacing one).

Xas.


_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders


_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders




_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to