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

[EXTENSION] CalcPlayerScore (TF2)


Post New Thread Reply   
 
Thread Tools Display Modes
exvel
SourceMod Donor
Join Date: Jun 2006
Location: Russia
Old 11-10-2008 , 12:15   Re: [EXTENSION] CalcPlayerScore (TF2)
Reply With Quote #21

I dont like OnClalcPlayerScore method. Old was better. How can I script plugin which will run in TF and in other games? If I will use event functon OnClalcPlayerScore() then plugin will report that it need an extension for non-TF games!
__________________
For admins: My plugins

For developers: Colors library
exvel is offline
Send a message via ICQ to exvel
L. Duke
Veteran Member
Join Date: Apr 2005
Location: Walla Walla
Old 11-10-2008 , 13:00   Re: [EXTENSION] CalcPlayerScore (TF2)
Reply With Quote #22

Since TF uses the game stats management system to show the player score and games like CSS save the player's score in the player entity, they must be treated differently. There isn't really a way around that.
__________________
"Good grammar is essential, Robin."
- Batman
L. Duke is offline
exvel
SourceMod Donor
Join Date: Jun 2006
Location: Russia
Old 11-10-2008 , 13:13   Re: [EXTENSION] CalcPlayerScore (TF2)
Reply With Quote #23

I know that but in old version of this extension was 3 functions: SetPlayerScore, AddPlayerScore, SetScoreMod. In version 1.1.0 it have only one function OnClalcPlayerScore. It something like an event-function (example like OnClientConnect). This means that I always should use this fucntion in code. In old version of extension I could use such code:

if (modfolder == 'tf')
{
SetPlayerScore(...) // for TF
}
else
{
SetScoreOther(...) // for CS:S, HL2:DM...
}

Now I always must use OnClalcPlayerScore and it means that I don't know how to make plugin in such way that it will now not require this extension for non-TF game. :(
__________________
For admins: My plugins

For developers: Colors library

Last edited by exvel; 11-10-2008 at 13:18.
exvel is offline
Send a message via ICQ to exvel
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 11-10-2008 , 13:16   Re: [EXTENSION] CalcPlayerScore (TF2)
Reply With Quote #24

Just do the TF specific stuff in OnCalcPlayerScore and the other stuff in it's own place. The old method I used was pretty buggy because I'm still somewhat new at C++ extensions, so it was a lot easier for me to do it in a plugin.
bl4nk is offline
exvel
SourceMod Donor
Join Date: Jun 2006
Location: Russia
Old 11-10-2008 , 13:19   Re: [EXTENSION] CalcPlayerScore (TF2)
Reply With Quote #25

Quote:
Originally Posted by bl4nk View Post
Just do the TF specific stuff in OnCalcPlayerScore and the other stuff in it's own place. The old method I used was pretty buggy because I'm still somewhat new at C++ extensions, so it was a lot easier for me to do it in a plugin.
Really? So simple? Thanks
__________________
For admins: My plugins

For developers: Colors library
exvel is offline
Send a message via ICQ to exvel
MikeJS
Senior Member
Join Date: Nov 2008
Old 01-18-2009 , 11:21   Re: [EXTENSION] CalcPlayerScore (TF2)
Reply With Quote #26

What needs to be changed for this to work on Windows?
MikeJS is offline
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 01-18-2009 , 14:06   Re: [EXTENSION] CalcPlayerScore (TF2)
Reply With Quote #27

I have no idea.
bl4nk is offline
MikeJS
Senior Member
Join Date: Nov 2008
Old 01-18-2009 , 14:26   Re: [EXTENSION] CalcPlayerScore (TF2)
Reply With Quote #28

Fair enough
Is there another way to change a player's score on windows?
MikeJS is offline
Cocci
Junior Member
Join Date: Dec 2008
Old 01-20-2009 , 12:35   Re: [EXTENSION] CalcPlayerScore (TF2)
Reply With Quote #29

Is it possible to block score with that plugin ?

I'd love to be able to use this to block scores when a team wins a round on TF2.

Thanks for your answers
Cocci is offline
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 01-20-2009 , 12:48   Re: [EXTENSION] CalcPlayerScore (TF2)
Reply With Quote #30

Technically, yes. Look at the source of the plugin I posted for an example of how I handle the modification of scores. Pretty much all you'd have to do is just use a modifier to subtract X points (the ones that they gained during the bonus round) from their score and return the new value.
bl4nk 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 12:30.


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