WeaponList message and ammo
Hello there!
I've done a new plugin for my mod (a new weapon for CS), which you can see here: https://www.youtube.com/watch?v=s7fyPTMZpys The problem is with the ammo. I was following the tutorial here: https://forums.alliedmods.net/showthread.php?t=175632 while making the plugin. I'm sending Code:
message_begin( MSG_ONE, MsgIndexWeaponList, .player = player ); As seen on the video, Bpammo is always 0, no matter how much primary ammo I buy. What's more - the weapon accually reloads when it can and if the ammo has been bought, but still the bpammo shows 0. Anyone knows how to fix it? And could someone explain me those params: PrimaryAmmoID, PrimaryAmmoMaxAmount, SecondaryAmmoID, SecondaryAmmoMaxAmount ? Greets and Merry Christmas! |
Re: WeaponList message and ammo
It shouldn't be that hard.
See these two links: https://wiki.alliedmods.net/Half-lif...nts#WeaponList https://github.com/Arkshine/CSSDK/bl.../wpn_sg550.cpp You can simply copy the GetItemInfo datas. |
Re: WeaponList message and ammo
Acctually I tried, but:
p->pszAmmo1 = "556Nato"; it's a string, and all I can send here are the int values. Anyway, the 556Nato ammo ID is 2 i think, but not really sure. Now the code looks like: PHP Code:
|
Re: WeaponList message and ammo
Which weapon you replace? SG-550? it has ammo id 4. And secondary ammod id / amount should be -1.
If you want to change ammo id, you need to hook Item_PrimaryAmmoIndex and override ammo and index and hook ItemInfo (only latest amxx) to override ammo there too. I'd suggest you to replace g3sg1, since it has ammo ID 2. Cheers. |
Re: WeaponList message and ammo
Thanks, I set the values you told me, NiHiLaNth and that did the trick. Thank you!
|
| All times are GMT -4. The time now is 15:20. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.