AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [CS:S] Grenade Drop (he, flash, smoke) (https://forums.alliedmods.net/showthread.php?t=172315)

rodipm 11-18-2011 20:28

[CS:S] Grenade Drop (he, flash, smoke)
 
1 Attachment(s)
Description:

This is a very(very very) simple plugin that allows you to drop your grenades, like HEs, smokes and flashbangs.

Cvar:

- "gd_dropknife" -> Allows you to drop your knife too. 0 - Don't drop | 1 - Drop / default: "gd_dropknife 0"

Requires:

- Only sourcemod 1.4

Install:

- Just put the smx file in your addons/plugins folder!


Changelog:

- Changed from RegConsoleCmd to AddCommandListener
- Added a check for "m_hActiveWeapon" is a valid edict
- Added a Cvar to allow you to drop your knife
- Fixed both flashbang dropping.

Thank you guys TnTSCS, Dr!fter, and GrO very much!!
:)

Enjoy

TnTSCS 11-18-2011 21:48

Re: [CS:S] Grenade Drop (he, flash, smoke)
 
neat... I wish this was allowed by default...

Dr!fter 11-18-2011 22:09

Re: [CS:S] Grenade Drop (he, flash, smoke)
 
You should use AddCommandListner rather then RegConsoleCmd. Otherwise everything looks good! Once you make that change I'll Approve this :D

KyleS 11-18-2011 22:24

Re: [CS:S] Grenade Drop (he, flash, smoke)
 
Thanks for this!

rodipm 11-19-2011 10:09

Re: [CS:S] Grenade Drop (he, flash, smoke)
 
Dr!fter, already changed from RegConsoleCmd to AddCommandListener
:)
thanks

Despirator 11-19-2011 10:54

Re: [CS:S] Grenade Drop (he, flash, smoke)
 
why did you do return Plugin_Handled on the successful drop? server won't log "drop" command

rodipm 11-19-2011 13:22

Re: [CS:S] Grenade Drop (he, flash, smoke)
 
Quote:

Originally Posted by Despirator (Post 1599152)
why did you do return Plugin_Handled on the successful drop? server won't log "drop" command

because for some reason when you use drop to grenades it will drop the actuall grenade but will drop the next weapon too. I don't know why it happens, but i had to return Plugin_Handled to not drop the next weapon

GrO 11-19-2011 14:04

Re: [CS:S] Grenade Drop (he, flash, smoke)
 
Nice little plugin, thanks. Few years ago es_tools was allowing such functionality, but since I've stopped using ES long time ago there was nothing like this for SM, good job.

rodipm 11-19-2011 14:12

Re: [CS:S] Grenade Drop (he, flash, smoke)
 
Tanks GrO!

databomb 11-19-2011 16:57

Re: [CS:S] Grenade Drop (he, flash, smoke)
 
Excellent idea! Also, you might want to check if m_hActiveWeapon returns -1 because while it *is* a valid return value, it won't be so great when you try to get the classname for that. I'd advise IsValidEdict


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

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