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

C4 Taker


  • 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 489
  • Lokalizacja:AMXX.PL
Offline

Napisano 26.05.2016 21:14

C4 TAKER v1.08
(For lack of a better name)

Description:
Enables you to take the C4 from a teammate by aiming at him/her and pressing the USE key. (default 'E')
This is especially useful when playing with bots either for gameplay or debug purposes...

Requires:
amxmodx | fakemeta_util | hamsandwich

CVARs:
  • c4t_admin_only [default 1] - limits the plugin for admin use only. Set to '0' so that everyone can take the C4. Set to '2' and admin gets the C4 automatically every start of a round.
  • c4t_take_from_humans [default 0 ]- set to '1' to enable to take C4 from human players
  • c4t_max_distance [default 120] - max distance for the take
  • c4t_hud [default 5] - number of instances the HUD Message appears. Set to '0' to disable. Can be set to '9999...'.
Notes:
  • Only Admins can take C4 by default
  • Max distance of the HUD message are the same which means it may serve as an indicator of sorts.
  • HUD message appears for certain amount of instances (set by a cvar) for each human player. After that it is disabled.
    I did this because I found the HUD message annoying after a couple of rounds.
  • Based off joaquimandrade's and ConnorMcLeod's "EasyWeaponsTrade" plugin.
  • First submitted plugin. Please don't hang me. Just take my bacon if you want.:bacon!:
Changelog:

v1.08
  • More optimization
  • A few more inconsistencies fixed
v1.07
  • Code consistency. Courtesy for those wanting to learn the script.
v1.06
  • Code optimization.
v1.05
  • c4t_admin_only cvar now has 3 modes

0 - Disables admin_only. Everyone can take the C4.
1 - Enabled. Only admin gets to take the C4 from a teammate.
2 - Every start of a round, the admin always gets the C4.

  • Carrier gets a HUD message when C4 is taken from them and who took it.
v1.04
  • Added CVAR 'admin_only' which limits use for admins only. It is set to '1' by default
  • HUD Message disappears immediately when you've stopped looking at the bomb carrier
  • Changed max distance default from 200 to 120
v1.03
  • New plugin name
  • Removed unused 'MaxSlots' variable
  • Removed some redundancies on EventStatusValue_PlayerID
  • EventStatusValue_PlayerID now checks first if aiming player is alive
  • Switched from CVARS to PCVARS because my code is horrible
  • HUD Message now enabled when 'c4t_take_from_human' cvar is enabled
v1.02
  • Replaced getLookingAt function with native get_user_aiming
v1.01
  • Added 3 cvars
  • Fixed code to prevent dead players from getting the C4
  • Added code that resets the HUD Message limiter when player disconnects
v1.0 - First release.

SPECIAL THANKS:

To joaquimandrade & ConnorMcLeod for their EasyWeaponsTrade that inspired the idea.
To wickked & JusTGo for helping me with the HUD message.
To VEN for his bomb scripting tutorial.
To HamletEagle for helping me optimize the script.

Attached Images Dołączona grafikascreencap.jpg (75.5 KB) Attached Files Dołączona grafikaGet Plugin or Get Source (c4_taker.sma - 4.5 KB)

Wyświetl pełny artykuł




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

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