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

Weapons Drop Ability


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Gameplay        Approver:   Hawk552 (427)
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 03-15-2010 , 02:57   Weapons Drop Ability
Reply With Quote #1

Weapons Drop Ability




.: Description :.


This plugin allows to define which weapons can be dropped or not (except knife).
I first made this plugin to enable nades drop, but you can also restrict any weapon or c4.



.: Commands :.

  • weapon_candrop <weaponname> <0/1>
    Set 1 to enable weapon drop, 0 to disable it

Weapons Names List :
  • p228
  • scout
  • hegrenade
  • xm1014
  • c4
  • mac10
  • aug
  • smokegrenade
  • elite
  • fiveseven
  • ump45
  • sg550
  • galil
  • famas
  • usp
  • glock18
  • awp
  • mp5navy
  • m249
  • m3
  • m4a1
  • tmp
  • g3sg1
  • flashbang
  • deagle
  • sg552
  • ak47
  • p90



.: Requirements :.


Fakemeta and hamsandwich modules.



.: Changelog :.

Code:
v0.0.2 (16 mar 2010)
- Changed command name and use to support all weapons

v0.0.1 (15 mar 2010)
- First Release
Attached Files
File Type: sma Get Plugin or Get Source (weapons_drop_ability.sma - 5427 views - 2.6 KB)
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 03-17-2010 at 02:37.
ConnorMcLeod is offline
Toastt
BANNED
Join Date: Nov 2009
Old 03-15-2010 , 02:58   Re: Weapons Drop Ability
Reply With Quote #2

cool
Toastt is offline
shuttle_wave
Veteran Member
Join Date: Apr 2009
Location: New Zealand
Old 03-15-2010 , 04:53   Re: Weapons Drop Ability
Reply With Quote #3

very nice plugin
__________________
JailBreak Mod with Plugin API ( 90% ) Public
shuttle_wave is offline
Kiske
Veteran Member
Join Date: May 2009
Old 03-15-2010 , 08:21   Re: Weapons Drop Ability
Reply With Quote #4

Nice!.

And..
What this ?:
Code:
SetHamReturnInteger( !! (DEFAULT_CANT_DROP_BITSUM & ( 1<<get_pdata_int(iEnt, m_iId, XTRA_OFS_WEAPON) )) )  
__________________

Kiske is offline
Send a message via Skype™ to Kiske
EXteRmiNaToR
Senior Member
Join Date: Dec 2009
Old 03-15-2010 , 08:43   Re: Weapons Drop Ability
Reply With Quote #5

Very nice!
EXteRmiNaToR is offline
DarkGod
SourceMod DarkCrab
Join Date: Jul 2007
Location: Sweden
Old 03-15-2010 , 10:00   Re: Weapons Drop Ability
Reply With Quote #6

Quote:
weapons_cant_drop "bgt" to disable the plugin
weapons_cant_drop "" to enable nades drop
weapons_cant_drop "bdgt" to restrict c4
weapons_cant_drop "d" to restrict c4 and enable nades drop
Doesn't seem to be exactly correct to me, they look a bit mixed up.
__________________
DarkGod is offline
Send a message via AIM to DarkGod Send a message via MSN to DarkGod
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 03-15-2010 , 10:13   Re: Weapons Drop Ability
Reply With Quote #7

Quote:
Originally Posted by DarkGod View Post
Doesn't seem to be exactly correct to me, they look a bit mixed up.
Standard gameplay is you can't drop your grenades or knife but all other weapons.
Since knife isn't available for this plugin, grenades are all that is left.

The cvar's contents are the weapons that can't be dropped.

"bgt" are the three grenade types.
"d" is the c4

"" means anything can be dropped
"d" means only c4 can't be dropped, thus allowing grenades to be dropped
"bgt" means only grenades can't be dropped, which is normal
"bdgt" means grenades and c4 can't be dropped
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
KadiR
Unnecessary Member
Join Date: Aug 2008
Location: Zürich / Switzerland
Old 03-15-2010 , 10:35   Re: Weapons Drop Ability
Reply With Quote #8

Wow looks cool, better than those '' blocking c4 drop'' plugins.
KadiR is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 03-15-2010 , 12:10   Re: Weapons Drop Ability
Reply With Quote #9

Quote:
Originally Posted by Kiske View Post
Nice!.

And..
What this ?:
Code:
SetHamReturnInteger( !! (DEFAULT_CANT_DROP_BITSUM & ( 1<<get_pdata_int(iEnt, m_iId, XTRA_OFS_WEAPON) )) )  
a & b returns 0 if no bit is common to both value, or the common bits if there are some.
!!0 is equal to 0
!!ANYVALUEOTHERTHANZERO is equal to 1

Could have cast to bool instead.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
DarkGod
SourceMod DarkCrab
Join Date: Jul 2007
Location: Sweden
Old 03-15-2010 , 12:44   Re: Weapons Drop Ability
Reply With Quote #10

Quote:
Originally Posted by Exolent[jNr] View Post
Standard gameplay is you can't drop your grenades or knife but all other weapons.
Since knife isn't available for this plugin, grenades are all that is left.

The cvar's contents are the weapons that can't be dropped.

"bgt" are the three grenade types.
"d" is the c4

"" means anything can be dropped
"d" means only c4 can't be dropped, thus allowing grenades to be dropped
"bgt" means only grenades can't be dropped, which is normal
"bdgt" means grenades and c4 can't be dropped
Thanks for the explanation.
I guess I misunderstood quite a bit. :p
__________________
DarkGod is offline
Send a message via AIM to DarkGod Send a message via MSN to DarkGod
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 04:26.


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