Raised This Month: $12 Target: $400
 3% 

[TF2] Friendly Mode (v. 16.0112)


Post New Thread Reply   
 
Thread Tools Display Modes
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 05-15-2013 , 21:55   Re: [TF2] Friendly Mode (v. 13.0514)
Reply With Quote #151

No problem, it was fun trying to figure out how to implement such a thing without adding a brand new command.
ddhoward is offline
sheng
Member
Join Date: Jan 2013
Old 05-21-2013 , 16:35   Re: [TF2] Friendly Mode (v. 13.0514)
Reply With Quote #152

Hello, since the last update now everything works fine, great plug!

I have a question so far, how I can restrict the friendly to only 2 people per team.? that means that if two people become friendly, then nobody can until one left the friendly mode.

sorry for my english grettings!
__________________

Last edited by sheng; 05-21-2013 at 16:36.
sheng is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 05-21-2013 , 19:11   Re: [TF2] Friendly Mode (v. 13.0514)
Reply With Quote #153

Currently, there is no way to set a limit on how many players PER TEAM can be Friendly simultaneously. However, there is a limit that ignores teams.

Setting the sm_friendly_maxfriendlies to 4 will limit the amount of people that can be Friendly at once to 4. This can be bypassed by admins.
ddhoward is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 05-22-2013 , 01:59   Re: [TF2] Friendly Mode (v. 13.0514)
Reply With Quote #154

Uploading new version 13.0521. It is attached to this post, has been pushed to the server that Updater downloads from, and will soon replace the version in the first post in this thread. Changes are:
  • Changed when shit is hooked on plugin load, no longer listens for round_start

  • Added cvar sm_friendly_funcbutton with default value of 0. When enabled, Friendly players will be unable to activate func_buttons through either damage or +use.

  • Most entities will now only be hooked if they need to be. For example, if sm_friendly_pumpkin = 0, pumpkins will not be hooked. This is a minor performance optimization.

  • Fixed admins being able to toggle Friendly on themselves and others even while sm_friendly_enabled = 0.

  • Players will no longer see the advert if the plugin is disabled, or they don't have access to sm_friendly.

  • Switch to morecolors.inc from colors.inc

  • Added cvars sm_friendly_action_h_spawn and sm_friendly_action_f_spawn both with default value of zero. These cvars function identically to sm_friendly_action_h and sm_friendly_action_f, but affect players who are within a func_respawnroom. Accordingly, the old cvars no longer apply to players in a func_respawnroom.

  • Added cvar sm_friendly_delay with default value of 5.0. Whenever a player either leaves or enters Friendly mode, this cvar sets how long the player must wait before being able to use sm_friendly again.

  • Changes to sm_friendly_logging
    • 0 = No logging
    • 1 = Log admin actions
    • 2 = Same as 1, but also logs self-toggles of Friendly.
    • 3 = Same as 2, but also lists all players affected by an admin targeting a group. For example if an admin uses sm_friendly_lock @all, the logs will list all players affected.

  • General improvements to the functionality of sm_friendly when targeting others.

  • Added targeting for sm_friendly_admin. By default, the ability to target others with this command is given to admins with the ROOT flag, this can be changed by placing the fake command sm_friendly_admin_targetothers in your Overrides. Syntax is:
    Code:
    sm_friendly_admin [target] [-1/0/1]
    ... where 0 disables Friendly Admin, 1 enables it, and -1 (or just leaving it off) toggles it.

  • Added command sm_friendly_lock with default access level of BAN. When used on a player, the player will be unable to use sm_friendly on himself, being locked into whatever mode he's in at the time. Syntax is identical to the syntax of sm_friendly_admin.

Please let me know if you run into any issues. Please also consider installing Updater if you haven't already!



I've been having difficulty getting a decent AFK detector to work. Tracking eyeangles and location won't work on some maps. I'll have a solution soon, I promise. ;.;
Attached Files
File Type: cfg friendly.cfg (19.8 KB, 123 views)
File Type: sp Get Plugin or Get Source (friendly.sp - 97 views - 106.2 KB)
File Type: smx friendly.smx (46.8 KB, 107 views)

Last edited by ddhoward; 05-22-2013 at 02:03.
ddhoward is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 05-23-2013 , 01:57   Re: [TF2] Friendly Mode (v. 13.0521)
Reply With Quote #155

Uploading new version 13.0522. It is attached to this post, has been pushed to the server that Updater downloads from, and will soon replace the version in the first post in this thread. Changes include:
  • Fixed a CShowActivity2 bug where it said it enabled friendly instead of disabling it, when targeting a single player.

  • Changed Updater URL to http://ddhoward.bitbucket.org/friendly.txt

  • Added AFK checker! Code was borrowed and modified from the Forlix AFKManager. Rather than looking at eyeangles or player position, the manager actually detects changes in input from the player. New cvars are:
    • sm_friendly_afklimit with defult value of 300. This cvar sets how long, in seconds, a player can be continuously idle while Friendly. Set to 0 to disable. Any player who exceeds this limit will be immediately made non-Friendly, and then slain. Players who are affected by sm_friendly_lock are immune to the AFK checker. ADMINS ARE NOT IMMUNE. IF YOU WANT TO BE IMMUNE TO THE AFK CHECKER, YOU NEED TO APPLY SM_FRIENDLY_LOCK TO YOURSELF.
    • sm_friendly_afkinterval with defult value of 1.0. This cvar sets the time in seconds between AFK checks. This should be a very low value, between 0.1 and 5.0, and should only be increased to 5.0 if you notice that the AFK detector is causing lag.

Please let me know if you run into any issues. Please also consider installing Updater if you haven't already!
Attached Files
File Type: smx friendly.smx (48.0 KB, 99 views)
File Type: sp Get Plugin or Get Source (friendly.sp - 106 views - 108.0 KB)
File Type: cfg friendly.cfg (20.2 KB, 103 views)

Last edited by ddhoward; 05-31-2013 at 01:01.
ddhoward is offline
sheng
Member
Join Date: Jan 2013
Old 05-24-2013 , 14:54   Re: [TF2] Friendly Mode (v. 13.0514)
Reply With Quote #156

Quote:
Originally Posted by ddhoward View Post
Currently, there is no way to set a limit on how many players PER TEAM can be Friendly simultaneously. However, there is a limit that ignores teams.

Setting the sm_friendly_maxfriendlies to 4 will limit the amount of people that can be Friendly at once to 4. This can be bypassed by admins.
Thanks
__________________
sheng is offline
Mr. Man
Veteran Member
Join Date: Mar 2011
Location: Huh?
Old 06-02-2013 , 01:09   Re: [TF2] Friendly Mode (v. 13.0522)
Reply With Quote #157

Howard, please update the first post with the latest version of this plugin. Thanks! Also, the "remember friendly mode" CVAR doesn't seem to be taking hold since after I respawn I get spawned out of friendly mode despite having it set to 1.

Last edited by Mr. Man; 06-02-2013 at 01:41.
Mr. Man is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 06-02-2013 , 03:26   Re: [TF2] Friendly Mode (v. 13.0522)
Reply With Quote #158

Yeah, if a user enters Friendly mode with a delay (meaning that the user had to wait until respawn in order to go Friendly), the plugin didn't take away the bool value of "true" indicating that the user wanted to switch modes. So upon the second respawn... the user switched modes again. This will be fixed in the upcoming update.

Last edited by ddhoward; 06-02-2013 at 04:16.
ddhoward is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 06-02-2013 , 04:14   Re: [TF2] Friendly Mode (v. 13.0522)
Reply With Quote #159

Uploading new version 13.0602. It is attached to this post, has been pushed to the server that Updater downloads from, and will soon replace the version in the first post in this thread. Changes include:
  • Fixed a minor sm_friendly_remember bug involving the action_f cvars being negative.

  • Players who have Friendly Admin mode enabled will no longer drop the intel upon becoming Friendly, and Friendly players who exit Friendly Admin will be forced to drop the intel.

  • Fixed a few instances of sloppy copy/pasting where, among other things, logs/CShowActivity2 said admins were enabling things when he is really disabling things.

  • If the user has access to sm_friendly, sm_friendly_v will display the current number of players in Friendly mode.

Please let me know if you run into any issues. Please also consider installing Updater if you haven't already!
Attached Files
File Type: cfg friendly.cfg (20.2 KB, 118 views)
File Type: sp Get Plugin or Get Source (friendly.sp - 98 views - 109.1 KB)
File Type: smx friendly.smx (48.1 KB, 105 views)

Last edited by ddhoward; 06-02-2013 at 04:29.
ddhoward is offline
Snaggle
AlliedModders Donor
Join Date: Jul 2010
Location: England
Old 07-01-2013 , 15:00   Re: [TF2] Friendly Mode (v. 13.0602)
Reply With Quote #160

Thanks for this plugin. I tried searching but either it hasn't been posted or the search function isn't the best!

Would it be possible to add in the following?
  • Prevent friendly players from airblasting
  • Prevent friendly players from being stunned by sandman balls
  • Add a cvar to allow friendly players to damage and kill bots

Thanks again!
Snaggle 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 04:04.


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