Skocz do zawartości

  • Zaloguj korzystając z Facebooka Zaloguj korzystając z Twittera Zaloguj przez Steam Zaloguj poprzez Google      Logowanie »   
  • Rejestracja

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 Simple


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

Napisano 01.11.2015 05:45

<p>

[TF2] Friendly Simple v0.901

This is my version of Friendly with quite a bit of code borrowed from ddhoward's Friendly Mode, so a lot of credit goes to the author of the original plugin.
Friendly Simple should NOT work alongside the original Friendly plugin.

Differences:
  • This plugin has 0 ConVars thus very easy to set up,
  • Friendly players are stripped of all weapons except melee,
  • Friendly players are wholly unable to attack,
  • Friendly mode can be toggled only in spawn,
  • Friendly players, along with their cosmetics and weapons, are semi-transparent and are colored green,
  • For developers: Has its own include file, see below for more information,
  • Lots of potential bug/exploit fixes due to a different way of managing Friendlies.
Similarities:
  • Friendly players cannot be damaged nor deal damage,
  • Hostile players are able to clip through Friendly players,
  • Friendly players are unable to interact with the world in any way*,
  • Friendly players cannot use Teleporters or acquire metal from Dispensers,
  • Friendly players are not targeted by enemy Sentries,
  • Friendly players cannot RTD or Goomba stomp/get Goomba stomped,
  • Friendly players cannot capture Control Points, grab the Intelligence, etc.
  • The list goes on :wink:
Commands:
  • sm_friendly - Toggles Friendly mode on the activator (only works once the client is in spawn).
  • sm_f - Same as above.
Overriding access:

By default, sm_friendly is accessible to everyone. To restrict access, use Overrides.

For developers:


Include file



PHP Code:


/**
* Returns whether or not a given player is Friendly.
*
* @param client Client Index.
* @return TRUE if Friendly, FALSE if not Friendly or if invalid client.
*/
native bool:FriendlySimple_IsFriendly(client);


/**
* Returns whether or not a given player is in their spawn.
*
* @param client Client Index.
* @return TRUE if is in their spawn, FALSE if not in their spawn or if invalid client.
*/
native bool:FriendlySimple_IsInSpawn(client);


/**
* Returns whether or not a given player has access to Friendly.
*
* @param client Client Index.
* @return TRUE if has access, FALSE if doesn't have access or if invalid client.
*/
native bool:FriendlySimple_HasAccess(client);


/**
* Sets Friendly mode on a client.
*
* @param client Client Index.
*
* @param direction -1 to toggle, 0 to disable, or 1 to enable
*
* @return -3 if client is not a valid client index,
* -2 if client is not connected and in game,
* -1 if no change was made (the client was already in the requested state)
* 0 if the player was made non-Friendly,
* 1 if the player was made Friendly.
*/
native FriendlySimple_SetFriendly(client, direction=-1);




Changelog

  • v0.901 - Fixed override inconvenience.
  • v0.9 - Initial release.
Installation:
  • Simply click Get Plugin and place it in the sourcemod/plugins/ folder.
  • Now, either restart the server or type "sm plugins load friendlysimple" in the console.
  • NOTE: You will have to unload "friendly.smx" if you already have it installed.
  • The include file is only for developers and, therefore, optional.
Final note: This is my first plugin I'm releasing and bugs are expected. Please report anything you can find and/or help me fix it. I assure you, I would appreciate that greatly! :D

Attached Files Dołączona grafikaGet Plugin or Get Source (friendlysimple.sp - 19.5 KB) Dołączona grafikafriendlysimple.inc (1.7 KB)

Wyświetl pełny artykuł




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

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