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

[TF2] If i'm using a watch (i.e dead ringer) i take more damage


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Nursik
Senior Member
Join Date: Jul 2016
Location: In TF2
Old 07-07-2016 , 02:41   [TF2] If i'm using a watch (i.e dead ringer) i take more damage
Reply With Quote #1

Is that possible?

Last edited by Nursik; 07-07-2016 at 04:10.
Nursik is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 07-07-2016 , 05:27   Re: [TF2] If i'm using a watch (i.e dead ringer) i take more damage
Reply With Quote #2

Yes
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
Nursik
Senior Member
Join Date: Jul 2016
Location: In TF2
Old 07-07-2016 , 06:31   Re: [TF2] If i'm using a watch (i.e dead ringer) i take more damage
Reply With Quote #3

Quote:
Originally Posted by friagram View Post
Yes
Why doesn't this work? What do they mean by "new-style declarations"?
HTML Code:
Your plugin failed to compile! Read the errors below:
SourcePawn Compiler 1.7.1
Copyright (c) 1997-2006 ITB CompuPhase
Copyright (c) 2004-2014 AlliedModders LLC

/home/groups/sourcemod/upload_tmp/phpvwb1D6.sp(26) : error 147: new-style declarations are required
1 Error.
Code:
#pragma semicolon 1
#pragma newdecls required
#include <sourcemod>
#include <sdkhooks>

public Plugin myinfo = 
{ 
name = "Pre-Gun Mettle Dead Ringer", 
author = "Nursik", 
description = "Makes dead ringer giga times more useful", 
version = "1.0", 
url = "www.teamfortress.com" 
}; 

public void OnClientPostAdminCheck(int client)
{
SDKHook(client, SDKHook_OnTakeDamage, OnTakeDamage); 
}

public Action OnTakeDamage(int victim, int &attacker, int &inflictor, float &damage, int &damagetype, int &weapon, float damageForce[3], float damagePosition[3])
{ 
if(!(1 <= attacker <= MaxClients))
return Plugin_Continue;
if(!(1 <= victim <= MaxClients))
return Plugin_Continue;
new weapon = GetEntPropEnt(client, Prop_Send, "m_hActiveWeapon");
if (GetEntProp(weapon, Prop_Send, "m_iItemDefinitionIndex") == 59)
{
damage *= 0.10;
return Plugin_Changed;
}
return Plugin_Continue;
}
Nursik is offline
Arkarr
Veteran Member
Join Date: Sep 2012
Location: Just behind my PC screen
Old 07-08-2016 , 09:45   Re: [TF2] If i'm using a watch (i.e dead ringer) i take more damage
Reply With Quote #4

Probably 'cause of :
PHP Code:
#pragma semicolon 1
#pragma newdecls required 
remove it and retry.
__________________
Want to check my plugins ?
Arkarr is offline
Nursik
Senior Member
Join Date: Jul 2016
Location: In TF2
Old 07-08-2016 , 13:23   Re: [TF2] If i'm using a watch (i.e dead ringer) i take more damage
Reply With Quote #5

Quote:
Originally Posted by Arkarr View Post
Probably 'cause of :
PHP Code:
#pragma semicolon 1
#pragma newdecls required 
remove it and retry.
If it works, i'll be very glad. Sorry if i was asking a very obvious thing, i just got the code from another thread and rewrote something, idk sourcepawn. :/

Last edited by Nursik; 07-08-2016 at 13:29.
Nursik is offline
Nursik
Senior Member
Join Date: Jul 2016
Location: In TF2
Old 07-08-2016 , 13:49   Re: [TF2] If i'm using a watch (i.e dead ringer) i take more damage
Reply With Quote #6

Quote:
Originally Posted by Arkarr View Post
Probably 'cause of :
PHP Code:
#pragma semicolon 1
#pragma newdecls required 
remove it and retry.
I changed the code a bit and it still gives me an error.
Code:
	new weapon = GetEntPropEnt(client, Prop_Send, "m_hActiveWeapon");
	if (GetEntProp(weapon, Prop_Send, "m_iItemDefinitionIndex") == 59)
	{
		damage *= 0.10;
		return Plugin_Changed;
	}
	return Plugin_Continue;
HTML Code:
error 017: undefined symbol "client"
1 Error.

Last edited by Nursik; 07-09-2016 at 02:53.
Nursik is offline
You9
Member
Join Date: Mar 2016
Old 07-08-2016 , 14:53   Re: [TF2] If i'm using a watch (i.e dead ringer) i take more damage
Reply With Quote #7

Quote:
new weapon = GetEntPropEnt(client, Prop_Send, "m_hActiveWeapon");
Should be "victim"?

Last edited by You9; 07-08-2016 at 14:53.
You9 is offline
Nursik
Senior Member
Join Date: Jul 2016
Location: In TF2
Old 07-08-2016 , 15:00   Re: [TF2] If i'm using a watch (i.e dead ringer) i take more damage
Reply With Quote #8

Quote:
Originally Posted by You9 View Post
Should be "victim"?
Thanks, i'll try.
Nursik is offline
Nursik
Senior Member
Join Date: Jul 2016
Location: In TF2
Old 07-08-2016 , 15:02   Re: [TF2] If i'm using a watch (i.e dead ringer) i take more damage
Reply With Quote #9

Quote:
Originally Posted by You9 View Post
Should be "victim"?
Your plugin successfully compiled! Needs a test now, i'll have to test it tomorrow though (it's night for me right now). ;)
Nursik is offline
Nursik
Senior Member
Join Date: Jul 2016
Location: In TF2
Old 07-08-2016 , 15:09   Re: [TF2] If i'm using a watch (i.e dead ringer) i take more damage
Reply With Quote #10

I know it's obvious if you look at the code first time, but this plugin is supposed to make dead ringer's damage reduction 90%.
Nursik 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 17:21.


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