Try the above code now, I left something in that shouldn't be there
It works fine now! thanks!
Last two things and it will be complete:
when buying a 2nd primary weapon make it so it doesnt get dropped on the ground but go directly on inventory or is that hardcoded?
a bug in weapon drop plugin:
i sometimes use bots to fill position when odd players in sv.
can you modify the weapon drop plugin so bots drop weapons too? if they walk over a weapon while carrying one, when they die they wont drop both. and im also not sure it just doesnt disappear when they grab it.
Drop All Weapons On Death is free software;
you can redistribute it and/or modify it under the terms of the
GNU General Public License as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Drop All Weapons On Death; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
/*
a p228
b scout
c hegrenade
d xm1014
e mac10
f aug
g smokegrenade
h elite
i fiveseven
j ump45
k sg550
l galil
m famas
n usp
o glock18
p awp
q mp5navy
r m249
s m3
t m4a1
u tmp
v g3sg1
w flashbang
x deagle
x sg552
z ak47
{ p90
| defuser
*/
const MAX_ITEM_TYPES = 6; // hud item selection slots
const MAX_AMMO_SLOTS = 15; // not really slots // MAX_AMMO_SLOTS // don't need to set a 32 array since max ammo index is 14
// "player" offsets
// Store only slots 1,2 and 4 values cause we won't drop knife and let the game drop c4
// new const m_rgpPlayerItems_plr[] = {368, 369, 371}
new const m_rgpPlayerItems_CBasePlayer[6] = { 367 , 368 , ... };
const m_pActiveItem = 373;
new const m_rgAmmo_CBasePlayer[MAX_AMMO_SLOTS] = {376,377,...};
// proceed here at the end of CHalfLifeMultiplay::RestartRound so other weaponbox has already been removed
public OnPlaybackEvent_Post(flags, pInvoker, eventindex)
{
if( g_iFhPlaybackEventPost && eventindex == m_usResetDecals )
{
unregister_forward(FM_PlaybackEvent, g_iFhPlaybackEventPost, true);
g_iFhPlaybackEventPost = 0;
new iWeapon, iWeaponBox, iAmmoId, iBpAmmo, iNextWeapon;
new szWeapon[20], szModel[26];
new Float:flOrigin[3], Float:flAngles[3], Float:flWpnBxVelocity[3];
The plugin works fine, but is there a way to apply it to CZ bots as well?
There is no plugin that does it
Edit: Oh, and is it possible to make it compatible with the NoSil plugin?
The USP and M4A1 are both rolled when buying a new weapon, and you must roll the weapon you bought, grab the USP/M4A1, and then grab the weapon you bought to get both.
For example, the Drop All Weapons On Death plugin takes this into account and works fine
Do you think this or the other version have something in the code that could make the following bug?:
"a primary weapon after firing and getting its clip emptied, it wont reload even if you press R, till you switch to other weapon and back"
can your code possibly cause that, or is there no remote chance and should i look somewhere else?
your expert opinion will help me debug this since that bug does not happen frequently and i am unable to reproduce at will.