Raised This Month: $ Target: $400
 0% 

TF2 - Changing a client's score without CalcPlayerScore


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Darkimmortal
Senior Member
Join Date: Aug 2008
Old 02-05-2009 , 12:15   TF2 - Changing a client's score without CalcPlayerScore
Reply With Quote #1

I know it isn't possible directly, but could it be done through triggering some sort of event or in some way, forcing a player to shoot a bot on a certain team?

Because my ScoutzKnivez plugin completely abstracts the shooting and death system, the scores are stuck at 0 - I want them to show kills or, preferably, the amount of lives remaining.

I currently have code in place to manage a bot on each team and to trigger player_death and/or player_hurt (both of which failed to change scores) so all I need is a way of forcing a player to shoot someone.

And before you recommend CalcPlayerScore, my dedicated servers run Windows.


EDIT: Oops, my bad. Please move this to Scripting.
Darkimmortal is offline
L. Duke
Veteran Member
Join Date: Apr 2005
Location: Walla Walla
Old 02-05-2009 , 12:34   Re: TF2 - Changing a client's score without CalcPlayerScore
Reply With Quote #2

You could spawn a point_hurt at the bots location and trigger that. It would work, but it's not really the best way.
__________________
"Good grammar is essential, Robin."
- Batman
L. Duke is offline
Darkimmortal
Senior Member
Join Date: Aug 2008
Old 02-05-2009 , 13:37   Re: TF2 - Changing a client's score without CalcPlayerScore
Reply With Quote #3

But then surely the bot would just die as if they had suicided?

I need it a player to actually make the kill so their score increases/decreases. :/
Darkimmortal is offline
L. Duke
Veteran Member
Join Date: Apr 2005
Location: Walla Walla
Old 02-05-2009 , 14:46   Re: TF2 - Changing a client's score without CalcPlayerScore
Reply With Quote #4

You just need to set the damage target. Check out the last few posts of this thread: http://forums.alliedmods.net/showthread.php?t=76564
__________________
"Good grammar is essential, Robin."
- Batman
L. Duke is offline
raydan
Senior Member
Join Date: Aug 2006
Old 02-12-2009 , 01:47   Re: TF2 - Changing a client's score without CalcPlayerScore
Reply With Quote #5

increase player score, like my example?
http://forums.alliedmods.net/showthread.php?t=82266

or change m_iFlags value?
raydan is offline
L. Duke
Veteran Member
Join Date: Apr 2005
Location: Walla Walla
Old 02-12-2009 , 10:30   Re: TF2 - Changing a client's score without CalcPlayerScore
Reply With Quote #6

TF2 uses the game stats system to keep score and changes to the m_iFrags/m_iDeaths are not reflected to that system. The signatures like IncrementFragCount seem to only increment m_iFrags and the CPlayerState::frags variables which I don't think would do anything on TF2 (although I haven't tested it).
__________________
"Good grammar is essential, Robin."
- Batman
L. Duke is offline
koshmel
Member
Join Date: Nov 2008
Old 02-13-2009 , 06:22   Re: TF2 - Changing a client's score without CalcPlayerScore
Reply With Quote #7

Hi.
Someone can tell me how get point's from TF2 scoreboard?
koshmel is offline
MikeJS
Senior Member
Join Date: Nov 2008
Old 02-13-2009 , 17:39   Re: TF2 - Changing a client's score without CalcPlayerScore
Reply With Quote #8

TF2_GetPlayerResourceData(client, TFResource_TotalScore)
MikeJS 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 23:48.


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