[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.
- 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.
- 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:
- sm_friendly - Toggles Friendly mode on the activator (only works once the client is in spawn).
- sm_f - Same as above.
For developers:By default, sm_friendly is accessible to everyone. To restrict access, use Overrides.
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.
- 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.
Attached Files


Wyświetl pełny artykuł