Raised This Month: $32 Target: $400
 8% 

One weapon, two ammo types


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 12-02-2018 , 12:57   One weapon, two ammo types
Reply With Quote #1

Hello, I'm developing one weapon that will have two ammo types (two clip and two bpammo). Will work as famas, when you press right button of mouse, switch to another fire mode, but instead will switch ammunition.

I was going to use SecAmmoVal and SecAmmoIcon to show the secondary ammo, but these messages it's not working in CS 1.6. I thought of work with ItemInfo pszAmmo2/iMaxAmmo2, but I don't think this will work. Any suggestion?
__________________









Last edited by CrazY.; 12-02-2018 at 12:59.
CrazY. is offline
Ghosted
Veteran Member
Join Date: Apr 2015
Location: Georgia
Old 12-02-2018 , 13:26   Re: One weapon, two ammo types
Reply With Quote #2

How about changing m_iPrimaryAmmoType
__________________

[MOD] CS Weapon Mod V1.7.1
[MM] MetaMod-C V1.0
[MOD] CS NPC Mod (5%)


Probably Left AM
Ghosted is offline
E1_531G
Senior Member
Join Date: Dec 2017
Old 12-02-2018 , 17:23   Re: One weapon, two ammo types
Reply With Quote #3

Do you want to change the ammo icon in the bottom right corner?
Take a look at some custom weapons made by Dias, like Thunderbolt, it changes the ammo icon.
__________________
My English is A0

Last edited by E1_531G; 12-02-2018 at 17:24.
E1_531G is offline
Ghosted
Veteran Member
Join Date: Apr 2015
Location: Georgia
Old 12-03-2018 , 03:02   Re: One weapon, two ammo types
Reply With Quote #4

Quote:
Originally Posted by E1_531G View Post
Do you want to change the ammo icon in the bottom right corner?
Take a look at some custom weapons made by Dias, like Thunderbolt, it changes the ammo icon.
ammo icon based on weaponlist file like weapon_thunderbolt.txt in sprites folder. That can't be done via scripts.

But you can create two weaponlist files and one will have first ammo type second will have another then after switching send message of weaponlist.
__________________

[MOD] CS Weapon Mod V1.7.1
[MM] MetaMod-C V1.0
[MOD] CS NPC Mod (5%)


Probably Left AM

Last edited by Ghosted; 12-03-2018 at 03:04.
Ghosted is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 12-07-2018 , 11:17   Re: One weapon, two ammo types
Reply With Quote #5

I did one trick with iMaxClip(), iMaxAmmo1() and m_iClip. Looks working fine for my purpose.
Maybe it's possible with m_iPrimaryAmmoType, but this would cause "conflict" between weapons, as some of them share same ammo.
__________________









Last edited by CrazY.; 12-07-2018 at 11:18.
CrazY. is offline
Reply


Thread Tools
Display Modes

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 03:11.


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