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

[TF2] tHeadshotOnly v2.0.1 (2014.05.30)


Post New Thread Reply   
 
Thread Tools Display Modes
Thrawn2
Veteran Member
Join Date: Apr 2009
Old 08-22-2011 , 12:30   Re: [TF2] tHeadshotOnly v1.007 (2011.08.13)
Reply With Quote #51

Quote:
Originally Posted by DREAD_XI View Post
I have one request please. How can I change so the plugin is turned off by default?
some plugins autogenerate a config file.
take a look at your /tf/cfg/sourcemod/ folder.
there should be a plugin.tHeadshotOnly.cfg.
edit it to change the defaults.

Quote:
Originally Posted by DREAD_XI View Post
Thanks again for this plugin it's great!
you're welcome.
__________________
einmal mit profis arbeiten. einmal.
Thrawn2 is offline
DREAD_XI
Junior Member
Join Date: Aug 2011
Old 08-23-2011 , 18:38   Re: [TF2] tHeadshotOnly v1.007 (2011.08.13)
Reply With Quote #52

Quote:
Originally Posted by Thrawn2 View Post
some plugins autogenerate a config file.
take a look at your /tf/cfg/sourcemod/ folder.
there should be a plugin.tHeadshotOnly.cfg.
edit it to change the defaults.


you're welcome.
I changed the options in the cfg. Thanks for that. But now the plugin is just turned off.
Cannot get it to enable with map.cfg on map change.

I know this is prob not widely a feature that needs to work for every server owner but our server is mixed maps. We need the option to have this only come on when the server is running a sniper map.
The plugin works perfectly when enabled.

Thank you so much!

Last edited by DREAD_XI; 08-23-2011 at 18:41.
DREAD_XI is offline
Sedacra
New Member
Join Date: Aug 2011
Old 08-25-2011 , 22:43   Re: [TF2] tHeadshotOnly v1.007 (2011.08.13)
Reply With Quote #53

Having some trouble getting this to work. We run 100% crits and want to be able to turn off crit body shots.

The following is in the server cfg file and i made a sniper.cfg and put it there as well.

sm_cvar sm_theadshotonly_sniper 0.5
sm_cvar sm_theadshotonly_huntsman 1.0
sm_cvar sm_theadshotonly_bazaar 0.5
sm_cvar sm_theadshotonly_ambassador 1.0

sm exts list
[SM] Displaying 10 extensions:
[01] Automatic Updater (1.3.9-dev): Updates SourceMod gamedata files
[02] Webternet (1.3.9-dev): Extension for interacting with URLs
[03] TF2 Tools (1.3.9-dev): TF2 extended functionality
[04] BinTools (1.3.9-dev): Low-level C/C++ Calling API
[05] SDK Tools (1.3.9-dev): Source SDK Tools
[06] Top Menus (1.3.9-dev): Creates sorted nested menus
[07] UnlockBlock (2.0.0): Disable Unlocks
[08] SDK Hooks (2.0.0): Source SDK Hooks
[09] Client Preferences (1.3.9-dev): Saves client preference settings
[10] SQLite (1.3.9-dev): SQLite Driver





sm plugins
"Flying Doctor" (0.0.2) by RIKUSYO
"Player Commands" (1.3.9-dev) by AlliedModders LLC
"UnlockBlock" (2.0.0) by Asher "asherkin" Baker
"No Fall Damage" (0.0.1.9) by alexip121093
"[TF2] Roll The Dice" (0.3.8.2) by linux_lover
"Basic Chat" (1.3.9-dev) by AlliedModders LLC
"Flare Firework" (0.0. by RIKUSYO
"King Kong Drumming" (0.0.0) by RIKUSYO
"Mushroom Health" (1.0.0.2) by L. Duke
"Reserved Slots" (1.3.9-dev) by AlliedModders LLC

sm plugins 11
"tHeadshotOnly" (1.0.0.7) by Thrawn
"Basic Votes" (1.3.9-dev) by AlliedModders LLC
"Client Preferences" (1.3.9-dev) by AlliedModders LLC
"Reverse Engineer" (0.0.5) by RIKUSYO
"Doping Injection" (0.0. by RIKUSYO
"Uber Transplant" (0.0.5) by RIKUSYO
"Supercharger" (0.0.7) by RIKUSYO
"Swear Replacement" (1.4) by Hell Phoenix
"Spike Shoes" (0.0. by RIKUSYO
"Admin Menu" (1.3.9-dev) by AlliedModders LLC
"Basic Comm Control" (1.3.9-dev) by AlliedModders LLC
T
"Admin Help" (1.3.9-dev) by AlliedModders LLC
"Marking Shot" (0.1.1) by RIKUSYO
"Basic Ban Commands" (1.3.9-dev) by AlliedModders LLC
"Sound Commands" (1.3.9-dev) by AlliedModders LLC
"RMF Ability Menu" (0.1.0) by RIKUSYO
"Centrifuge Rotor" (0.0.7) by RIKUSYO
"Goomba Stomp" (1.2.2) by Flyflo
"TF Max Players" (4. by Nican132,cadavor,JameLess,Thraka
"Sapper Throw" (0.1.1) by RIKUSYO
"Sleep Switch" (0.0.5) by RIKUSYO
"Drunk Bomb" (0.0. by RIKUSYO
To see more, type "sm plugins 33"
sm plugins 33
"Fun Commands" (1.3.9-dev) by AlliedModders LLC
"After Burner" (0.0.7) by RIKUSYO
"Melee" (0.3) by linux_lover
"Anti-Flood" (1.3.9-dev) by AlliedModders LLC
"Burnsday Present" (0.0.2) by RIKUSYO
"Sticky Flash" (0.0.6) by RIKUSYO
"Homing Rocket" (0.0.3) by RIKUSYO
"Nextmap" (1.3.9-dev) by AlliedModders LLC
"tf2nades" (1.0.0.7) by L. Duke
"Styptic" (0.0.6) by RIKUSYO
"Disguise Jutsu" (0.0.4) by RIKUSYO
"[TF2] gScramble Team Manager" (3.0.7) by Goerge
"Fun Votes" (1.3.9-dev) by AlliedModders LLC
"Delicious Sandvich" (0.0.9) by RIKUSYO
"Admin File Reader" (1.3.9-dev) by AlliedModders LLC
"Basic Info Triggers" (1.3.9-dev) by AlliedModders LLC
"Metal Hopper" (0.0.6) by RIKUSYO
"Basic Commands" (1.3.9-dev) by AlliedModders LLC
"SM Crits chance" (0.1) by pRED*
"TF2SwitchPlayers" (1.1) by Kevinbrunet
"Quake Sounds" (2.7) by dalto, Grrrrrrrrrrrrrrrrrrr, and psychonic
"tNoUnlocksPls" (0.2.1) by Thrawn
"Curving Arrow" (0.0.5
Sedacra is offline
Thrawn2
Veteran Member
Join Date: Apr 2009
Old 08-26-2011 , 11:35   Re: [TF2] tHeadshotOnly v1.007 (2011.08.13)
Reply With Quote #54

Quote:
Originally Posted by Sedacra View Post
Having some trouble getting this to work. We run 100% crits and want to be able to turn off crit body shots.
a) You didn't really say what your problem is, only that you have one. Symptoms usually help in debugging problems, so try to be more specific in the future please

b) In this case i can imagine what your problem is: All of the snipers damage output is halfed.
Thats because this plugin assumes that all critical hits are headshots if they come from a specific weapon.
Thats the only way in TF2 to distinguish head from bodyshots.
So with every shot being a crit, the plugin thinks that every shot from a sniper rifle etc is a headshot.
This is not fixable as long as there is no other way to detect headshots.

c) Use sm plugins list, it's not paginated...

Quote:
Originally Posted by DREAD_XI View Post
I changed the options in the cfg. Thanks for that. But now the plugin is just turned off.
Cannot get it to enable with map.cfg on map change.
You should have this issue with every plugin then...
I never did sth like this (using map specific configurations), so i can't help you there. Maybe look for another thread with this problem.
Again (just to be sure): your problem is not specific to this plugin!
__________________
einmal mit profis arbeiten. einmal.
Thrawn2 is offline
Sedacra
New Member
Join Date: Aug 2011
Old 08-26-2011 , 13:50   Re: [TF2] tHeadshotOnly v1.007 (2011.08.13)
Reply With Quote #55

a) problem we are having is body shots are still critting (150 damage)


b) wouldn't mind sniper damage halved, or even missing all together on body shots. Just need it to not 1 shot people on the body.

** just re-read your post, so this plugin can't tell the difference in sniper crits on head and body.

Thank you for the fast reply, I'll have to keep looking for that type of plugin,



We also have a similar issue with the enforcer and shortstop but we just ban those weapons.

c) thanks, pages were annoying

Last edited by Sedacra; 08-26-2011 at 14:50.
Sedacra is offline
Thrawn2
Veteran Member
Join Date: Apr 2009
Old 08-30-2011 , 18:17   Re: [TF2] tHeadshotOnly v1.007 (2011.08.13)
Reply With Quote #56

this is so ridiculous. i don't believe it.
you are getting angry at people that are trying to help you. are you seeing that?

a) what you are quoting is not the solution, but the reason why your setup fails. you need to work around this, all previously mentioned solutions work fine.

b) last (and fifth or sth) try to help you. though i seriously don't know why i even bother.
  1. Open up the plugins source.
  2. Go to line 45, it should be: AutoExecConfig(true, "plugin.tHeadshotOnly");
  3. Change it to: //AutoExecConfig(true, "plugin.tHeadshotOnly");
  4. Save and close it. Compile it. Use it.
  5. It will use your <map>.cfg and server.cfg
Since you are using SourceMod for 3-4 years now, you should know how to compile a plugin.

I guess you don't (because you are registered since this month), so i attached it the way you like it best. Let's say i tried the modification and it works.
Now please stop wasting my time and saying this plugin is broken, because it's using a sourcemod feature.

b) can a mod please fix the mess in this thread?
I sum it up quickly: This plugin is working fine. It uses AutoExecConfig, which gets executed after valve's <map>.cfg feature, so settings there get overwritten by the plugins config. He thinks it's the plugins fault and it is broken, though it's him who can't follow the simplest instructions on how to work around his issue.
I've suggested to start another thread discussing this rather specific problem as it is not really related to this plugin, but belongs in a more general forum. I've made a mistake there and suggested some solutions in this thread and so it goes on and on in here.
Attached Files
File Type: smx tHeadshotOnly.smx (5.6 KB, 144 views)
File Type: sp Get Plugin or Get Source (tHeadshotOnly.sp - 234 views - 6.4 KB)
__________________
einmal mit profis arbeiten. einmal.

Last edited by Thrawn2; 08-30-2011 at 18:20.
Thrawn2 is offline
cybersquare420
Veteran Member
Join Date: Nov 2008
Old 08-31-2011 , 11:42   Re: [TF2] tHeadshotOnly v1.007 (2011.08.13)
Reply With Quote #57

here, i added code for the other 3... i think it all works as intended... post if it doesnt and ill see if my meager coding skills can fix it... and by all means anyone else that wants to clean up the code or whatever and repost, DO SO!

Quote:
#include <sourcemod>
#include <tf2>

new Handle:crits = INVALID_HANDLE;
new Handle:chance = INVALID_HANDLE;

#define PLUGIN_VERSION "0.1"

public Plugin:myinfo =
{
name = "SM Crits chance",
author = "pRED* (edited by cybersquare420 to ignore sniper weps and ambassador)",
description = "Change critical hit %",
version = PLUGIN_VERSION,
url = "http://www.sourcemod.net/"
};

public OnPluginStart()
{
crits = CreateConVar("sm_crits_enabled", "1");
chance = CreateConVar("sm_crits_chance", "1.00");

CreateConVar("sm_crits_version", PLUGIN_VERSION, "Crits Version", FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_REPLICATED|FC VAR_NOTIFY);
}


public Action:TF2_CalcIsAttackCritical(client, weapon, String:weaponname[], &bool:result)
{
if (!GetConVarBool(crits))
{
return Plugin_Continue;
}
if (StrEqual(weaponname, "tf_weapon_sniperrifle", true))
{
return Plugin_Handled;
}
if (StrEqual(weaponname, "tf_weapon_sniperrifle_decap", true))
{
return Plugin_Handled;
}
if (StrEqual(weaponname, "tf_weapon_compound_bow", true))
{
return Plugin_Handled;
}
if (StrEqual(weaponname, "tf_weapon_revolver", false) && GetEntProp(weapon, Prop_Send, "m_iEntityQuality") == 3)
{
return Plugin_Continue;
}
if (GetConVarFloat(chance) > GetRandomFloat(0.0, 1.0))
{
result = true;
return Plugin_Handled;
}

result = false;

return Plugin_Handled;
}
__________________
cybersquare420 is offline
DREAD_XI
Junior Member
Join Date: Aug 2011
Old 08-31-2011 , 14:56   Re: [TF2] tHeadshotOnly v1.007 (2011.08.13)
Reply With Quote #58

Quote:
Originally Posted by Thrawn2 View Post
this is so ridiculous. i don't believe it.
you are getting angry at people that are trying to help you. are you seeing that?

a) what you are quoting is not the solution, but the reason why your setup fails. you need to work around this, all previously mentioned solutions work fine.

b) last (and fifth or sth) try to help you. though i seriously don't know why i even bother.
  1. Open up the plugins source.
  2. Go to line 45, it should be: AutoExecConfig(true, "plugin.tHeadshotOnly");
  3. Change it to: //AutoExecConfig(true, "plugin.tHeadshotOnly");
  4. Save and close it. Compile it. Use it.
  5. It will use your <map>.cfg and server.cfg
Since you are using SourceMod for 3-4 years now, you should know how to compile a plugin.

I guess you don't (because you are registered since this month), so i attached it the way you like it best. Let's say i tried the modification and it works.
Now please stop wasting my time and saying this plugin is broken, because it's using a sourcemod feature.

b) can a mod please fix the mess in this thread?
I sum it up quickly: This plugin is working fine. It uses AutoExecConfig, which gets executed after valve's <map>.cfg feature, so settings there get overwritten by the plugins config. He thinks it's the plugins fault and it is broken, though it's him who can't follow the simplest instructions on how to work around his issue.
I've suggested to start another thread discussing this rather specific problem as it is not really related to this plugin, but belongs in a more general forum. I've made a mistake there and suggested some solutions in this thread and so it goes on and on in here.
I don't often run in to an instance where I need to post in a fourm and ask any questions really much. They are usually already asked or will be soon. I do not understand why the plugin is set up to use it's own config insted of the server.cfg/map.cfg in the first place... Is there a reason not to use the configs everyone else uses for this plugin. They obviously work. I do not appreciate you editing your post once again just to draw out another argument. I was told in the first place to install another plugin to get a simple feature you fixed so graciously for me. I apoligize for the banter but you also are very dissmissive and impationt your self not to just help me in the first place. I needed a change because I just simply install and it turned in to flame. Either way you fixed it for me so it was broken on this end.

This is a great plugin.

Plugin is working great now in our server. Tested last night. Thanks again
__________________

If someone is lacking your great knowledge why not break it down and explain?... Afraid they might understand? +Everything Just Tasted Purple..

Last edited by DREAD_XI; 08-31-2011 at 15:49.
DREAD_XI is offline
Thrawn2
Veteran Member
Join Date: Apr 2009
Old 09-11-2011 , 07:30   Re: [TF2] tHeadshotOnly v1.1.0 (2011.09.11)
Reply With Quote #59

Updated to v1.1.0
This utilizes the new damagecustom feature of sdkhooks 2.1, if you have that installed.
If you haven't you are hereby advised to do so - though the plugin should (as in, i cba to test with old software) work if you don't.
If you have you can now run this on a 100% crit server, it doesn't matter what your critchance is at all.

There are also a few new cvars for you to play with:
  • sm_theadshotonly_sidney - Modifier for any damage dealt by the Sidney Sleeper (Default: 1.0, The Sidney Sleeper does normal damage).
  • sm_theadshotonly_machina - Modifier for bodyshot damage dealt by The Machina. (Default: 0.0, The Machina can only do headshots)
  • sm_theadshotonly_noscope - Modifier for no-scope bodyshot damage dealt by the Sniper Rifle or the Bazaar Bargain. (Default: 0.0, no-scopes deal no damage).
__________________
einmal mit profis arbeiten. einmal.
Thrawn2 is offline
cybersquare420
Veteran Member
Join Date: Nov 2008
Old 09-11-2011 , 09:51   Re: [TF2] tHeadshotOnly v1.1.0 (2011.09.11)
Reply With Quote #60

nice! much better than the hacky code i posted above!
__________________
cybersquare420 is offline
Reply



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:34.


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