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

wrong amount of ammunition


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Randons Gamers
Junior Member
Join Date: Feb 2014
Old 12-05-2014 , 11:07   wrong amount of ammunition
Reply With Quote #1

in code:
Code:
new ActiveWeapon = GetEntPropEnt(client, Prop_Send, "m_hActiveWeapon");
new pente = GetEntProp(ActiveWeapon, Prop_Send, "m_iClip1", 1);
pente ++;
SetEntProp(ActiveWeapon, Prop_Send, "m_iClip1", pente, 1);
instead of receiving 1 ammo you get 10
and 0.1 receives 51
and 0.01 receives 171

I just want to get 1 more ammo, help?
Randons Gamers is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 12-05-2014 , 11:34   Re: wrong amount of ammunition
Reply With Quote #2

GAME!
god dammed
Bacardi is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 12-05-2014 , 12:39   Re: wrong amount of ammunition
Reply With Quote #3

...isn't the value from m_iClip1 the array index in the player's m_iAmmo table that you need to check for the actual ammo count?

Maybe that's a different netprop I'm thinking of.
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 12-05-2014 at 12:42.
Powerlord is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 12-05-2014 , 13:06   Re: wrong amount of ammunition
Reply With Quote #4

Quote:
Originally Posted by Powerlord View Post
...isn't the value from m_iClip1 the array index in the player's m_iAmmo table that you need to check for the actual ammo count?

Maybe that's a different netprop I'm thinking of.
m_iClip1 locate weapon table.

Tested in cs:s and that snip work.

Question is, why he set Float value ?
And what is game and in which weapon he try set ammo ?
Bacardi is offline
Randons Gamers
Junior Member
Join Date: Feb 2014
Old 12-05-2014 , 20:39   Re: wrong amount of ammunition
Reply With Quote #5

I tried a number of ways, and I can not just add +1 clip

=====
excuse my language'm from Brazil
=====

Last edited by Randons Gamers; 12-05-2014 at 20:41.
Randons Gamers 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 21:26.


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