[ H3LP ] Use bpammo instead of clip?
Hello, I want to do a thing for one weapon only. I need to hide weapon clip of hud and when player shoot, decrease one bullet of bpammo.
|
Re: [ H3LP ] Use bpammo instead of clip?
I'm not sure it's possible to hide just the clip ammo. You could possibly make it display 0 or some constant value.
I was thinking HideWeapon message, but this hides other things in addition to ammo. Code:
1 (1<<0) - crosshair, ammo, weapons listPHP Code:
|
Re: [ H3LP ] Use bpammo instead of clip?
I will test that bugsy, thank you!
|
Re: [ H3LP ] Use bpammo instead of clip?
Bugsy, the code is subtracting 1 from the Bpammo of the player even if it is not firing. I print the value of IBP, is showing the Bpammo that the player should have, but in the hud shows the current value subtracted by one. So when the player's Bpammo is at 0, I can shoot one more time.
Apart from that problem, the code is OK! I did some tests and found that if you change the display value to -1, it will only show you the Bpammo. Edit: If I get user button and check if is IN_ATTACK the code work, but still player can shoot more one time if bpammo are 0 |
Re: [ H3LP ] Use bpammo instead of clip?
|
Re: [ H3LP ] Use bpammo instead of clip?
Here's what i've done, is not using bpammo insteand of ammo, but when you no more having bullets is settings directly the bullets as bpamoo and empty the bpammo, test to see by yourself how is working.
You can easily add a hudmessage and remove the clip using the bugsy method (HideWeaponMessage) by yourself and manage how you want. PHP Code:
|
Re: [ H3LP ] Use bpammo instead of clip?
Ok, thanks.
|
Re: [ H3LP ] Use bpammo instead of clip?
Bugsy, I tried to do the same with the Bpammo so it looks like the HUD of the knife, but I realized that there is no argument in the Curweapon as Clipammo. Can you help me?
https://wiki.alliedmods.net/Half-lif...ents#CurWeapon Edit: I will try with ammox. https://wiki.alliedmods.net/Half-lif...e_events#AmmoX |
Re: [ H3LP ] Use bpammo instead of clip?
What weapon are you trying to create exactly ?
Maybe we can find a work around instead of rewriting a lot of stuff.. |
Re: [ H3LP ] Use bpammo instead of clip?
Well, it's actually I added a power system to the Predators in my mod, so I don't need the clip/Bpammo from the plasma caster.
And the speargun just needs the Bpammo, it's already working. |
| All times are GMT -4. The time now is 22:55. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.