AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Weapons Drop Ability (https://forums.alliedmods.net/showthread.php?t=121381)

ConnorMcLeod 03-15-2010 02:57

Weapons Drop Ability
 
2 Attachment(s)
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


Toastt 03-15-2010 02:58

Re: Weapons Drop Ability
 
cool :D

shuttle_wave 03-15-2010 04:53

Re: Weapons Drop Ability
 
very nice plugin

Kiske 03-15-2010 08:21

Re: Weapons Drop Ability
 
Nice!.

And..
What this ?:
Code:

SetHamReturnInteger( !! (DEFAULT_CANT_DROP_BITSUM & ( 1<<get_pdata_int(iEnt, m_iId, XTRA_OFS_WEAPON) )) ) 

EXteRmiNaToR 03-15-2010 08:43

Re: Weapons Drop Ability
 
Very nice!:up:

DarkGod 03-15-2010 10:00

Re: Weapons Drop Ability
 
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.

Exolent[jNr] 03-15-2010 10:13

Re: Weapons Drop Ability
 
Quote:

Originally Posted by DarkGod (Post 1118008)
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

KadiR 03-15-2010 10:35

Re: Weapons Drop Ability
 
Wow looks cool, better than those '' blocking c4 drop'' plugins. :wink:

ConnorMcLeod 03-15-2010 12:10

Re: Weapons Drop Ability
 
Quote:

Originally Posted by Kiske (Post 1117936)
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.

DarkGod 03-15-2010 12:44

Re: Weapons Drop Ability
 
Quote:

Originally Posted by Exolent[jNr] (Post 1118018)
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


All times are GMT -4. The time now is 19:47.

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