Raised This Month: $32 Target: $400
 8% 

Real Weapon Drop


Post New Thread Reply   
 
Thread Tools Display Modes
Siska1
Senior Member
Join Date: Feb 2020
Location: BedRock
Old 04-27-2021 , 08:22   Re: Real Weapon Drop
Reply With Quote #121

Midnight Kid, maybe you will know how to make this plugin work along with the molotov grenade ???
Siska1 is offline
Send a message via Skype™ to Siska1
Midnight Kid
Member
Join Date: Aug 2017
Location: Chornobay, Ukraine
Old 04-28-2021 , 04:55   Re: Real Weapon Drop
Reply With Quote #122

Quote:
Originally Posted by Siska1 View Post
Midnight Kid, maybe you will know how to make this plugin work along with the molotov grenade ???
That's possible by using an any specific Weapon Mod, where the Molotov grenade (or similar grenades) is registered in the code as a full-fledged weapon (and NOT just a custom feature which is used through a command), IMHO.
But I'm not a cool consulter in this way, so...

Last edited by Midnight Kid; 04-28-2021 at 04:57.
Midnight Kid is offline
Siska1
Senior Member
Join Date: Feb 2020
Location: BedRock
Old 04-28-2021 , 04:59   Re: Real Weapon Drop
Reply With Quote #123

/del

Last edited by Siska1; 12-22-2022 at 19:40.
Siska1 is offline
Send a message via Skype™ to Siska1
damian_roger
Junior Member
Join Date: Feb 2011
Location: szczecin
Old 07-03-2022 , 05:22   Re: Real Weapon Drop
Reply With Quote #124

it always drops 1 FB even if there are 2

Last edited by damian_roger; 07-03-2022 at 05:23.
damian_roger is offline
Send a message via ICQ to damian_roger Send a message via Skype™ to damian_roger
damian_roger
Junior Member
Join Date: Feb 2011
Location: szczecin
Old 10-23-2022 , 07:59   Re: Real Weapon Drop
Reply With Quote #125

When I have 2 it becomes 1

Quote:
static s_iBoxAmmo, s_iUserAmmo;
if( (s_iBoxAmmo=get_pdata_int(iEnt, (m_rgAmmo+AMMO_FLASHBANG), 4))>0 ) // weaponbox has flashbang information inside
{
if( (s_iUserAmmo=get_pdata_int(iPlrId, (m_rgAmmo_player+AMMO_FLASHBANG), 5))>=2 )
return HAM_SUPERCEDE;
else if( (s_iUserAmmo<=0 && s_iBoxAmmo>=2) )
{
ham_give_item(iPlrId, "weapon_flashbang");
ham_give_item(iPlrId, "weapon_flashbang");

emit_sound(iPlrId, CHAN_ITEM, "items/gunpickup2.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM);
emit_sound(iPlrId, CHAN_ITEM, "items/9mmclip1.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM);

set_pev(iEnt, pev_solid, SOLID_NOT);
set_pev(iEnt, pev_effects, EF_NODRAW);
dllfunc(DLLFunc_Think, iEnt);

return HAM_SUPERCEDE;
}
else if( (s_iUserAmmo==1 && s_iBoxAmmo==1) )
{
ham_give_item(iPlrId, "weapon_flashbang");

emit_sound(iPlrId, CHAN_ITEM, "items/9mmclip1.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM);

set_pev(iEnt, pev_solid, SOLID_NOT);
set_pev(iEnt, pev_effects, EF_NODRAW);
dllfunc(DLLFunc_Think, iEnt);

return HAM_SUPERCEDE;
}
else if( s_iUserAmmo==1 && s_iBoxAmmo>=2 )
{
set_pdata_int(iEnt, (m_rgAmmo+AMMO_FLASHBANG), (s_iBoxAmmo-1), 4);
ham_give_item(iPlrId, "weapon_flashbang");

emit_sound(iPlrId, CHAN_ITEM, "items/9mmclip1.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM);

return HAM_SUPERCEDE;
}
else if( s_iUserAmmo<=0 && ham_give_item(iPlrId, "weapon_flashbang")>0 )
{
emit_sound(iPlrId, CHAN_ITEM, "items/gunpickup2.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM);

set_pev(iEnt, pev_solid, SOLID_NOT);
set_pev(iEnt, pev_effects, EF_NODRAW);
dllfunc(DLLFunc_Think, iEnt);

return HAM_SUPERCEDE;

Last edited by damian_roger; 10-23-2022 at 08:00.
damian_roger is offline
Send a message via ICQ to damian_roger Send a message via Skype™ to damian_roger
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 17:12.


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