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

WeaponBox Life


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Gameplay        Approver:   HamletEagle (36)
11922911
Senior Member
Join Date: Dec 2011
Location: Yuen Long Country
Old 09-28-2013 , 12:55   WeaponBox Life
Reply With Quote #1

Description:
  • This plugin lets you set the remove time for the dropped weapon. (each type of weapons can handle)

Commands:
  • weaponbox_life <weapon short name> <remove time>
Set <weapon short name> to '*' for all weapons
Set <remove time> to -1 or <0 to reset
  • Examples:
weaponbox_life * 30.0
weaponbox_life g3sg1 5.0
weaponbox_life shield 0.0
  • Weapon short name:
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
shield
Credits:
ChangeLog:
Code:
 0.0.1
- First release
 0.0.2
- Added nades to support czero, improved code.
 0.0.3
- Added czero grenades check
- Changed code style
 0.0.4
- Added pev_valid check on Touch()
- Removed isGameCzero() function, use global variable instead.
My second useless plugin , Hope you'll like it.
Attached Files
File Type: sma Get Plugin or Get Source (weaponbox_life.sma - 1448 views - 3.6 KB)
__________________
youtube:
@holla16

Last edited by 11922911; 04-21-2016 at 01:41.
11922911 is offline
red_bull2oo6
Senior Member
Join Date: Mar 2012
Location: Braila, Romania
Old 09-28-2013 , 15:43   Re: WeaponBox Life
Reply With Quote #2

awesome.. i`m gonna test it tomorrow.
__________________

My PC Themes . .
red_bull2oo6 is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 09-29-2013 , 03:36   Re: WeaponBox Life
Reply With Quote #3

You could add nades to support czero.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
11922911
Senior Member
Join Date: Dec 2011
Location: Yuen Long Country
Old 09-29-2013 , 07:37   Re: WeaponBox Life
Reply With Quote #4

Quote:
Originally Posted by ConnorMcLeod View Post
You could add nades to support czero.
Thanks Connor.
Updated Version 0.0.2
__________________
youtube:
@holla16
11922911 is offline
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 09-29-2013 , 08:04   Re: WeaponBox Life
Reply With Quote #5

So this plugin removes the weapon from the ground after the given time?
__________________
Kia is offline
Old 09-29-2013, 09:17
11922911
This message has been deleted by 11922911.
Apollyon
SourceMod Donor
Join Date: Dec 2007
Location: California
Old 10-26-2013 , 16:34   Re: WeaponBox Life
Reply With Quote #6

Would it be possible to add support for dropped defuse kits?
__________________
Apollyon is offline
Old 10-26-2013, 17:49
jamil_hamida
This message has been deleted by ConnorMcLeod. Reason: troll
LordOfNothing
BANNED
Join Date: Jul 2013
Old 11-02-2013 , 05:57   Re: WeaponBox Life
Reply With Quote #7

I just test it and work very well
LordOfNothing is offline
xakintosh
I run no-steam servers!
Join Date: Feb 2010
Location: Edge of nowhere
Old 11-02-2013 , 10:52   Re: WeaponBox Life
Reply With Quote #8

Well done Sir !
__________________
As soon as possible.
xakintosh is offline
Send a message via Yahoo to xakintosh Send a message via Skype™ to xakintosh
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 04-10-2016 , 11:57   Re: WeaponBox Life
Reply With Quote #9

Few things that I don't like:
PHP Code:
new argument[17] = "weapon_"
You should use copy native, that's the proper way to copy a string into another.
Also, if you would look inside weapontype.h, in ReGameDLL project(github) you will see that WEAPON_SHIELDGUN index should be 99, not 2. 2 is CSW_GLOCK, but it's not used in cs anyway. For consistency, I would like you to use the correct value, even if this means you will have to resize your array.
Also, better handling for nades would be nice. Like checking game, if it's czero allow them in weaponbox_life, else block it(like you do for knife).

Other than that, code looks okay. Approved, but please fix the above, if you are active.
__________________
HamletEagle is offline
11922911
Senior Member
Join Date: Dec 2011
Location: Yuen Long Country
Old 04-17-2016 , 22:02   Re: WeaponBox Life
Reply With Quote #10

Quote:
Originally Posted by HamletEagle View Post
Few things that I don't like:
PHP Code:
new argument[17] = "weapon_"
You should use copy native, that's the proper way to copy a string into another.
Also, if you would look inside weapontype.h, in ReGameDLL project(github) you will see that WEAPON_SHIELDGUN index should be 99, not 2. 2 is CSW_GLOCK, but it's not used in cs anyway. For consistency, I would like you to use the correct value, even if this means you will have to resize your array.
Also, better handling for nades would be nice. Like checking game, if it's czero allow them in weaponbox_life, else block it(like you do for knife).

Other than that, code looks okay. Approved, but please fix the above, if you are active.
OK
__________________
youtube:
@holla16
11922911 is offline
Reply



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 09:01.


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