I would use +use (with some filtering to catch legal attempt of +use).
Or it could be like holding +attack2 and using +attack to select, then when you release it throws the grenade (could be right after selection or player will have to redo +attack2)
about the +use button is not a so good ideea, since it is being used by the parachute
the second method you mentioned would be a little annoying for the players, because you will have to select it everytime before launching, in some cases it would require 4-5 clicks to launch a grenade
the best choice would be "impulse 201" aka "T" key, but im already using it in other plugins, so the next suitable choice would be "showbriefing", i tested it with chat prints, and it works well
btw arkshine, if you are here, could you look over the snark infector plugin request i made in this section please?
i have some issues with run time errors
because you will have to select it everytime before launching
Of course that if you select one it will be used by default until you decide to select another one. You know easily when you're holding +attack2 and when key is released. So while you're holding +attack2, you can either release it right away to throw the grenade or selecting first the grenade type by default with +attack1, then once your release it throws the new grenade.
I did it with the "showbriefing" cmd because you are not yet decided what to use. Later, if you want another way of triggering this let me know. It is easy to know when a button is released(oldbutton contain it, but button no).
public CBasePlayer_ItemDeploy(Ent) { EnableHamForward(HandleCBaseEntity_AK47IdleHook) }
public CBasePlayer_ItemHolster(Ent) { DisableHamForward(HandleCBaseEntity_AK47IdleHook) }
The bind is on l, by default HE is choosed. Push "l" one time and it will select flashbang, one more time smoke. After that it will choose He. So the cycle is he -> flash -> smoke. Also the previous bugs should be fixed.
1. Two grenades are launched at the same time ( not of the same type )
2. If the player has more grenades and more grenade types, sometimes one grenade remains deployed in his hand after launching
1. It's impossible to be different types. I was able to reproduce only with grenades of the same type. Find this line UserTimer[id] = CurrentGameTime + 0.1 and replace 0.1 by 0.3. Tell me if this fix it.
2. Give me some steps to reproduce the issue. I had all grenade types: 2 fl, 1 he(also tried with 2 he) and 1 sg. Everything seems to be ok. You may be running other plugins that do something weird. Try without any custom plugin.
- Buy one grenade of each or more then press right click ( doesn't happen if smoke is selected )
- Buy more grenades of the same type then right click ( except for flashbangs and smoke )
2. Grenades remain deployed after launching
- Buy more grenades of the same type ( 3 for HE / 2 for smoke )
I had the older version in the plugins.ini aswell, that was the cause...
Sorry, things are getting a little messy when you have 6 test servers and you work on 10 things at the same time...
Everythings works fine now but i have a suggestion
If player has for example He Grenade type selected, after he runs out of He Grenades, the weapon should automaticaly switch to the next grenade type
Also when he runs out of grenades instead of grenade type it shouw display "No Grenades Available"
I have done the V model of the weapon, i've made the custom animation, reduced textures, configurated the frames of the animations, etc
I've managed to reduce the size of the ressources of the weapon to 400 KB the v model ( the largest ) without affecting the good aspect of the weapon
I have also added sound for the grenade launcher
If you could complete my suggestion above, it would be great, i think i could get the weapon done this night