Raised This Month: $276 Target: $400
 69% 

[TF2] Friendly Simple


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Phil25
AlliedModders Donor
Join Date: Feb 2015
Plugin ID:
4876
Plugin Version:
0.924
Plugin Category:
Fun Stuff
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
    67 
    Plugin Description:
    Toggles Friendly mode on players in spawn (no damage dealt - no damage taken)
    Old 11-01-2015 , 00:45   [TF2] Friendly Simple
    Reply With Quote #1

    [TF2] Friendly Simple v0.924

    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 run alongside the original Friendly plugin.


    Differences:
    • This plugin has 0 ConVars thus very easy to set up,
    • Friendly players are wholly unable to attack (except with Rocket/Sticky Jumper),
    • 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

    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.
    Simply add a restriction to sm_friendly and sm_f will follow.

    For developers:
    Compiling

    Include file

    Changelog

    Todo/Known issues


    Installation:
    1. Simply click Get Plugin and place it in the sourcemod/plugins/ folder.
    2. Now, either restart the server or type "sm plugins load friendlysimple" in the console.
    3. NOTE: You will have to unload "friendly.smx" if you already have it installed.
    4. The .inc file is only for developers and, therefore, is 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!
    Attached Files
    File Type: inc friendlysimple.inc (2.5 KB, 830 views)
    File Type: sp Get Plugin or Get Source (friendlysimple.sp - 1717 views - 19.8 KB)

    Last edited by Phil25; 03-04-2016 at 22:59.
    Phil25 is offline
    ddhoward
    Veteran Member
    Join Date: May 2012
    Location: California
    Old 11-01-2015 , 01:12   Re: [TF2] Friendly Simple
    Reply With Quote #2

    Haven't looked at the plugin yet because I'm on my phone, but why don't you just have them override sm_friendly instead of that other override?
    __________________
    ddhoward is offline
    Phil25
    AlliedModders Donor
    Join Date: Feb 2015
    Old 11-01-2015 , 01:42   Re: [TF2] Friendly Simple
    Reply With Quote #3

    Because the commands are sm_friendly and sm_f. There are also some variants of the first one, for example sm_firendly. I'm not sure if it's a good practice adding such a thing, but I happened to misspell it at first quite often (sm_f negates that though, so it'll probably get removed).

    EDIT: Well, I understand what you mean now, going to fix it right away.

    Last edited by Phil25; 11-01-2015 at 01:45.
    Phil25 is offline
    ddhoward
    Veteran Member
    Join Date: May 2012
    Location: California
    Old 11-01-2015 , 03:13   Re: [TF2] Friendly Simple
    Reply With Quote #4

    Hmm, I see what you mean. If you have multiple commands all going to the same function, I think the best thing to do would be to include a CheckCommandAccess right at the top of it, and have server owners use the "primary" command in their overrides file. That way overriding sm_friendly will affect all the other commands for it too. This isn't any sort of Sourcemod standard though, so it's totally up to you.
    __________________

    Last edited by ddhoward; 11-01-2015 at 03:14.
    ddhoward is offline
    PC Gamer
    Veteran Member
    Join Date: Mar 2014
    Old 11-01-2015 , 10:10   Re: [TF2] Friendly Simple
    Reply With Quote #5

    Great job! Works as advertised.

    Observation: Bots still target you when friendly is active.
    Desired effect: Bots ignore you when friendly is active.
    Possible fix: Maybe use some of the coding already done by the amazing Tylerst on his 'Bot Ignore' plugin: https://forums.alliedmods.net/showthread.php?p=2087931
    PC Gamer is offline
    Phil25
    AlliedModders Donor
    Join Date: Feb 2015
    Old 11-01-2015 , 12:40   Re: [TF2] Friendly Simple
    Reply With Quote #6

    Quote:
    Originally Posted by PC Gamer View Post
    Possible fix: Maybe use some of the coding already done by the amazing Tylerst on his 'Bot Ignore' plugin: https://forums.alliedmods.net/showthread.php?p=2087931
    Thanks for the support! And as for that plugin, its way is a bit outdated - the client straight up becomes cloaked. Although that didn't seem to be the case in the past.

    As I looked around, nobody seemed to had figured out to how have individual clients get ignored by bots. I will be in constant update about the this, though.
    Phil25 is offline
    Phil25
    AlliedModders Donor
    Join Date: Feb 2015
    Old 11-01-2015 , 13:21   Re: [TF2] Friendly Simple
    Reply With Quote #7

    New version released:

    v0.902 - Added 2 forwards - FriendlySimple_OnEnableFriendly(client) and FriendlySimple_OnDisableFriendly(client).
    Phil25 is offline
    Phil25
    AlliedModders Donor
    Join Date: Feb 2015
    Old 11-01-2015 , 17:51   Re: [TF2] Friendly Simple
    Reply With Quote #8

    New version released:

    v0.904 - Unable to taunt with the Equalizer and the Escape Plan as well as all spy knifes (buildings are getting destroyed and pumpkins explode).

    Last edited by Phil25; 11-01-2015 at 20:25.
    Phil25 is offline
    Phil25
    AlliedModders Donor
    Join Date: Feb 2015
    Old 11-03-2015 , 17:09   Re: [TF2] Friendly Simple
    Reply With Quote #9

    New version released:

    v0.905 - Unable to swtich to Friendly while having the Holiday Punch equipped. Also, fixed being able to attack with right click in certain situations.
    Phil25 is offline
    Phil25
    AlliedModders Donor
    Join Date: Feb 2015
    Old 11-07-2015 , 11:06   Re: [TF2] Friendly Simple
    Reply With Quote #10

    New version released:

    v0.906 - Unable to taunt with the Amputator.

    Last edited by Phil25; 11-07-2015 at 11:06.
    Phil25 is offline
    Reply


    Thread Tools
    Display Modes

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 00:56.


    Powered by vBulletin®
    Copyright ©2000 - 2020, vBulletin Solutions, Inc.
    Theme made by Freecode