AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Clip ammo bug (solved) (https://forums.alliedmods.net/showthread.php?t=243615)

1pa1pb 07-07-2014 08:38

Clip ammo bug (solved)
 
hello everyone. i got a little problem here.

this gun Aeolis has "150" ammo, however its plugin is written "125" ammo.
so i changed the clip size to "150", and tested it in game,
it didn't show "150" clip ammo but a "106" clip ammo showed.

http://i.imgur.com/ELw7hnk.png

i just know how to change constants in amxx scripting,
so please help. thank you. :)

source files can be found here.

NiHiLaNTh 07-07-2014 12:37

Re: Clip ammo bug (CS Weapon: Aeolis)
 
When you send number >105 clip ammo HUD start acting weird. It show some random values instead of needed one :/

1pa1pb 07-07-2014 13:26

Re: Clip ammo bug (CS Weapon: Aeolis)
 
Quote:

Originally Posted by NiHiLaNTh (Post 2163463)
When you send number >105 clip ammo HUD start acting weird. It show some random values instead of needed one :/

but somehow "125" works.. :/

m4m3ts 07-08-2014 08:48

Re: Clip ammo bug (CS Weapon: Aeolis)
 
Quote:

Originally Posted by 1pa1pb (Post 2163494)
but somehow "125" works.. :/

because 125 is max clip in Normal CS.

1pa1pb 07-08-2014 11:10

Re: Clip ammo bug (CS Weapon: Aeolis)
 
Quote:

Originally Posted by m4m3ts (Post 2163821)
because 125 is max clip in Normal CS.

so do you mean 150 is impossible?

m4m3ts 07-08-2014 13:28

Re: Clip ammo bug (CS Weapon: Aeolis)
 
Quote:

Originally Posted by 1pa1pb (Post 2163887)
so do you mean 150 is impossible?

yes

meTaLiCroSS 07-08-2014 13:45

Re: Clip ammo bug (CS Weapon: Aeolis)
 
Everything had specific reasons.

https://wiki.alliedmods.net/Half-Lif...ents#CurWeapon

"ClipAmmo" is written as a "byte"

And a byte (or char): http://stackoverflow.com/questions/5...f-int-long-etc

It's between:

Quote:

-127 to 127
Some basics that you must know before sending huge numbers on a write_* :)

1pa1pb 07-09-2014 03:30

Re: Clip ammo bug (CS Weapon: Aeolis)
 
Quote:

Originally Posted by m4m3ts (Post 2163961)
yes

Quote:

Originally Posted by meTaLiCroSS (Post 2163984)
Everything had specific reasons.

https://wiki.alliedmods.net/Half-Lif...ents#CurWeapon

"ClipAmmo" is written as a "byte"

And a byte (or char): http://stackoverflow.com/questions/5...f-int-long-etc

It's between: -127 to 127

Some basics that you must know before sending huge numbers on a write_* :)

thank you
(i am a new-newbie :wink:

claudiuhks 07-09-2014 16:56

Re: Clip ammo bug (CS Weapon: Aeolis)
 
Quote:

Originally Posted by meTaLiCroSS (Post 2163984)

If signed. If unsigned, up to 255.


All times are GMT -4. The time now is 21:05.

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