Raised This Month: $32 Target: $400
 8% 

[TF2] Friendly Mode (v. 16.0112)


Post New Thread Reply   
 
Thread Tools Display Modes
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 02-06-2014 , 18:08   Re: [TF2] Friendly Mode (v. 14.0203.0)
Reply With Quote #251

There will be soon. In the meantime, try this.

PHP Code:
#include <friendly>
#include <tf2_stocks>

public OnPluginStart()
{
    
HookEvent("post_inventory_application"Inventory_App);
}

public 
Inventory_App(Handle:event, const String:name[], bool:dontBroadcast)
{
    new 
client GetClientOfUserId(GetEventInt(event"userid"));
    if (
TF2Friendly_IsFriendly(client))
    {
        
TF2_RemoveAllWeapons(client);
    }

Attached Files
File Type: smx civviefriendly.smx (3.5 KB, 103 views)
File Type: sp Get Plugin or Get Source (civviefriendly.sp - 97 views - 360 Bytes)
__________________
ddhoward is offline
Chdata
Veteran Member
Join Date: Aug 2012
Location: Computer Chair, Illinois
Old 02-06-2014 , 18:18   Re: [TF2] Friendly Mode (v. 14.0203.0)
Reply With Quote #252

May I ask what "some projectiles" are when using collisiongroup 2?

As in, setting it to 2, not whatever option 2 is in your cvar list.
__________________

Last edited by Chdata; 02-06-2014 at 18:19.
Chdata is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 02-06-2014 , 18:32   Re: [TF2] Friendly Mode (v. 14.0203.0)
Reply With Quote #253

Off the top of my head, and as far as I know, rockets, arrows, flares, Cow Mangler shots, Bison shots, Rescue Ranger claw thingies, and Crossbow bolts will pass right through objects with their noblock cvar set to 1 or 2.

Grenades, stickies, syringes, jars, Pomson shots, cleavers, baseballs, and ornaments will impact the player as normal unless the cvar is set to 3.
__________________
ddhoward is offline
Accioly04
Junior Member
Join Date: Jan 2014
Old 02-06-2014 , 18:44   Re: [TF2] Friendly Mode (v. 14.0203.0)
Reply With Quote #254

Quote:
Originally Posted by ddhoward View Post
There will be soon. In the meantime, try this.

PHP Code:
#include <friendly>
#include <tf2_stocks>

public OnPluginStart()
{
    
HookEvent("post_inventory_application"Inventory_App);
}

public 
Inventory_App(Handle:event, const String:name[], bool:dontBroadcast)
{
    new 
client GetClientOfUserId(GetEventInt(event"userid"));
    if (
TF2Friendly_IsFriendly(client))
    {
        
TF2_RemoveAllWeapons(client);
    }

Some issues:
- It does not activate instantaneously, player needs to change class after using the !friendly (same with disabling the command, player needs to respawn again with another class)
- It bugged the botkiller head (now, the botkiller head appears in every weapon); not a major issue, though.

Thanks for the help, by the way!

Last edited by Accioly04; 02-06-2014 at 18:46.
Accioly04 is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 02-06-2014 , 18:52   Re: [TF2] Friendly Mode (v. 14.0203.0)
Reply With Quote #255

HURRR

Yeah, it only works if the client respawns (or touches a resupply).

Try it now.

PHP Code:
public TF2Friendly_OnEnableFriendly(client)
{
    
TF2_RemoveAllWeapons(client);

A player who EXITS friendly mode will still need to respawn/change class/touch a resupply to get his weapons back. Also, I have no idea on what to do about the botkiller issue.
Attached Files
File Type: smx civviefriendly.smx (3.6 KB, 107 views)
File Type: sp Get Plugin or Get Source (civviefriendly.sp - 100 views - 479 Bytes)
__________________

Last edited by ddhoward; 02-06-2014 at 18:52.
ddhoward is offline
Accioly04
Junior Member
Join Date: Jan 2014
Old 02-06-2014 , 19:16   Re: [TF2] Friendly Mode (v. 14.0203.0)
Reply With Quote #256

Now it's working fine, though, when disabling, player still needs to touch the supply to regain his weapons (the problem is some players might desperate or something, saying that the plugin is bugged, complaints incoming haha).

Quote:
Originally Posted by ddhoward View Post
Also, I have no idea on what to do about the botkiller issue.
Guessed so. Just a pic for you to have an idea (:

http://imageshack.com/a/img836/1223/voar.jpg

Last edited by Accioly04; 02-06-2014 at 19:18.
Accioly04 is offline
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 02-07-2014 , 11:43   Re: [TF2] Friendly Mode (v. 14.0203.0)
Reply With Quote #257

Actually, it seems botkillers bug out for odd reason when it comes with modifing them in any way, same thing happens in ff2.
WildCard65 is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 02-08-2014 , 06:24   Re: [TF2] Friendly Mode (v. 14.0208.0)
Reply With Quote #258

Uploading new version 14.0208.0. 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:
  • Changed OnClientDisconnect to OnClientDisconnect_Post so plugins using friendly.inc can safely use OnClientDisconnect

  • Removed backwards compatibility for weapon blocking cvars. -2 and -1 now represent "disabled" and "use default list" respectively.

  • Added 5 new forwards and 1 new native, see friendly.inc for more info.

  • Added weapon resetting code/gamedata. This will prevent various... issues... when Friendly Mode forces a weapon switch. This new feature requires friendly.txt to be placed in your gamedata folder. The plugin will work as it did before if you do not have this file. Big thanks to the Melee Only plugin for this code.

  • Removed SMLIB as a required include.

  • Made those in sm_friendly_admin mode immune to exiting-friendly-punishments OnPluginEnd

  • Various other optimizations/updates that shouldn't really be visible to the end-user.


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


If you like what you see here, please consider donating~
Attached Files
File Type: sp Get Plugin or Get Source (friendly.sp - 105 views - 144.0 KB)
File Type: inc friendly.inc (8.7 KB, 109 views)
File Type: smx friendly.smx (59.5 KB, 117 views)
File Type: txt friendly.txt (142 Bytes, 126 views)
__________________

Last edited by ddhoward; 02-08-2014 at 07:01.
ddhoward is offline
DeathMaster
AlliedModders Donor
Join Date: Mar 2009
Old 02-12-2014 , 22:29   Re: [TF2] Friendly Mode (v. 14.0203.0)
Reply With Quote #259

Quote:
Originally Posted by Accioly04 View Post
Is there a quick way in blocking ALL weapons with friendly mode active?
Any timeline on when this will be added other then the edits listed here?
DeathMaster is offline
wauterboi
Junior Member
Join Date: Dec 2013
Old 02-15-2014 , 17:56   Re: [TF2] Friendly Mode (v. 14.0208.0)
Reply With Quote #260

I've hexed some models appear neutral gray if you would like to use them. Just let me know.
wauterboi 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 16:40.


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