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

[L4D2] Improved Prevent M60 Drop


Post New Thread Reply   
 
Thread Tools Display Modes
MasterMind420
BANNED
Join Date: Nov 2010
Old 03-10-2017 , 11:43   Re: [L4D2] Improved Prevent M60 Drop
Reply With Quote #11

---VERSION 1.3---
Added ammo reload notification thru chat or hint
Moved ammo pile reload code to ammo_pile_weapon_cant_use_ammo event(more efficient)
MasterMind420 is offline
Lux
Veteran Member
Join Date: Jan 2015
Location: Cat
Old 03-10-2017 , 11:58   Re: [L4D2] Improved Prevent M60 Drop
Reply With Quote #12

you sure you even need this array on line @319
char class[256];// quite big for a simple string.
you don't use this array sWeapon[32] after you check the classname
@ 314

maybe you should remove class and use sWeapon to store your string.

GetEntityClassname(upgradeid, sWeapon, sizeof(sWeapon));

if (StrEqual(sWeapon, "upgrade_laser_sight"))
return;
__________________
Connect
My Plugins: KlickME
[My GitHub]

Commission me for L4D
Lux is offline
MasterMind420
BANNED
Join Date: Nov 2010
Old 03-10-2017 , 15:06   Re: [L4D2] Improved Prevent M60 Drop
Reply With Quote #13

Quote:
Originally Posted by Ludastar View Post
you sure you even need this array on line @319
char class[256];// quite big for a simple string.
you don't use this array sWeapon[32] after you check the classname
@ 314

maybe you should remove class and use sWeapon to store your string.

GetEntityClassname(upgradeid, sWeapon, sizeof(sWeapon));

if (StrEqual(sWeapon, "upgrade_laser_sight"))
return;
yah 256 is kinda large isnt it...i'll tinker with it later, sWeapon is being used to check if its an m60 or not...i'll take a look and if anything lower the array size for class.
MasterMind420 is offline
Mi.Cura
Veteran Member
Join Date: Dec 2016
Location: Brazil
Old 03-11-2017 , 12:57   Re: [L4D2] Improved Prevent M60 Drop
Reply With Quote #14

I tested it on my server, and I believe it's a puck to use the M60, so you do not lose the weapon, you need to click on reload (R) constantly, you also need to load it on the ammo bases during the match.
If you do not do these two actions constantly the player loses the weapon.
I hope this plugin can improve because it is a good job
Mi.Cura is offline
Mi.Cura
Veteran Member
Join Date: Dec 2016
Location: Brazil
Old 03-16-2017 , 14:47   Re: [L4D2] Improved Prevent M60 Drop
Reply With Quote #15

Charging the reserve ammunition in the ammo pile works perfectly, but the biggest problem is that when the normal ammunition (150), if you let it end you can no longer use the m60. You can not recharge even if you have reserve ammo (2nd clip) full.

It will be possible to correct this

Last edited by Mi.Cura; 03-16-2017 at 14:47.
Mi.Cura is offline
MasterMind420
BANNED
Join Date: Nov 2010
Old 03-23-2017 , 15:53   Re: [L4D2] Improved Prevent M60 Drop
Reply With Quote #16

Quote:
Originally Posted by Mi.Cura View Post
Charging the reserve ammunition in the ammo pile works perfectly, but the biggest problem is that when the normal ammunition (150), if you let it end you can no longer use the m60. You can not recharge even if you have reserve ammo (2nd clip) full.

It will be possible to correct this
An update will be coming very soon, i'm not sure why your having that specific issue, but i've changed some code that may address the issue, no guarantee though, unless many others experience the issue or I have personally it would be hard for me to narrow down exactly whats causing it. But in the next release i'm changing how this works slightly...
MasterMind420 is offline
Mi.Cura
Veteran Member
Join Date: Dec 2016
Location: Brazil
Old 03-23-2017 , 22:11   Re: [L4D2] Improved Prevent M60 Drop
Reply With Quote #17

Okay, thanks for the reply. I'll stay tuned to the post.

It will be great if you can get better, this plugin
Mi.Cura is offline
MasterMind420
BANNED
Join Date: Nov 2010
Old 05-21-2017 , 10:32   Re: [L4D2] Improved Prevent M60 Drop
Reply With Quote #18

---VERSION 1.4---
Converted to new syntax
Changed reload code back to player use, can reload from any weapon(thanks ngBuckWangs)
MasterMind420 is offline
MasterMind420
BANNED
Join Date: Nov 2010
Old 07-05-2017 , 02:53   Re: [L4D2] Improved Prevent M60 Drop
Reply With Quote #19

Temporary rollback to 1.3 for those having issues...

Last edited by MasterMind420; 07-05-2017 at 06:10.
MasterMind420 is offline
MasterMind420
BANNED
Join Date: Nov 2010
Old 07-05-2017 , 06:12   Re: [L4D2] Improved Prevent M60 Drop
Reply With Quote #20

VERSION 1.5
Properly converted to new syntax
Corrected a mistake which caused ammo locking to effect other weapons

Last edited by MasterMind420; 07-05-2017 at 06:13.
MasterMind420 is offline
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 20:09.


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