AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   One weapon, two ammo types (https://forums.alliedmods.net/showthread.php?t=312419)

CrazY. 12-02-2018 12:57

One weapon, two ammo types
 
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?

Ghosted 12-02-2018 13:26

Re: One weapon, two ammo types
 
How about changing m_iPrimaryAmmoType :bee:

E1_531G 12-02-2018 17:23

Re: One weapon, two ammo types
 
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.

Ghosted 12-03-2018 03:02

Re: One weapon, two ammo types
 
Quote:

Originally Posted by E1_531G (Post 2626459)
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.

CrazY. 12-07-2018 11:17

Re: One weapon, two ammo types
 
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.


All times are GMT -4. The time now is 07:38.

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