Skocz do zawartości

Witamy w Nieoficjalnym polskim support'cie AMX Mod X

Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Dołączona grafika Dołączona grafika

Guest Message by DevFuse
 

Zdjęcie

[L4D2] Fix Saferoom door +USE bug


  • Nie możesz napisać tematu
  • Zaloguj się, aby dodać odpowiedź
Brak odpowiedzi do tego tematu

#1 Adminek AMXX.PL

    Admin :)

  • Bot

Reputacja: 156
Profesjonalista

  • Postów:7 530
  • Lokalizacja:AMXX.PL
Offline

Napisano 17.02.2024 19:34

Info

Sometimes, if there are several players standing in front of a safe room door, or if weapons/medkits are scattered around, pressing "E" might not work or might interact with items instead, even if you are right in front of it, which can be incredibly frustrating. This plugin fixes the issue, making doors work as intended. It should theoretically be compatible with most door-related plugins. There is a native for unscramblers or lockers if you need to allow operation only after a certain event.

CVARS

l4d2_fix_safedoor_use_distance_to_open [100] - You will be able to OPEN doors from this distance
l4d2_fix_safedoor_use_distance_to_close [115] - You will be able to CLOSE doors from this distance
l4d2_fix_safedoor_use_wait_permission_from_ot her_plugin [0] - In case you use unscrambler or door locker, wait for it (to use native)

Natives

native void FixSafedoorUseEnable();

Short video

Tech

The plugin places and saves three points on each door: left, center, and right. It monitors their coordinates when the door's position changes. If the player presses "E" near these points, it uses trace ray to ensure the player is looking at the door. In case of player_use triggered by the engine, some decisions are taken in the next frame to avoid conflicts with other plugins. Then, AcceptInput is used for opening/closing and sends a player_use event for other plugins. If the door has DOOR_FLAG_IGNORE_USE enabled, it also won't work.



Attached Files Dołączona grafika Get Plugin or Get Source (l4d2_fix_safedoor_use.sp - 17.4 KB) Dołączona grafika fix_safedoor_use.inc (534 Bytes)

Wyświetl pełny artykuł




Użytkownicy przeglądający ten temat: 0

0 użytkowników, 0 gości, 0 anonimowych