[TF2] Friendly Mode
v. 16.0112 "Why did Valve put guns in this game? So weird."
Friendly Mode allows users to become invulnerable to damage from other players, while at the same time being unable to damage other players. Useful for certain servers where combat is something that some players don't want to partake in, such as trade servers, achievement servers, hangouts, etc.
The plugin is very effective at stamping out potential abuse of Friendly Mode; Friendly players can have almost 0 effect on the actual gameplay around them. By default, Friendly players:
Cannot damage or be damaged by other players.
Cannot even take out weapons that can affect gameplay in non-damaging ways (such as the Short Circuit, Holiday Punch, etc.)
Cannot taunt with taunt-stunning weapons (Huntsman, Gunslinger, Ubersaw, etc)
Cannot block enemy players; they are non-solid, and can be walked right through.
Cannot Goomba Stomp or RTD, provided that your Goomba and RTD plugins are up-to-date.
Are practically invisible, so non-Friendly players do not get confused.
Are invisible to sentries.
Cannot go AFK for too long while Friendly.
Cannot pick up Ammo, Health, or MvM cash, nor do they drop ammo pickups upon death.
Cannot cap points, push carts, or capture flags.
All the appropriate restrictions also apply to Engie buildings as well.
Etc.
This plugin is highly configurable, and features 56 cvars. This can be overwhelming to configure at first. Just remember that the default value is generally the "best" value for that particular cvar. Don't change it unless you feel you need to, based on the needs of your particular server/map.
This plugin provides several natives and forwards for interacting with other plugins. Please see the .inc file for more information.
COMMANDS
Spoiler
sm_friendly - Toggles Friendly mode. This command is public by default; you can change this in your Overrides. Friendly mode causes Friendly players to be unable to use their basic attacks to damage any other player or building. Additionally, they are immune to the basic attacks of other players. There are many other effects, all toggleable by cvars, and documented in the section of this post concerning cvars.
Admins can target other players with sm_friendly. By default, this requires the Ban flag. You can override this by placing sm_friendly_targetothers in your admin_overrides.cfg file. The syntax of the command is:
Code:
sm_friendly [target] [-1/0/1] [1]
All arguments are optional, but if you include an argument, you must include all arguments that come before it.
The first argument is the target, which can be @me, @all, @humans, ddhoward, user234, etc.
The second argument indicates whether or not you want to toggle, disable, or enable Friendly on the selected targets. Leaving this argument out of the command will toggle all players (Friendlies will become non-Friendly, and non-Friendlies will become Friendly).
When a third argument "1" is appended, the plugin will slay all switched players upon being switched.
sm_friendly_admin - By default, this command is only for admins with the BAN flag; you can change this in your Overrides. When used, the admin who used it will be able to bypass many limitations of Friendly mode. (This feature is really meant to be activated for only those brief moments when an admin needs to take care of business.)
He can damage both Friendlies and non-Friendlies, regardless of his own Friendly status. (An admin who uses this command still cannot damage players/buildings that are set to have full Godmode/Buddha through its "invuln" cvar, and cannot damage players/buildings with a high _noblock setting.)
He can bypass the point capping/car pushing/intel grabbing block, if such blocks are enabled.
He can instantly change modes, as if the sm_friendly_action_* cvars were all 0, regardless of the real settings of these cvars.
He will NOT have his buildings destroyed upon a mode change, regardless of the sm_friendly_kill* cvars.
He can bypass any weapon or taunt blocking set by the blockweps cvars.
He can build buildings while Friendly, regardless of the NOBUILD cvar settings.
He can RTD while Friendly, regardless of any block on RTD.
He can pick up health, ammo, and money while Friendly.
He can destroy pumpkins, regardless of that setting.
He can bypass the limit on how many players can simultaneously be Friendly.
He can activate func_buttons, regardless of the func_button blocking setting.
Admins can target other players with sm_friendly_admin. By default, this requires the ROOT flag. You can override this by placing sm_friendly_admin_targetothers in your admin_overrides.cfg file. The syntax of the command is:
Code:
sm_friendly_admin [target] [-1/0/1]
The first argument is the target, which can be @me, @all, @humans, ddhoward, user234, etc.
The second argument indicates whether or not you want to toggle, disable, or enable Friendly Admin mode on the selected targets. Leaving this argument out of the command will toggle all players. If you include this argument, you MUST specify a target.
sm_friendly_lock - This command prevents a player from using sm_friendly. He is stuck in whatever mode he was in when the lock was put in place. By default, this command requires the Ban flag. The syntax of the command is:
Code:
sm_friendly_lock [target] [-1/0/1]
The first argument is the target, which can be @me, @all, @humans, ddhoward, user234, etc.
The second argument is optional, and indicates whether or not you want to toggle, disable, or enable Friendly Lock on the selected targets. Leaving this argument out will cause the plugin to assume that you meant -1.
Admins can still change a locked player's mode themselves through sm_friendly. Locked players are immune to the plugin's anti-AFK measures.
sm_friendly_v - Displays a brief message about the plugin, including the running version.
Code:
[Friendly] This server is currently running Friendly Mode v.14.1119. Type /friendly to try it out!
In addition to the above commands, the plugin also provides targeting filters that can be used with other Sourcemod commands, similar to @all, @me, @bots, etc.
@friendly, @friendlies - Targets all Friendly players
@!friendly, @!friendlies - Targets all non-Friendly players
@friendlyadmins - Targets all players who have enabled Friendly Admin mode.
@!friendlyadmins - Targets all players who have NOT enabled Friendly Admin mode.
@friendlylocked - Targets all players who have been locked out of toggling Friendly mode.
@!friendlylocked - Targets all players who have NOT been locked out of toggling Friendly mode.
CVARS, shown with default values:
This plugin loads its cvars from tf/cfg/sourcemod/friendly.cfg, if the file exists. It is recommended that you place this file in that location, renaming it to simply friendly.cfg, commenting out any settings you want to place elsewhere (such as in map-specific settings). Remember, when in doubt, just use the default settings.
Spoiler
PLUGIN SETTINGS
sm_friendly_enabled 1 : (0/1) Enables/disables use of Friendly mode. If this convar is set to 0 during a game, while players are Friendly, all friendly players will immediately leave Friendly mode as if they toggled it themselves.
sm_friendly_logging 2 : (0/1/2) How should command usage be logged?
0 : Command use will not be logged.
1 : Use of admin commands will be logged.
2 : Use of admin commands will be logged, in addition to players toggling Friendly on themselves.
3 : Same as 2, except any command run that affects multiple players will list all players. For example, if an admin runs sm_friendly_lock @all, the logs will list ALL PLAYERS AFFECTED by the command.
sm_friendly_update 1 : (0/1/2) This plugin supports automatic updating through Updater.
0 : Automatic updating is disabled. You will be notified of any available updates in Updater's log file.
1 : Notify the server admin that an update is available through Updater's log file.
2 : Updates will be downloaded, but not installed until the next map change.
3 : Updates will be downloaded and activated immediately. This will cause players present during the moment of the update to be taken out of Friendly mode instantly, as if they toggled it themselves.
sm_friendly_maxfriendlies 32 : (Any non-negative integer) This sets the maximum number of players that can be simultaneously Friendly at any given time.
sm_friendly_delay 5 : (Any non-negative value) This sets how long, in seconds, a player must wait after changing modes before he can use sm_friendly again.
sm_friendly_afklimit 300 : (Any non-negative integer) This cvar sets how long, in seconds, a player can be continuously be AFK while Friendly. Set to 0 to disable. A player who exceeds this limit will be forced out of Friendly mode and slain. Players will not be affected if they are Locked through sm_friendly_lock.
sm_friendly_afkinterval 1.0 : (Any positive value) 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 lag.
FRIENDLY SETTINGS
sm_friendly_action_f -2 : (Any integer -2 or greater) What action to take on living players outside of spawn who want to enable Friendly mode?
-2 : The player must wait until he respawns to enable Friendly mode.
-1 : The player will be slain, Friendly mode being enabled upon respawn.
0 : Friendly mode will be enabled immediately.
Any positive integer : The player will be made Friendly immediately, but will also be Slapped for an amount of damage specified by this cvar.
sm_friendly_action_h -2 : (Any integer -2 or greater) What action to take on living players outside of spawn who want to disable Friendly mode?
-2 : The player must wait until he respawns to disable Friendly mode.
-1 : The player will be slain, Friendly mode being disabled upon respawn.
0 : Friendly mode will be disabled immediately.
Any positive integer : Friendly mode will be disabled immediately, and the player will be Slapped for an amount of damage specified by this cvar.
sm_friendly_action_f_spawn 0 : (Any integer -2 or greater) What action to take on living players in spawn who want to enable Friendly mode?
-2 : The player must wait until he respawns to enable Friendly mode.
-1 : The player will be slain, Friendly mode being enabled upon respawn.
0 : Friendly mode will be enabled immediately.
Any positive integer : The player will be made Friendly immediately, but will also be Slapped for an amount of damage specified by this cvar.
sm_friendly_action_h_spawn 0 : (Any integer -2 or greater) What action to take on living players in spawn who want to disable Friendly mode?
-2 : The player must wait until he respawns to disable Friendly mode.
-1 : The player will be slain, Friendly mode being disabled upon respawn.
0 : Friendly mode will be disabled immediately.
Any positive integer : Friendly mode will be disabled immediately, and the player will be Slapped for an amount of damage specified by this cvar.
sm_friendly_remember 0 : (0/1) If enabled, a player who dies while Friendly will still be Friendly upon respawn.
sm_friendly_goomba 1 : (0/1) When enabled, the plugin will treat Goomba Stomps with the same rules it treats normal attacks. (Friendly players cannot be stomp or be stomped, unless the stomper is an admin who has used sm_friendly_admin). This protection does not apply if you are running an older version of Goomba Stomp.
sm_friendly_blockrtd 1 : (0/1) When enabled, the plugin will not allow Friendly players to activate a Dice Roll.
OTHER FRIENDLY LIMITATIONS
sm_friendly_stopcap 1 : (0/1) If enabled, Friendly players will be unable to cap points or push carts. (NOTE: If a non-Friendly player is pushing a cart or capping a point, and switches to Friendly mode WHILE DOING SO, he will continue to be able to push/cap until he leaves the capture zone. If you are concerned about players abusing this, consider setting sm_friendly_action_f to "-1" or "-2".)
sm_friendly_stopintel 1 : (0/1) If enabled, Friendly players will be unable to hold the intelligence.
sm_friendly_ammopack 1 : (0/1) If enabled, Friendly players will be unable to pick up ammo boxes, ammo from weapon drops, or Sandman balls. In addition, they will not drop ammo upon death.
sm_friendly_healthpack 1 : (0/1) If enabled, Friendly players will be unable to pick up Sandviches or health boxes.
sm_friendly_money 1 : (0/1) If enabled, Friendly players will be unable to pick up MvM money.
sm_friendly_pumpkin 1 : (0/1) If enabled, Friendly players will be unable to destroy pumpkin bombs.
sm_friendly_airblastkill 1 : (0/1) If enabled, any airblasted projectiles will vanish, if the pyro reflecting it is non-Friendly, and the person who made the projectile is Friendly. Does not apply to stickies.
sm_friendly_funcbutton 0 : (0/1) If enabled, Friendly players will be unable to trigger func_buttons through either damage or the +use command.
sm_friendly_spellbook 1 : (0/1) If enabled, Friendly players will be unable to pick up spell pickups on maps like Helltower.
sm_friendly_usetele 3 : (0/1/2/3) Controls whether Friendly players can use non-Friendly teleporters, and vice versa. Note that if sm_friendly_noblock_t is set to anything higher than 0, all players will be unable to use a Friendly teleporter regardless of this cvar.
0 : All teleporters act as normal.
1 : Friendly players will be unable to use non-Friendly teleporters.
2 : Non-Friendly players will be unable to use Friendly teleporters.
3 : Both 1 and 2 apply.
INVULNERABILITY SETTINGS
Please note that a player or building's invulnerability setting doesn't really matter, if its noblock setting means that all attacks pass right through it.
sm_friendly_invuln 2 : (0/1/2/3) Sets invulnerability type of Friendly players.
0 : Friendly players will be given full godmode.
1 : Friendly players will be given buddha mode.
2 : Friendly players will only be immune to the basic attacks of other players.
3 : Same as 2, except a player will also be immune to self-inflicted damage.
Rocket/Sticky Jumping while Friendly requires this cvar to be set to 1 or 2; 0 and 3 will not work with Rocket/Sticky Jumping.
sm_friendly_invuln_s 0 : (0/1/2) Sets invulnerability type of Friendly sentries.
0 : Friendly sentries will only be invulnerable to other Friendly players.
1 : Friendly sentries will be invulnerable to damage from any player.
2 : Friendly sentries will have full godmode.
sm_friendly_invuln_d 0 : (0/1/2) Sets invulnerability type of Friendly dispensers.
0 : Friendly dispensers will only be invulnerable to other Friendly players.
1 : Friendly dispensers will be invulnerable to damage from any player.
2 : Friendly dispensers will have full godmode.
sm_friendly_invuln_t 0 : (0/1/2) Sets invulnerability type of Friendly teleporters.
0 : Friendly teleporters will only be invulnerable to other Friendly players.
1 : Friendly teleporters will be invulnerable to damage from any player.
2 : Friendly teleporters will have full godmode.
NOTARGET SETTINGS
sm_friendly_notarget 1 : (0/1/2/3) If enabled, a friendly player will be invisible to sentries, immune to airblasts, etc.
0 = Friendly players will not ever be given the flag; they will be targeted by sentries and can be airblasted. This is not recommended.
1 = Friendly players will always have the flag, and therefore will always be invisible to sentries and immune to airblasts. However, if a Friendly player tries to change weapons by hitting a resupply, he will NOT be given his new weapons.
2 = Same as 1, except the flag will be temporarily removed upon hitting a resupply cabinet. This has two issues:
If a player hits a cabinet, leaves the cabinet for a split second, and then starts touching the cabinet again BEFORE he can resupply, he will temporarily be visible to sentries. This visibility will last less than a second, ending when the resupply actually happens, or he stops touching the cabinet.
If a player touches a resupply cabinet, and THEN tries to change his weapons WHILE STILL TOUCHING THE CABINET, he will NOT recieve his new weapons.
3 = The player will have the flag removed as long as he is touching a resupply. This means that Friendly players can always resupply successfully, but also means that a friendly player can act as an immortal sentry distracter as long as he remains on the cabinet. This may not be an issue depending on the map.
sm_friendly_notarget_s 1 : (0/1) If enabled, a friendly sentry will be invisible to sentries.
sm_friendly_notarget_d 1 : (0/1) If enabled, a friendly dispenser will be invisible to sentries. (This will make the building not want to heal anyone for more than a moment at a time; it can still give out ammo normally.)
sm_friendly_notarget_t 1 : (0/1) If enabled, a friendly teleporter will be invisible to sentries.
NOBLOCK SETTINGS
sm_friendly_noblock 2 : (0/1/2/3) Sets the collision group of Friendly players. Please note that a high setting on this cvar can have adverse affects on Friendly players on certain maps. For example, a setting of 2 or 3 will prevent a player from being pushed (such as by elevators), and a setting of 3 will have Friendly players completely unable to use map triggers (such as conveyor belts, supply cabinets, teleporters built into the map, etc.) With this cvar, more than any other on this plugin, you must carefully think about and choose the option that is best for your map/server.
0 : Friendly players have the same collision as normal. (m_collisiongroup 5)
1 : Friendly players cannot block players or certain projectiles. (m_collisiongroup 2)
sm_friendly_noblock_s 3 : (0/1/2/3) If enabled, a Friendly sentry will not be able to block the paths of other players.
0 : Friendly sentries have the same collision as normal. (m_collisiongroup 5)
1 : Players and certain projectiles will go right through Friendly sentries. (m_collisiongroup 2)
2 : Players, certain projectiles, and bullets will go right through Friendly sentries. (m_collisiongroup 10)
3 : EVERYTHING goes right through friendly sentries. (m_collisiongroup 1)
sm_friendly_noblock_d 3 : (0/1/2/3) If enabled, a Friendly dispenser will not be able to block the paths of other players.
0 : Friendly dispensers have the same collision as normal. (m_collisiongroup 5)
1 : Players and certain projectiles will go right through Friendly dispensers. (m_collisiongroup 2)
2 : Players, certain projectiles, and bullets will go right through Friendly dispensers. (m_collisiongroup 10)
3 : EVERYTHING goes right through friendly dispensers. (m_collisiongroup 1)
sm_friendly_noblock_t 3 : (0/1/2/3) If enabled, a Friendly teleporter will not be able to block the paths of other players. (If > 0, only the Engineer who built the teleporter will be able to use it.)
0 : Friendly teleporters have the same collision as normal. (m_collisiongroup 5)
1 : Players and certain projectiles will go right through Friendly teleporters. (m_collisiongroup 2)
2 : Players, certain projectiles, and bullets will go right through Friendly teleporters. (m_collisiongroup 10)
3 : EVERYTHING goes right through friendly teleporters. (m_collisiongroup 1)
ALPHA SETTINGS
sm_friendly_alpha 50 : (Any integer -1 thru 255) When set to a value between and including 0 and 255, friendly users are set to that alpha value. Players will be more see-through the closer you are to 0, and more "solid" the closer you get to 255. Setting this to -1 completely disables the function.
sm_friendly_alpha_w 50 : (Any integer -1 thru 255) Same as above, but for the player's hats, miscs, demoshields, and other wearable weapons.
sm_friendly_alpha_wep 50 : (Any integer -1 thru 255) Same as above, but for the player's regular held weapons.
sm_friendly_alpha_s 50 : (Any integer -1 thru 255) Same as above, but for friendly sentries.
sm_friendly_alpha_d 50 : (Any integer -1 thru 255) Same as above, but for friendly dispensers.
sm_friendly_alpha_t 50 : (Any integer -1 thru 255) Same as above, but for friendly teleporters.
sm_friendly_alpha_proj 50 : (Any integer -1 thru 255) Same as above, but for friendly players' projectiles. This only affects some projectiles, and does NOT affect any particle or other effect that follows the projectile.
BUILDING KILL SETTINGS
sm_friendly_killsentry 1 : (0/1) When enabled, the sentry will vanish upon the Engineer leaving Friendly mode.
sm_friendly_killdispenser 1 : (0/1) When enabled, the dispenser will vanish upon the Engineer leaving Friendly mode.
sm_friendly_killtele 1 : (0/1) When enabled, the teleporter will vanish upon the Engineer leaving Friendly mode.
sm_friendly_killsentry_f 1 : (0/1) When enabled, the sentry will vanish upon the Engineer entering Friendly mode.
sm_friendly_killdispenser_f 1 : (0/1) When enabled, the dispenser will vanish upon the Engineer entering Friendly mode.
sm_friendly_killtele_f 1 : (0/1) When enabled, the teleporters will vanish upon the Engineer entering Friendly mode.
sm_friendly_nobuild_s 0 : (0/1) When enabled, Friendly engineers will be unable to begin construction of sentries.
sm_friendly_nobuild_d 1 : (0/1) When enabled, Friendly engineers will be unable to begin construction of dispensers.
sm_friendly_nobuild_t 0 : (0/1) When enabled, Friendly engineers will be unable to begin construction of teleporters.
WEAPON BLOCKING SETTINGS
sm_friendly_blockwep_classes -1 : This cvar sets what weapon classes ("tf_weapon_minigun" for example) to block. Any Friendly player who attempts to take out a weapon that is on this list will be unable to do so. Set this cvar to -2 to disable, -1 to use the "default" list, or you can enter your own weapon classes, separated by commas. For example:
sm_friendly_blockweps -1 : This cvar sets what weapons to block, through its item definition index. Any Friendly player who attempts to take out a weapon that is on this list will be unable to do so. This cvar is more speficic than sm_friendly_blockwep_classes. Set this cvar to -2 to disable, -1 to use the "default" list, or you can enter your own weapon indexes, separated by commas. For example:
Code:
sm_friendly_blockweps "656,447,44,58,222,305,528"
Setting this cvar to 1 will tell it to use the default list, which is:
sm_friendly_blockweps_whitelist -1 : If a weapon's class is blocked by sm_friendly_blockwep_classes, placing its item definition index here will unblock it from usage. Convenient when you only want a single weapon unblocked from a weapon class with many weapons, such as only unblocking the Phlog while keeping all other Flamethrowers blocked. Set this cvar to -2 to disable, -1 to use the "default" list, or you can enter your own weapon indexes, seperated by commas. For example:
Code:
sm_friendly_blockweps_whitelist "594,159,433"
Setting this cvar to 1 will tell it to use the default list, which is:
Spoiler
594 - Phlogistinator
159 - Dalokohs Bar
433 - Fishcake
sm_friendly_blocktaunt -1 : This cvar sets what weapons to block taunting with. Any Friendly player who attempts to taunt with a weapon on this list will be unable to do so. Set this cvar to -2 to disable, -1 to use the "default" list, or you can enter your own weapon indexes, seperated by commas. For example:
Code:
sm_friendly_blocktaunt "37,1003,304,56,1005,142"
Setting this cvar to 1 will tell it to use the default list, which is:
14.1119 - Updated gamedata, fixed a bug with sound hook, added bread reskins of mad milk and jarate to the default blocked weapons
16.0112 - Updated gamedata, switch to new syntax, ddhoward_updater.inc, validClient.inc, removed cvar caching, removed thirdperson and overlay, removed cvar value verification, removed advert
Plans, goals, and dreams:
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 cvar that, when enabled, will clear the domination/revenge status of a player entering friendly mode.
A way to distinguish Friendly players without alpha changing.
A way to make Friendly players invisible to bosses.
Menu support?
Notes, Known Issues, Known Bugs, Known Exploits:
If a Friendly player/building's invuln cvar is not set to godmode or buddha, it can still be damaged by other players through non-normal means, such as the RTD effects Toxic and Timebomb.
Friendly players can still damage non-Friendly players through non-normal means, such as RTD Toxic, RTD Timebomb, etc.
Bosses will still attempt to attack Friendly players, regardless of any inability to actually do damage.
A Friendly player, when headshotted with the Bazaar Bargain, grants the sniper a "head," regardless of the fact that the victim never dies or even takes damage.
Friendly players can still be heard by all nearby players. Footsteps, voice commands, weapon use, etc. This can be confusing to your more attentive players who are taking the combat more seriously than others.
If a Friendly player accidentally walks into a non-friendly cloaked enemy spy, he may accidentally reveal the spy's location.
Installation:
To install, simply ensure that your Sourcemod installation is up to date (at least v1.5), and place the SMX in your plugins folder. You should also put friendly.txt into your gamedata folder. Optionally, place the cfg in tf/cfg/sourcemod/.
Please also consider installing Updater. This will let you automatically keep your plugins up-to-date.
Looks nice. Will it also remove the player's collision to prevent griefing?
Yes this absolutely needs to happen. Some kind of decal or particle that denotes a player as friendly would be helpful too, so people that are fighting don't waste their time on people that can't be killed.
You have to search for them with findentitybyclassname, and hook entity "player"
To change hitbox, just change their surroundingvexmins and surroundingvecmaxs if i recall correctly, just make four static float arrays, two for reducing hitbox, and two for restoring it.
Another problem... Not sure if this will impact you.
If you set the notarget flag before inventory application, clients will not recieve their items properly, and will become civilian mode. Similarly, it can hapen when they touch a supply locker when under the effect of notarget... items will not be generated properly. This is most noticable when they have advanced options set to not move them in their spawn room when respawning.
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
You have to search for them with findentitybyclassname, and hook entity "player"
You make it sound so simple, lol.
Quote:
To change hitbox, just change their surroundingvexmins and surroundingvecmaxs if i recall correctly, just make four static float arrays, two for reducing hitbox, and two for restoring it.
Wouldn't resizing the hitbox also change the player's perspective? When I resize myself with sm_resize, I find that my perspective changes to match my new size and hitbox. When changing my size to extremely small amounts, I find that my perspective drops to below the floor beneath me. Wouldn't this be an issue with the method you have suggested? Or is the perspective changing a special feature of sm_Resize?
Further, wouldn't just removing collision be good enough? There simply MUST be a way for players marked as "friendly" to have a complete lack of collision with all other players. And I recall reading somewhere that removing a player's collision in TF2 also causes projectiles and hitscan bullets to pass through them? I'm probably wrong though.
EDIT: Unless of course you mean that I would only reduce the width and depth of the hitboxes, and not the height. That's an interesting idea to me, but it seems like players would be able to fall into strange places that they would normally be to big to fit into?
Quote:
Another problem... Not sure if this will impact you.
If you set the notarget flag before inventory application, clients will not recieve their items properly, and will become civilian mode. Similarly, it can hapen when they touch a supply locker when under the effect of notarget... items will not be generated properly. This is most noticable when they have advanced options set to not move them in their spawn room when respawning.
When does "inventory application" take place? I don't seem to be having an issue with civvie mode. I did at one point, but an update I've put out since seems to have solved it. No idea what I did to fix it; I seem to recall it having something to do with sm_friendly_remember.
I'm at the point now where simple logic and copy/paste prowess no longer serve me to the extents that I need. :\ Updating the plugin any further will be a fulfilling challenge.
I just tested the plugin and it appears as if I can still damage people while having !friendly on. The server restart did the trick. Will you extend the buddha mode to immunity from goomba stomps?
Uploading new version 13.0412 (1249), included in both this post and the first post of this thread. Changes include:
Added plugin version cvar: sm_friendly_version
Added Debug command sm_debugfriendly, requires ROOT flag by default. Only useful to those who are editing the source code.
Quote:
Originally Posted by Sreaper
Looks nice. Will it also remove the player's collision to prevent griefing?
Didn't even think of that. Added to the to-do list.
Quote:
Originally Posted by Mr. Man
Will you extend the buddha mode to immunity from goomba stomps?
Currently, Friendly players are immune to recieving the goomba stomp damage, but can DEAL the same damage to other players. The same issue applies to the RTD effects Timebomb and Toxic; a Friendly player who happens to roll these effects becomes an unstoppable killing machine. Hoping to eliminate this issue in the future, as I learn more about SourcePawn and SDKHooks.
AS a side note. Some of my players can still use passive things. Like throwing sandviches to heal other players. Again maybe just removing their ability to use weapons would be best.
AS a side note. Some of my players can still use passive things. Like throwing sandviches to heal other players. Again maybe just removing their ability to use weapons would be best.
That might be self-defeating in that friendly people like to interact with others using taunts or something equal.
AS a side note. Some of my players can still use passive things. Like throwing sandviches to heal other players. Again maybe just removing their ability to use weapons would be best.
If sm_friendly_blockweps 1, Friendly players shouldn't even be able to even take out their sandviches. Is this not functioning for you? If the cvar is set to 1, and only some players have the ability to take out these weapons, perhaps you did not perform a map change or server restart after installing the plugin?
As for the indication of friendly-ness, I'm thinking some sort of particle effect floating above the player's head, or perhaps something similar to the glow provided by sm_spyvision. I want to avoid conflicts with other commands like sm_color and sm_render as much as possible.