Raised This Month: $ Target: $400
 0% 

[EXTENSION] Dukehacks


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Fyren
FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren
Join Date: Feb 2106
Old 11-29-2008 , 06:38   Re: [EXTENSION] Dukehacks
Reply With Quote #1

Quote:
Originally Posted by apy View Post
I am creating a script that will change the damage of weapons in tf2. I am going to make each weapon do a set amount of damage, such as 50 for the rocket launcher ect...
If all you want is consistent damage, do "sm_cvar tf_damage_range 0" to get it. It's one of the hidden devel cvars.
Fyren is offline
L. Duke
Veteran Member
Join Date: Apr 2005
Location: Walla Walla
Old 11-28-2008 , 11:40   Re: [EXTENSION] Dukehacks
Reply With Quote #2

Damage isn't passed by reference and can't be set directly. Try this:

Code:
public Action:TraceAttackHook(client, attacker, inflictor, Float:damage, &Float:multiplier)
{
// rl
if (WEP == 1)
{
    PrintToConsole(client, "rocket");
    multiplier = 50.0 / damage;
    return Plugin_Changed;
}
EDIT: Also, I believe TraceAttack only works for direct hits with rockets, pipebombs, etc. You might want to try the TakeDamage hook instead which gets called even for indirect hits by those weapons.
__________________
"Good grammar is essential, Robin."
- Batman
L. Duke is offline
apy
Junior Member
Join Date: Oct 2008
Old 11-28-2008 , 14:56   Re: [EXTENSION] Dukehacks
Reply With Quote #3

Your method works, but not in the way that I want. I am trying to make the rocket do 50 damage as a base and have it so that is still scales over distance but at that distance each hit will do the same damage. So at 50 ft away a rocket will do 40 damage every shot instead of 43, 38 ect..

I am trying to do this by changing the damage rather than taking the difference in the health or any method like that
apy is offline
apy
Junior Member
Join Date: Oct 2008
Old 11-29-2008 , 14:53   Re: [EXTENSION] Dukehacks
Reply With Quote #4

sort of, but I want that damage to still drop at a distance so that a rocket from far away might do 30 damage, but it will do 30 damage every time instead of 32, 27, 29 ect
apy is offline
hl2mukkel
Junior Member
Join Date: Oct 2008
Old 12-23-2008 , 09:46   Re: [EXTENSION] Dukehacks
Reply With Quote #5

when there ll be a version for Sourcemod 1.2 ?
hl2mukkel is offline
CrimsonGT
Veteran Member
Join Date: Oct 2007
Location: Gainesville, FL
Old 12-27-2008 , 19:57   Re: [EXTENSION] Dukehacks
Reply With Quote #6

Quote:
Originally Posted by hl2mukkel View Post
when there ll be a version for Sourcemod 1.2 ?
No, Duke isnt coding much anymore since his HD died and he basically lost everything, except for whats posted up on these forums, which is not much.
__________________
CrimsonGT is offline
Lebson506th
Veteran Member
Join Date: Jul 2008
Old 12-27-2008 , 15:49   Re: [EXTENSION] Dukehacks
Reply With Quote #7

It's not a metamod plugin, its a sourcemod extension.

sm exts list
__________________
My Plugins
Spray Tracer by Nican, maintained by me
Simple TK Manager
DoD:S Admin Weapons

Links
Resistance and Liberation (A HL2 Multiplayer Modification)
Lebson506th is offline
WW2
Member
Join Date: May 2005
Location: USA, WA, In a tree
Old 12-28-2008 , 13:34   Re: [EXTENSION] Dukehacks
Reply With Quote #8

Quote:
Originally Posted by Lebson506th View Post
It's not a metamod plugin, its a sourcemod extension.

sm exts list
Just because MetaMod Source is installed doesn't mean you can't run it, if you read my post.

Quote:
sourcemod-1.1.0-hg2428
__________________
[img]http://img149.**************/img149/825/forumsig7tr.jpg[/img]
WW2 is offline
Lebson506th
Veteran Member
Join Date: Jul 2008
Old 12-28-2008 , 14:33   Re: [EXTENSION] Dukehacks
Reply With Quote #9

Quote:
and we get nothing for DukeHacks under meta listing.
My point is that it's not going to show under the meta listing because its not a metamod: source plugin.

Use the command "sm exts list" instead.
__________________
My Plugins
Spray Tracer by Nican, maintained by me
Simple TK Manager
DoD:S Admin Weapons

Links
Resistance and Liberation (A HL2 Multiplayer Modification)
Lebson506th is offline
WW2
Member
Join Date: May 2005
Location: USA, WA, In a tree
Old 12-28-2008 , 19:45   Re: [EXTENSION] Dukehacks
Reply With Quote #10

Quote:
Originally Posted by Lebson506th View Post
My point is that it's not going to show under the meta listing because its not a metamod: source plugin.

Use the command "sm exts list" instead.
Ahh, get your point, was told to type meta list to see if it was running, but your right, that makes no sense, thanks.
__________________
[img]http://img149.**************/img149/825/forumsig7tr.jpg[/img]
WW2 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 18:08.


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