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

[TF2] Friendly Mode


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

Napisano 12.04.2013 06:48

<p>Current version = 13.0411.2257

This plugin allows users to become invulnerable to damage, while at the same time being unable to damage other players. Useful for certain servers where PvP is something that some players don't want to partake in.

Command is simply sm_friendly to enter and exit Friendly mode.

Friendly mode does the following:
  • Makes friendly players unable to use their weapons to damage any other player.
  • Gives friendly players buddha mode
  • Makes friendly players invisible to sentries, immune to airblasts, etc.
CVARS, shown with default values:
  • sm_friendly_nowait 1 - When enabled a player who leaves Friendly mode will instantly be able to attack other players, and be attacked. When 0, he will have to wait until his next respawn, and sm_friendly_slap will have no function.
  • sm_friendly_remember 0 - When enabled, a Friendly player who dies will remain Friendly upon respawning.
  • sm_friendly_slap 99999 - When a player attempts to leave Friendly mode and become hostile, he will be slapped for this amount of damage. Used to prevent abuse of this command. Set to 0 to disable. No function if sm_friendly_nowait is 0.
  • sm_friendly_killsentry 1 - When enabled, a friendly Engineer will run the command "destroy 2" upon becoming hostile. This should destroy his sentry.
  • sm_friendly_blockweps 0 - When enabled, players will be prohibited from using certain weapons.
Weapons blocked by sm_friendly_blockweps:
  • tf_weapon_flamethrower (prevent airblasting non friendlies)
  • tf_weapon_medigun (prevent healing non friendlies)
  • tf_weapon_builder (prevent buliding stuff/sappers)
  • tf_weapon_bonesaw (prevent performing ubersaw taunt on non friendlies)
  • tf_weapon_compound_bow (prevent performing huntsman taunt on non friendlies)
  • tf_weapon_bat_wood (prevent using sandman ball on non friendlies)
  • tf_weapon_jar (prevent throwing piss on non friendlies)
  • tf_weapon_jar_milk (prevent throwing milk on non friendlies)
  • tf_weapon_fireaxe (prevent destroying sappers(homewrecker))
  • tf_weapon_lunchbox (prevent healing non friendlies)
  • tf_weapon_crossbow (prevent healing non friendlies)
ChangelogInstallation:

Plugin reqires SDKHooks. As such, it does not yet compile here on the forums. Ensure that SDKHooks is installed (it is apparently bundled with snapshots of SourceMod 1.5), and place the attached SMX in your plugins folder.

You must reload the map upon installation or updating.

Plans:

I am mostly using this plugin as a way to learn this stuff. As such, modifications and updates will come slowly, unless I have assistance. That being said, I hope to one day include:

  • A way to make Friendly players visibly distinguishable from non-friendly players.
  • A way to edit what weapons are blocked by sm_friendly_blockweps, without having to edit the source code of the plugin.
  • A way to easily add other sources of damage that can be blocked or whitelisted. (Such as damage from the world, bosses, RTD effects, Goomba Stomp, etc.)
  • A way to make the error log spam go away. I don't yet know a thing about SDKHooks, and don't exactly know how to implement the solution shown here.
  • A way to limit the amount of time a Friendly player can continuously stay Friendly, and ConVar to set exactly how long that limit should be.
  • A way for admins to force the command on other players without needing plugins like Fake And Force.
  • sm_friendly 1 will enable friendly mode, and sm_friendly 0 will disable it.

Known Bugs:
  • Extreme error log spam. Iunno.
  • The feature of "stopping damage done to [engineer] buildings" does not function anymore.
Attached Files Dołączona grafika friendly.smx (5.6 KB) Dołączona grafika Get Plugin or Get Source (friendly.sp - 6.9 KB)

Wyświetl pełny artykuł




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

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