Raised This Month: $51 Target: $400
 12% 

[L4D2] Realism Flashlight 1.2.4 [Nov-19-2023]


Post New Thread Reply   
 
Thread Tools Display Modes
sonic155
Senior Member
Join Date: Mar 2019
Old 12-27-2022 , 19:31   Re: [L4D2] Realism Flashligh 1.1 [26-Dec-2022]
Reply With Quote #11

sure we can hold the [F] key to stop and recharge the flashlight when it gets low =D
sonic155 is offline
Iciaria
Member
Join Date: Aug 2022
Old 12-27-2022 , 19:52   Re: [L4D2] Realism Flashlight 1.1 [26-Dec-2022]
Reply With Quote #12

Thanks "Grey83", version 1.1.1 has been added to the main post.

Code:
1.1.1 (Dec-26-2022, by Grey83)
        - All plugin code has been rewritten to the new syntax
        - Added ConVar bounds
        - Fixed timer tOnClientPutInServer
        - Slightly optimize performance and simplify code

1.1 (Dec-26-2022)
        - Now use "GetEngineVersion" in "AskPluginLoad2" to detect game type.
        - Use "strcmp" instead of "strncmp" to check weapon names.
        - Use "Get/SetEntProp" instead of "Get/SetEntData" to control the state of the flashlight.
        - Now use the new way to pass the value of Cvar.
        - Thanks to "Silvers" for suggestions.
        - Changed default value of Cvars, on older versions, had wrong value (FlashThreshold_lv*).
        - Survivor bots' flashlights are now also restricted.
        - Various changes to the code.
        - Optimize performance and simplify code.

1.0 (Dec-25-2022)
        - Initial release.
__________________
Sorry,my english not good
Iciaria is offline
Iciaria
Member
Join Date: Aug 2022
Old 12-27-2022 , 19:55   Re: [L4D2] Realism Flashligh 1.1 [26-Dec-2022]
Reply With Quote #13

Quote:
Originally Posted by sonic155 View Post
sure we can hold the [F] key to stop and recharge the flashlight when it gets low =D
Press the "F" key when the flashlight is on to turn it off, but sometimes the flashlight flashes too fast.
__________________
Sorry,my english not good
Iciaria is offline
Iciaria
Member
Join Date: Aug 2022
Old 12-27-2022 , 21:04   Re: [L4D2] Realism Flashlight 1.1.1 [26-Dec-2022]
Reply With Quote #14

Quote:
Originally Posted by Grey83 View Post
Changes 1.1.1 [26-Dec-2022]:
  • All plugin code has been rewritten to the new syntax (also compatible with SM 1.8 - 1.10)
  • Added ConVar bounds
  • Fixed timer tOnClientPutInServer
  • Slightly optimize performance and simplify code
PHP Code:
//// l4d2_RealismFlashlight 1.1.1.sp
//
// Code size:         17960 bytes
// Data size:         8284 bytes
// Stack/heap size:      16724 bytes
// Total requirements:   42968 bytes
//
// Compilation Time: 0,41 sec
// ----------------------------------------

//// l4d2_RealismFlashlight 1.1.sp
//
// Code size:         20672 bytes
// Data size:         8476 bytes
// Stack/heap size:      16724 bytes
// Total requirements:   45872 bytes
//
// Compilation Time: 0,41 sec
// ---------------------------------------- 
UPD Fixed line 372
This plugin doesn't work anymore when "l4d2_RealismFlashLight_PowerEnabled" has a value of 1, please check it.
__________________
Sorry,my english not good
Iciaria is offline
sonic155
Senior Member
Join Date: Mar 2019
Old 12-29-2022 , 22:32   Re: [L4D2] Realism Flashlight 1.1.2 [28-Dec-2022]
Reply With Quote #15

If you add the Holding F key to charge up the power i would love to have the plugin as it adds more stress as im using a plugin from sliver's epic set to make it super dark in some places so having a flashlight die out at randomly would stress it up a bit x) but i dont want it out for good kinda thing so survivors will have to stay in one spot and recharge while who knows what is lurking near by x) OH how about add a timer that goes on to launch a % of a chance the flashlight would stop working for a short time and you had to spam F to fix it or something =O its a zombie world odds are the stuff your using may not be very good =o
sonic155 is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 12-30-2022 , 07:04   Re: [L4D2] Realism Flashlight 1.1.2 [28-Dec-2022]
Reply With Quote #16

It's not possible to detect holding the F key, sadly.
__________________
Silvers is offline
sonic155
Senior Member
Join Date: Mar 2019
Old 12-30-2022 , 07:07   Re: [L4D2] Realism Flashlight 1.1.2 [28-Dec-2022]
Reply With Quote #17

=(
sonic155 is offline
Grey83
Veteran Member
Join Date: Dec 2014
Location: Ukraine
Old 12-30-2022 , 08:35   Re: [L4D2] Realism Flashlight 1.1.2 [28-Dec-2022]
Reply With Quote #18

Quote:
Originally Posted by Silvers View Post
It's not possible to detect holding the F key, sadly.
Even using OnPlayerRunCmd()?
__________________
Grey83 is offline
Grey83
Veteran Member
Join Date: Dec 2014
Location: Ukraine
Old 12-30-2022 , 09:51   Re: [L4D2] Realism Flashlight 1.1.1 [26-Dec-2022]
Reply With Quote #19

Quote:
Originally Posted by Iciaria View Post
This plugin doesn't work anymore when "l4d2_RealismFlashLight_PowerEnabled" has a value of 1, please check it.
Fixed typos in my code.
Check this version.
Attached Files
File Type: sp Get Plugin or Get Source (l4d2_RealismFlashlight 1.1.2.sp - 168 views - 20.5 KB)
__________________
Grey83 is offline
sonic155
Senior Member
Join Date: Mar 2019
Old 12-31-2022 , 17:47   Re: [L4D2] Realism Flashlight 1.1.2 [28-Dec-2022]
Reply With Quote #20

oh god....this part { Batteries are only replenished at the start of a new campaign } alone says this need a way to recharge them during gameplay if it was at each checkpoint sure but for the whole campaign? oh god e.e

to be honest i dont care what you use for a recharge button or maybe even put it as a command like " !charge" so a loading bar will show up showing its charging up and players are able to ether wait for a full charge or use whatever it charged up to kind of thing but for them to use one battery for the whole campaign is a bit much unless its set to a very high power count o.o
~~~~

or make it recharge while your ducking so they can still move but very slowly while they wait for there light to be useble again =O

Last edited by sonic155; 12-31-2022 at 17:48. Reason: adding more ideas
sonic155 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 04:30.


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