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

[L4D2] Charger Power


Post New Thread Reply   
 
Thread Tools Display Modes
spumer
Senior Member
Join Date: Aug 2011
Old 02-25-2013 , 10:45   Re: [L4D2] Charger Power
Reply With Quote #61

I just download plugin sources. Reading them i found this function, and...
Code:
public bool:TraceFilterClients(i_Entity, i_Mask, any:i_Data)
{
    if (i_Entity == i_Data)
        return false
        
    if (1 <= i_Entity <= MaxClients)
        return false
        
    return true
}
whaaaaaaaaaaaaaaaaaat?
This really work fine? May be replace to
Code:
public bool:TraceFilterClients(i_Entity, i_Mask, any:i_Data)
{
    // because 0 - is World, 1 to MaxClients is clients, and other is entity (networked and not)
    return i_Entity != i_Data && i_Entity > MaxClients;
}
Dude, you have memory leak. Close handle in EventChargeEnd function for prevent server lags:
Code:
h_Trace = TR_TraceRayFilterEx(/*...*/);
if (TR_DidHit(h_Trace)) { /*...*/ }
CloseHandle(h_Trace);

Last edited by spumer; 02-26-2013 at 07:08. Reason: Add memory leak info
spumer is offline
cravenge
Veteran Member
Join Date: Nov 2015
Location: Chocolate Factory
Old 12-05-2016 , 09:17   Re: [L4D2] Charger Power
Reply With Quote #62

Update (1.3)
: Transitioned to new syntax.
: Removed instructor hints for now. I'll add it back.
: Fixed memory leaks.
: Created events that should have been fired.
: Fully works with updated [L4D2] Charger Power - Object Glow plugin by Silvers.

Please report any errors.
Attached Files
File Type: sp Get Plugin or Get Source (super_charge-l4d2.sp - 980 views - 9.7 KB)
cravenge is offline
Krufftys Killers
Senior Member
Join Date: Jan 2014
Old 12-06-2016 , 17:52   Re: [L4D2] Charger Power
Reply With Quote #63

Quote:
Originally Posted by cravenge View Post
Update (1.3)
: Transitioned to new syntax.
: Removed instructor hints for now. I'll add it back.
: Fixed memory leaks.
: Created events that should have been fired.
: Fully works with updated [L4D2] Charger Power - Object Glow plugin by Silvers.

Please report any errors.
L 12/06/2016 - 17:46:13: SourceMod error session started
L 12/06/2016 - 17:46:13: Info (map "c1m2_streets") (file "errors_20161206.log")
L 12/06/2016 - 17:46:13: [SM] Exception reported: Handle 47c70744 is invalid (error 3)
L 12/06/2016 - 17:46:13: [SM] Blaming: super_charge-l4d2.smx
L 12/06/2016 - 17:46:13: [SM] Call stack trace:
L 12/06/2016 - 17:46:13: [SM] [0] CloseHandle
L 12/06/2016 - 17:46:13: [SM] [1] Line 253, /home/forums/content/files/2/6/5/1/0/4/159052.attach::OnChargerChargeEnd
L 12/06/2016 - 17:47:09: [SM] Exception reported: Handle 8d460760 is invalid (error 3)
L 12/06/2016 - 17:47:09: [SM] Blaming: super_charge-l4d2.smx
L 12/06/2016 - 17:47:09: [SM] Call stack trace:
L 12/06/2016 - 17:47:09: [SM] [0] CloseHandle
L 12/06/2016 - 17:47:09: [SM] [1] Line 253, /home/forums/content/files/2/6/5/1/0/4/159052.attach::OnChargerChargeEnd
L 12/06/2016 - 17:48:27: [SM] Exception reported: Handle 1650758 is invalid (error 3)
L 12/06/2016 - 17:48:27: [SM] Blaming: super_charge-l4d2.smx
L 12/06/2016 - 17:48:27: [SM] Call stack trace:
L 12/06/2016 - 17:48:27: [SM] [0] CloseHandle
L 12/06/2016 - 17:48:27: [SM] [1] Line 253, /home/forums/content/files/2/6/5/1/0/4/159052.attach::OnChargerChargeEnd
L 12/06/2016 - 17:50:27: Error log file session closed.
Krufftys Killers is offline
PVNDV
Junior Member
Join Date: Mar 2015
Old 12-06-2016 , 19:26   Re: [L4D2] Charger Power
Reply With Quote #64

Charger Power + Unstoppable Charger
Attached Files
File Type: sp Get Plugin or Get Source (unstoppable_charger.sp - 899 views - 15.7 KB)
File Type: txt l4d2addresses.txt (23.2 KB, 400 views)

Last edited by PVNDV; 01-28-2017 at 16:30. Reason: updated gamedata
PVNDV is offline
cravenge
Veteran Member
Join Date: Nov 2015
Location: Chocolate Factory
Old 12-06-2016 , 21:44   Re: [L4D2] Charger Power
Reply With Quote #65

Quote:
Originally Posted by PVNDV View Post
Charger Power + Unstoppable Charger
Hate to burst your bubble, sport but the plugin needs gamedata update and I'm on it.

Last edited by cravenge; 12-06-2016 at 21:45.
cravenge is offline
PVNDV
Junior Member
Join Date: Mar 2015
Old 12-07-2016 , 03:43   Re: [L4D2] Charger Power
Reply With Quote #66

Quote:
Originally Posted by cravenge View Post
Hate to burst your bubble, sport but the plugin needs gamedata update and I'm on it.
Updated previous post, the last gamedata added.

Last edited by PVNDV; 01-28-2017 at 16:32.
PVNDV is offline
phoenix0001
Senior Member
Join Date: Apr 2010
Location: China
Old 09-17-2017 , 03:28   Re: [L4D2] Charger Power
Reply With Quote #67

Quote:
Originally Posted by cravenge View Post
Update (1.3)
: Transitioned to new syntax.
: Removed instructor hints for now. I'll add it back.
: Fixed memory leaks.
: Created events that should have been fired.
: Fully works with updated [L4D2] Charger Power - Object Glow plugin by Silvers.

Please report any errors.
L 09/17/2017 - 15:21:43: [SM] Exception reported: Handle 3cfe021e is invalid (error 3)
L 09/17/2017 - 15:21:43: [SM] Blaming: super_charge-l4d2.smx
L 09/17/2017 - 15:21:43: [SM] Call stack trace:
L 09/17/2017 - 15:21:43: [SM] [0] CloseHandle
L 09/17/2017 - 15:21:43: [SM] [1] Line 253, C:\1L4D2\left4dead2\addons\sourcemod\scriptin g\super_charge-l4d2.sp::OnChargerChargeEnd
L 09/17/2017 - 15:21:45: [SM] Exception reported: Handle 3d2d01fc is invalid (error 3)
L 09/17/2017 - 15:21:45: [SM] Blaming: super_charge-l4d2.smx
L 09/17/2017 - 15:21:45: [SM] Call stack trace:
L 09/17/2017 - 15:21:45: [SM] [0] CloseHandle
L 09/17/2017 - 15:21:45: [SM] [1] Line 253, C:\1L4D2\left4dead2\addons\sourcemod\scriptin g\super_charge-l4d2.sp::OnChargerChargeEnd
L 09/17/2017 - 15:22:05: [SM] Exception reported: Handle 400e01e6 is invalid (error 3)
L 09/17/2017 - 15:22:05: [SM] Blaming: super_charge-l4d2.smx
L 09/17/2017 - 15:22:05: [SM] Call stack trace:
L 09/17/2017 - 15:22:05: [SM] [0] CloseHandle
L 09/17/2017 - 15:22:05: [SM] [1] Line 253, C:\1L4D2\left4dead2\addons\sourcemod\scriptin g\super_charge-l4d2.sp::OnChargerChargeEnd
__________________
I like this BBS sharing of spirit

I come from China, my English is poor
phoenix0001 is offline
Pyc
Senior Member
Join Date: Jan 2014
Old 09-24-2017 , 06:03   Re: [L4D2] Charger Power
Reply With Quote #68

Quote:
Originally Posted by phoenix0001 View Post
L 09/17/2017 - 15:21:43: [SM] Exception reported: Handle 3cfe021e is invalid (error 3)
L 09/17/2017 - 15:21:43: [SM] Blaming: super_charge-l4d2.smx
L 09/17/2017 - 15:21:43: [SM] Call stack trace:
L 09/17/2017 - 15:21:43: [SM] [0] CloseHandle
L 09/17/2017 - 15:21:43: [SM] [1] Line 253, C:\1L4D2\left4dead2\addons\sourcemod\scriptin g\super_charge-l4d2.sp::OnChargerChargeEnd
L 09/17/2017 - 15:21:45: [SM] Exception reported: Handle 3d2d01fc is invalid (error 3)
L 09/17/2017 - 15:21:45: [SM] Blaming: super_charge-l4d2.smx
L 09/17/2017 - 15:21:45: [SM] Call stack trace:
L 09/17/2017 - 15:21:45: [SM] [0] CloseHandle
L 09/17/2017 - 15:21:45: [SM] [1] Line 253, C:\1L4D2\left4dead2\addons\sourcemod\scriptin g\super_charge-l4d2.sp::OnChargerChargeEnd
L 09/17/2017 - 15:22:05: [SM] Exception reported: Handle 400e01e6 is invalid (error 3)
L 09/17/2017 - 15:22:05: [SM] Blaming: super_charge-l4d2.smx
L 09/17/2017 - 15:22:05: [SM] Call stack trace:
L 09/17/2017 - 15:22:05: [SM] [0] CloseHandle
L 09/17/2017 - 15:22:05: [SM] [1] Line 253, C:\1L4D2\left4dead2\addons\sourcemod\scriptin g\super_charge-l4d2.sp::OnChargerChargeEnd
try comment line 251
Code:
		CloseHandle(trace);
I think, this error because CloseHandle(trace) doubling in 251 and 253 lines (oh my poor english)
super_charge-l4d2.sp

Last edited by Pyc; 09-24-2017 at 06:05.
Pyc is offline
rollslow
Junior Member
Join Date: Nov 2018
Old 11-15-2018 , 10:12   Re: [L4D2] Charger Power
Reply With Quote #69

//// super_charge-l4d2.sp
//
// super_charge-l4d2.sp(90) : warning 219: local variable "timer" shadows a variable at a preceding level
// super_charge-l4d2.sp(246) : error 076: syntax error in the expression, or invalid function call
// super_charge-l4d2.sp(256) : warning 219: local variable "timer" shadows a variable at a preceding level
// super_charge-l4d2.sp(267) : error 021: symbol already defined: "RemoveEntity"
// super_charge-l4d2.sp(269) : error 010: invalid function or declaration
// super_charge-l4d2.sp(271) : error 010: invalid function or declaration
// super_charge-l4d2.sp(274) : error 021: symbol already defined: "RemoveEdict"
// super_charge-l4d2.sp(275) : error 010: invalid function or declaration
// super_charge-l4d2.sp(293) : warning 219: local variable "timer" shadows a variable at a preceding level
// super_charge-l4d2.sp(267) : warning 203: symbol is never used: "any"
// super_charge-l4d2.sp(267) : warning 203: symbol is never used: "objEnt"
// super_charge-l4d2.sp(267) : warning 203: symbol is never used: "timer"
//
// 6 Errors.
//
// Compilation Time: 0,67 sec
rollslow is offline
lightphoenix2
Member
Join Date: Feb 2016
Old 01-18-2019 , 03:00   Re: [L4D2] Charger Power
Reply With Quote #70

Try my version! Let me know if it cause any errors.
Attached Files
File Type: smx super_charge-l4d2.smx (10.4 KB, 274 views)
File Type: sp Get Plugin or Get Source (super_charge-l4d2.sp - 603 views - 9.7 KB)

Last edited by lightphoenix2; 01-19-2019 at 02:33.
lightphoenix2 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 12:30.


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