Skocz do zawartości

Nowy szablon forum

mygo.pl

Stworzyliśmy dla Was nowy wygląd forum. Z pewnością znajdziesz rzeczy, które wg Ciebie mogą zostać zmienione - wspomnij o tym w specjalnym wątku.

Czytaj więcej

Jak założyć własną sieć

serwerów CS

Zastanawiasz się nad prowadzeniem własnej sieci serwerów? Przeczytaj podstawowe informacje, na które należy zwrócić uwagę, przy takim projekcie.

Czytaj więcej

Tworzymy spis sieci

dodaj swoją

Dodaj sieć do której należysz, pozwoli to na promocję i budowę ogólnopolskiej bazy sieci CS.

Czytaj więcej

RSS[L4D2] Realism Flashligh 1.0 [25-Dec-2022]


MYGO.pl
 Udostępnij

Rekomendowane odpowiedzi

  • RSSy
About:

@Mr.Zero's addon is having issues on my server,
players can still sometimes turn on the flashlight when holding a *not allowed item*.

I have long wanted to fix his plugin,
and have been trying to understand the source code of the "[L4D2] Block Flashlight (1.2, 18/10-2011)" plugin,
maybe the bug with this plugin is caused by something extra(Turn off the flashlight when on a ladder or ...).

But this plugin is so old I actually started writing my own plugin after learning how to set the torch state.
I just need "can turn on flashlight when holding a firearm".

And
When I was testing on the server, some players asked me: Why not add a battery system to the flashlight?
(the server's map lighting style is very dark, and the player's flashlight is disabled until this plugin is complete :D).

So...
This plugin can optionally activate the battery system.
Also, the flashlight will flash at different frequencies depending on the battery level.

Feature list:

-The player can only turn on the flashlight while holding a gun.
-Optionally turn on the battery system and set the flashing frequency of the lights.

Batteries are only replenished at the start of a new campaign, or after voting to change to a different map than the one currently playing.
This plugin is designed for 4 player realism, but maybe it will work on 8 player servers (without repeating characters, but not tested),
on more than 8 player servers, this addon will not work properly.



Credit:

[email protected] ([L4D2] Block Flashlight (1.2, 18/10-2011))
First idea to learn how to control a flashlight light, something I've always wanted.

--@Silvers ([L4D2] Swap Character (1.2) [21-Mar-2020])
Learn how to get a client's character and check them.

--@ConnerRia. Fork. by Dragokas & KoMiKoZa ([L4D2] Saferoom Naps: Spawn Next Map With 50 HP)
Learn how to use the "map_transition" event.

--@All the players who helped me with the test


Convar:
Spoiler

Changelog:
Code:


1.0 (Dec-25-2022)
        - Initial release.


Related plugins:

[L4D & L4D2] Dynamic Light (1.10) [07-Feb-2022]
I suggest @Toranks' version
[L4D & L4D2] Dynamic Muzzle Flash
[L4D & L4D2] Glare (2.14) [28-Aug-2022]
[L4D & L4D2] Weather Control (1.15) [05-Jul-2022]

Dynamic lights/muzzle flashes may cause map textures to flicker(After installing the "Weather Control" plugin).
This problem has nothing to do with my plugin.

"Dynamic Light" and "glare" may still appear briefly when the torch is disabled by my plugin.
I will try to solve these problems.



Install:

1.Click "Get Plugins" and put the "l4d2_RealismFlashlight.smx" file in "../addons/sourcemod/plugins/".
2.Download the "l4d2_RealismFlashlight.cfg" file and put it in "../left4dead2/cfg/sourcemod/".
You may need to tweak the "l4d2_RealismFlashlight.cfg" file.

Attached Files
File Type: sp Get Plugin or Get Source (l4d2_RealismFlashlight.sp - 21.9 KB)
File Type: cfg l4d2_RealismFlashlight.cfg (4.2 KB)

Wyświetl pełny artykuł

Odnośnik do komentarza
Udostępnij na innych stronach

Gość
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
 Udostępnij

  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...