PDA

View Full Version : [EXTENSION] CalcPlayerScore (TF2)


bl4nk
09-11-2008, 01:55
CalcPlayerScore
v1.2.0

WARNING: This extension can (more than likely it will) screw up your stats permanently. Use with caution!

Description:
Modify players' scores using a variety of methods.

Installation:
Download the CalcPlayerScore.zip located at the bottom of the post and extract it to the base of your TF2 mod folder.

CVars:
cps_version - CalcPlayerScore version.

Commands:
sm_addscore <#userid|name> <points> - Add x points to the player's score.
sm_setscore <#userid|name> <score> - Set the player's score to x.
sm_setscoremod <#userid|name> <score> - Set the player's score modifier to x.

Forwards:
/**
* @brief Called when a player's score is being calculated.
*
* @param client Client index of the player.
* @param score The player's unmodified score.
* @return The player's desired score.
*/
forward OnCalcPlayerScore(client, score);

Notes:


This extension works by hooking CalcPlayerScore and adding a score modifier to the default returned value, in turn making the score appear to be something it's truely not.
You can directly set that score modifier by using sm_setscoremod or you can add/subtract to it using sm_addscore.
If you want to set the player's score to something specific (say 1337), you can use sm_setscore to do that (setting that to -1 sets their score to the normal value - taking into account the score modifier, of course).
The score modifier is reset for each player on map change. This is a precaution just in case a player leaves and a new players joins in their place, or if the player reconnects with a different client index.

This extension will have problems with my RunTeamLogic extension. You can not (at this time) run both at once. In the future I might make it so they can work together, but for now they will not.

Thanks to:
pRED* for the detour code.
Nephyrin for helping me figure out a crash on map change.
CrimsonGT for finding the reason that this extension crashed on Windows.

Changelog:


1.0.0

Initial release.


1.1.0

Linux only (for the time being).
Removed score system from the extension and moved it to the plugin.
Scores actually set now (an untested last minute change screwed it up before).
Removed the natives and added the OnCalcPlayerScore forward.


1.2.0

Windows version released
Changed a few minor things in the plugin, all commands and such remain the same
Added a few extra checks to prevent modifying the wrong player's score

DontWannaName
09-11-2008, 03:17
Will this allow this http://forums.alliedmods.net/showthread.php?p=660327 to have TF2 support?

bl4nk
09-11-2008, 09:13
It could, yes. The plugin would just have to save the value of m_iScore for the player, and then use one of the native functions I provided to get the desired result.

strontiumdog
09-11-2008, 09:31
Good job Bl4nkeh!
:D

L. Duke
09-11-2008, 10:20
Nice bl4nk! I ran into this issue with the TF2NADES plugin, but decided on a workaround rather than trying to figure out an extension like this.

This will be appreciated by lots of plugin authors!

strontiumdog
09-11-2008, 10:50
It certainly will.....
:D

exvel
09-11-2008, 11:39
What about DoD? Does it work for other OB games?

bl4nk
09-11-2008, 12:45
I don't play DOD:S so I'm not sure how the scoring system works.

exvel
09-11-2008, 13:35
Extension crashes server. Tried to add bot - got crash. Tried to connect to my own server - got crash. :(
SourceMod v1.0.4
SourceMod v1.1.0

bl4nk
09-11-2008, 14:33
Hmm, looks like the extension has problems on Windows. I'll take a look at it and see why.

Arg!
09-11-2008, 19:25
This looks excellent, but i need to run the RunTeamLogic for the arena maps to work 'properly'. +1 internet if you can make them compatible.

Also is this tied to SM 1.1? I wish there was a field for that in the post header.

bl4nk
09-11-2008, 19:43
I tested and compiled it on the 1.0 branch, but it should work fine on 1.1.

bl4nk
09-11-2008, 21:05
Updated to Version 1.1.0
Sorry for the Windows users, but this isn't a fix for them. I'm still working on figuring out why it's crashing on Windows, so for the time being I'm only releasing the extension for those running Linux. I'll get to making it work on Windows over the weekend.

The JCS
09-11-2008, 21:44
Waiting =] I'll use it on Jump Mode. Thanks bl4nk!

Arg!
09-17-2008, 06:09
How bad will this not work with RunTeamLogic i mean, will it kill my server or just be unpredictible. Id love to use this but people love the 12v12 arena mode i have in my normal rotation.

Also, grats on the 'promotion'

bl4nk
09-17-2008, 10:25
They just won't work at all. It might crash the server, it might not.

exvel
09-30-2008, 09:53
Windows Version Coming Soon!
Is there any news about windows version? :)

bl4nk
09-30-2008, 14:10
I've been busy, so I haven't had the chance to look at it lately. The last time I did look at it, the crash seemed to come out of nowhere for some reason.

Antithasys
11-02-2008, 13:40
Any updates?

FlyingMongoose
11-07-2008, 03:35
still nothing for windows :(

exvel
11-10-2008, 12:15
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! :(

L. Duke
11-10-2008, 13:00
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.

exvel
11-10-2008, 13:13
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. :(

bl4nk
11-10-2008, 13:16
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.

exvel
11-10-2008, 13:19
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

MikeJS
01-18-2009, 11:21
What needs to be changed for this to work on Windows?

bl4nk
01-18-2009, 14:06
I have no idea.

MikeJS
01-18-2009, 14:26
Fair enough :P
Is there another way to change a player's score on windows?

Cocci
01-20-2009, 12:35
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

bl4nk
01-20-2009, 12:48
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.

Cocci
01-21-2009, 03:42
Great !

That's good news ! :)

Thanks bl4nk

CrimsonGT
03-29-2009, 02:50
I fixed this tonight to work with windows. The problem is that your detour on CalcPlayerScore is a MEMBER and it needs to be a STATIC. Heres the updated signature if you want to use it. I noticed yours was outdated.

\x8B\x4C\x24\x04\x56\x8B\x71\x38\x85\xF6\x57\ x7C\x08\x81\xFE\x2A\x2A\x2A\x00\x7E\x02

MikeJS
03-29-2009, 05:53
I can't give you karma fast enough

CrimsonGT
03-29-2009, 06:05
lol, I wasnt going to bother posting it but I read through and saw it was needed.

bl4nk
03-29-2009, 23:29
Updated to Version 1.2.0

Thanks to Crimson, this extension should now work on Windows.

MikeJS
03-30-2009, 11:53
[08] CalcPlayerScore (1.1.0): Modify a player's score

bl4nk
03-30-2009, 15:52
Odd. I recompiled and reuploaded the binaries. Were you running that on Linux perhaps?

MikeJS
03-30-2009, 15:55
Windows

bl4nk
03-30-2009, 16:00
That's even stranger. Redownload the binary package and try that out. Nothing has changed in the extension, I just recompiled after checking to see if the version number was set to 1.2.0.

MikeJS
03-30-2009, 16:31
Shows up as 1.2.0 now, odd.

bl4nk
03-30-2009, 16:32
Oh well. At least it's working on Windows now. :]

exvel
03-31-2009, 13:33
bl4nk, you are great man.

exvel
04-11-2009, 13:59
Found some bugs:

Extension fails to load without scoremod.smx
ScoreMod conflicts with plugins that also using CalcPlayerScore functionality (client's scores are incorrect)

bl4nk
04-11-2009, 14:11
I updated the .inc file. It should fix the first problem you listed. As for the second problem, I will work on a fix for that (meaning move back to doing the player score calculations in the extension rather than the plugin - scoremod was just meant as an example plugin for people to use).

exvel
04-11-2009, 14:29
Thank you for doing this. I hope new extension functionality will be back compatible but if not I hope it will be released soon.

exvel
04-13-2009, 09:40
Found a strange error.
[TF2] Sigscan for CalcCriticalKnife failed - Disabling detour to prevent crashes
It apears on each extension load but all works fine with this error. :)

bl4nk
04-13-2009, 15:11
That's not related to this extension AFAIK.

CrimsonGT
04-16-2009, 18:07
Thats caused by an old version of SM (back from the scout update IIRC)

Jamster
04-18-2009, 21:59
Hey bl4nk, I am testing this on my TF2 server right now WITH RunTeamLogic using a shared gamedata file and it seems to be working, I'll let you know if it goes tits up or not but it seems to be fine.

bl4nk
04-19-2009, 00:18
I don't see how that's possible. Whichever extension is loaded second should be giving you an error saying something about the signature for UTIL_PlayerByIndex couldn't be found.

Jamster
04-19-2009, 07:46
Well, been running a while now and it seems fine and working, I don't understand either in that case, I just modified the calcplayerscore gatadata file to include the runteamlogic offset and edited the source for RunTeamLogic to read that gamedata file too.

Is it maybe the plugin? I am using Save Scores by exvel instead of the included plugin. I'll give you further trip reports if I notice anything else.

DontWannaName
04-25-2009, 22:54
The included plugin doesn't automatically load on Windows. I have to manually load it.

bl4nk
04-26-2009, 00:51
That doesn't make sense. Are there any errors present in your logs?

DontWannaName
04-26-2009, 01:45
Nope. It just doesnt load :(

bl4nk
04-26-2009, 02:38
That's incredibly strange. It loads perfectly fine on all of my servers.

DontWannaName
04-26-2009, 03:18
00:17:53 sm plugins info scoremod
00:17:53 [SM] Plugin scoremod.smx is not loaded.

:(
I am using saved scores, maybe that is blocking it or something.

exvel
04-26-2009, 05:21
scoremod.smx has a conflict with savescore.smx. So savescores.smx always unloads scoremod.smx.

DontWannaName
04-26-2009, 05:41
Ya just found that out, I disabled savescores and it loaded.

Blank, have you had any issues with the extension screwing up the way steam stats are calculated?

bl4nk
04-26-2009, 14:30
Not that I know of. Steam actually thinks that your score is what it's set to, so if you set it to be really high (like 999999999 or whatever, check out the max points for each class on my stats page (http://steamcommunity.com/id/bl4nk/stats/TF2)), the game will think your new highest score is that, so watch out.

exvel
04-26-2009, 14:45
If you will spawn then change your score for example to 500 and then die this score will be recorded to player's stats page. This looks normal but it is very big problem for my save scores plugin. Because stats system includes restored score into counter so it looks like player gained this score during the round. I am looking for a way how to solve this problem right now.

p.s. so it is not an extension's problem

DontWannaName
04-26-2009, 17:07
Ya bl4nk, my players got mad when their scores got a little funky on steam stats. :(

bl4nk
04-26-2009, 17:45
Don't blame me for you using this improperly.

Zalaxy
05-17-2009, 11:56
Jesus let people know before hand that this will scar you're stats.

20 Million points!!! woot!

DontWannaName
06-29-2009, 19:19
I set my score to 9999 ingame without exvels plugin and now my medic stats say I had the most points with 9999 on steam stats lol... so im pretty sure its not exvels plugin anymore.

bl4nk
06-30-2009, 14:27
What plugin are you talking about? This extension has always had that problem, and I'm pretty sure it's not solvable without modifying another function that I have no idea how it works.

DJ Tsunami
07-01-2009, 05:35
I don't see the problem, you're changing your score, of course Steam Stats is going to pick it up.

Zalaxy
08-26-2009, 13:29
Hey guys I'm trying this plugin.

I got a linux build server with Sourcemod Version Build ID: 2737 and it's sourcemod Dev 1.2.2



I get the following error when uploading the calc extension.

"calcplayerscore.ext.so": /lib/tls/libc.so.6: version `GLIBC_2.4' not found (required by /usr/local/games/tf/768549/63.211.105.240:27015/orangebox/tf/addons/sourcemod/extensions/calcplayerscore.ext.so)

What did I miss/do wrong?

bl4nk
08-26-2009, 13:39
Looks like you're missing glibc 2.4. Try installing it.

halbblah
08-29-2009, 06:01
since last tf2 update, this plugin seems to be broken. update in the works ? I realy like this plugin!

exvel
01-03-2010, 09:15
since last tf2 update, this plugin seems to be broken. update in the works ? I realy like this plugin!
Just tested. It works fine on wndows. Don't know about Linux.

Atreus
01-21-2010, 22:10
Is there still no way to get this working with RunTeamLogic? I'd love to run both :x

DontWannaName
01-22-2010, 02:56
It has the potential to alter users steam stats in certain situations. I dont recommend using it in a live server.

bl4nk
01-22-2010, 17:57
I might have found a way to fix that problem. Once my computer is all fixed up I'll do some testing and (hopefully) release a fixed version.

exvel
01-22-2010, 18:03
I might have found a way to fix that problem. Once my computer is all fixed up I'll do some testing and (hopefully) release a fixed version.
Sounds really great. :)

Atreus
01-22-2010, 20:33
I might have found a way to fix that problem. Once my computer is all fixed up I'll do some testing and (hopefully) release a fixed version.

Cool stuff! I'll look forward to it

psychonic
04-29-2010, 19:02
Updated binaries. (it's possible the windows one was fine as is, but it was quicker to just rebuild instead of looking through the source).

Arg!
04-29-2010, 19:09
psychonic the repair man, great work!

crazydog
07-17-2010, 04:52
Doesn't seem to be working for me...I'm using the version psychonic posted above....none of the scoremod commands do anything. Nothing in logs either....

(TF2, Windows)

Also, for some reason the scoremod plugin doesn't automatically load. If I don't run "sm plugins load scoremod", it will not load itself.

psychonic
07-17-2010, 11:39
Doesn't seem to be working for me...I'm using the version psychonic posted above....none of the scoremod commands do anything. Nothing in logs either....

(TF2, Windows)

Also, for some reason the scoremod plugin doesn't automatically load. If I don't run "sm plugins load scoremod", it will not load itself.

Are you using all the files from the first post (except the ext) and the ext from 2 posts above you?

If so, what is the output of "sm exts list"?

crazydog
07-17-2010, 15:07
I've installed the extension and all its components correctly, and sourcemod does report that it is running.

psychonic
07-17-2010, 15:16
Does sm plugins list show the plugin as loaded with error?

What does sm plugins info # show?(where # is the number of the plugin)

crazydog
07-17-2010, 15:17
No errors,


12:17:25 Filename: scoremod.smx
Title: ScoreMod (Modify player's scores)
Author: bl4nk
Version: 1.1.0
URL: http://forums.alliedmods.net
Status: running
Reloads: Map Change if Updated
Timestamp:


Before it's asked, I am not running runteamlogic.

psychonic
07-17-2010, 16:04
I'm confused. What's not working?

crazydog
07-17-2010, 16:59
None of the commands in scoremod work (sm_setscore sm_addscore sm_setscoremod) and the save scores plugin (which uses this extension) does not save the scores.

Running the commands just does nothing. No errors, no crashes. Just nothing.

Wazz
07-17-2010, 19:02
Just leaving this here!

CON_COMMAND(wazz_incrementstat, "Wazz Environment :: Increments a players stat. Format <target> <stat> <quantity>")
{
static void *pCTFGameStats = NULL;

if (!pCTFGameStats)
{
/*
"ForceRespawn"
{
"library" "server"
"windows" "\x53\x56\x8B\xF1\x56\xB9\x2A\x2A\x2A\x2A\xE8\ x2A\x2A\x2A\x2A\xA1"
"linux" "@_ZN9CTFPlayer12ForceRespawnEv"
}
*/
char *addr;
if (!g_pGameConf->GetMemSig("ForceRespawn", (void **)&addr) || !addr)
{
META_CONPRINTF("Could not find ForceRespawn function.\n");
return;
}

/*
"CTFGameStats"
{
"windows" "6"
"linux" "29"
}
*/
int offset;
if (!g_pGameConf->GetOffset("CTFGameStats", &offset) || !offset)
{
META_CONPRINTF("Could not find CTFGameStats offset.\n");
return;
}

pCTFGameStats = *reinterpret_cast<void ***>(addr + offset);
}

if (args.ArgC() == 1)
{
META_CONPRINTF("Wazz Environment :: Increments a players stat. Format <target> <stat> <quantity>\n");
return;
}
else if (args.ArgC() != 4)
{
META_CONPRINTF("Invalid number of arguments.\n");
return;
}

uint16 iIncrementAmount = (uint16)atoi(args.Arg(3));

/* 0 - unk
* 3 - point
* 6 - captures
* 7 - defenses
* 8 - domination
* 9 - revenge
* 11 - destruction
* 12 - headshots
* 15 - invulns
* 16 - assists
* 17 - backstabs
* 21 - teleports
* 23 - bonus - in 10s?
* 30 - definately end of enum if not before
*/

int iPlayerStatsOffset = atoi(args.Arg(2)) + 197 * atoi(args.Arg(1));
// Not all the values within are uint16 but this will do for now
// Numbers 148, 272, 396 may need updating, they are found in CTFGameStats::IncrementStat. Windows and linux have the same offsets into the class here
*(uint16 *)((uint8_t *)pCTFGameStats + 4 * iPlayerStatsOffset + 148) += iIncrementAmount;
*(uint16 *)((uint8_t *)pCTFGameStats + 4 * iPlayerStatsOffset + 272) += iIncrementAmount;
*(uint16 *)((uint8_t *)pCTFGameStats + 4 * iPlayerStatsOffset + 396) += iIncrementAmount;

META_CONPRINTF("Command executed on : %s\n", GetPlayerName(atoi(args.Arg(1))));

return;
}

crazydog
07-18-2010, 14:32
So, no ideas?
Here's some more information...

SourceMod Version Information:
SourceMod Version: 1.3.4-dev
SourcePawn Engine: SourcePawn 1.1, jit-x86 (build 1.3.4-dev)
SourcePawn API: v1 = 4, v2 = 3
Compiled on: Jul 8 2010 21:17:39
Build ID: 3002:50a0dafcc82f-dev
http://www.sourcemod.net/

Metamod:Source version 1.8.2
Build ID: 723:9c2b1e877e16
Loaded As: Valve Server Plugin
Compiled on: Jun 12 2010
Plugin interface version: 15:14
SourceHook version: 5:5
http://www.metamodsource.net/

[SM] Displaying 12 extensions:
[01] Automatic Updater (1.3.4-dev): Updates SourceMod gamedata files
[02] Webternet (1.3.4-dev): Extension for interacting with URLs
[03] TF2 Tools (1.3.4-dev): TF2 extended functionality
[04] BinTools (1.3.4-dev): Low-level C/C++ Calling API
[05] SDK Tools (1.3.4-dev): Source SDK Tools
[06] Top Menus (1.3.4-dev): Creates sorted nested menus
[07] Socket (3.0.1alpha): Socket extension for SourceMod
[08] GeoIP (1.3.4-dev): Geographical IP information
[09] Client Preferences (1.3.4-dev): Saves client preference settings
[10] SQLite (1.3.4-dev): SQLite Driver
[11] CalcPlayerScore (1.2.0): Modify a player's score
[12] MySQL-DBI (): MySQL driver implementation for DBI

[SM] Listing 62 plugins:
01 "AddTime" (1.0.4) by bl4nk
02 "Admin File Reader" (1.3.4-dev) by AlliedModders LLC
03 "Admin Help" (1.3.4-dev) by AlliedModders LLC
04 "Admin Menu" (1.3.4-dev) by AlliedModders LLC
05 "AdminSentinel" (1.2.100) by <eVa>StrontiumDog
06 "Advertisements" (0.5.5) by Tsunami
07 "Anti-Flood" (1.3.4-dev) by AlliedModders LLC
08 "Auto change map" (1.1) by Mleczam
09 "Plugin Autoupdater" (1.5) by MikeJS
10 "Basic Chat" (1.3.4-dev) by AlliedModders LLC
11 "Basic Comm Control" (1.3.4-dev) by AlliedModders LLC
12 "Basic Commands" (1.3.4-dev) by AlliedModders LLC
13 "Basic Info Triggers" (1.3.4-dev) by AlliedModders LLC
14 "Basic Votes" (1.3.4-dev) by AlliedModders LLC
15 "Connect Announce" (1.1) by Arg!
16 "Client Preferences" (1.3.4-dev) by AlliedModders LLC
17 "Custom Votes" (0.5.6) by chundo
18 "Team Headless 2" (1.0) by eee (credit to PinkFaerie)
19 "Destroy Engineer Buildings" (1.0.2) by bl4nk
20 "Execute Configs" (1.0) by Tsunami
21 "Extended mapconfig package" (1.0) by Milo
22 "fakeitem.smx"
23 "Fun Commands" (1.3.4-dev) by AlliedModders LLC
24 "Fun Commands X" (1.8) by Spazman0 and Arg!
25 "Fun Votes" (1.3.4-dev) by AlliedModders LLC
26 "gameME Plugin" (3.0) by TTS Oetzel & Goerz GmbH
27 "TF2 Godmode" (1.0) by ratty-modified by Seb
28 "[TF2] gScramble Team Manager" (2.5.31) by Goerge
29 "High Ping Kicker - Lite Edition" (1.0.0.1) by Liam
30 "Light Colors" (0.5) by Jindo
31 "Extended Mapvote" (1.3) by Zuko, SM Community and AlliedModders LLC
32 "TF Max Players" (4.2) by Nican132
33 "'Mapchooser extended' companion" (2.0) by Crazydog
34 "Melee Mode" (0.4) by chundo
35 "MySQL Polls" (1.2.1) by Cep>|< - Russian BugTrack Group
36 "Nextmap" (1.3.4-dev) by AlliedModders LLC
37 "Map Nominations" (1.3.2) by AlliedModders LLC
38 "Player Commands" (1.3.4-dev) by AlliedModders LLC
39 "Players Votes" (1.4.1) by The Resident, pZv!
40 "TF2 FF on during waiting for players" (1.1) by Ratty
41 "Dynamic Prop Dance" (0.4) by Jindo
42 "Rate watcher" (0.16) by X@IDER
43 "Reserved Slots" (1.3.4-dev) by AlliedModders LLC
44 "[TF2] Respawner" (1.6) by Zuko
45 "Rock The Vote" (1.3.2) by AlliedModders LLC
46 "Save Scores" (1.3.4) by exvel
47 "[TF2] Set Soldier Rage Amount" (1.0) by Zuko
48 "[TF2] Set Uber Charge Amount" (1.3) by Zuko
49 "Simple SourceMod Plugins Core Plugin" (1.0.$Revision: 90 $) by Simple SourceMod Plugins
50 "Simple Spectate" (1.2.1) by Simple Plugins
51 "SM File/Folder Downloader and Precacher" (1.4) by SWAT_88
52 "Evil Admin - Health" (1.0.104) by <eVa>Dog
53 "Evil Admin - Pimp Slap" (1.0.102) by <eVa>Dog
54 "Evil Admin - Rocket" (1.0.110) by <eVa>Dog
55 "Evil Admin - Trails" (1.0.104) by <eVa>Dog
56 "Evil Admin - Vision" (1.0.104) by <eVa>Dog
57 "Sound Commands" (1.3.4-dev) by AlliedModders LLC
58 "SourceBans" (1.4.6) by InterWave Studios Development Team
59 "Spray Tracer" (5.8) by Nican132, CptMoore, Lebson506th
60 "Stop HintText Sound" (1.0.0) by Tauphi, exvel
61 "TeamSwitch" (1.3) by MistaGee
62 "Round-End Smack talk/Alltalk" (1.1.1) by Munra

ImHackinBored!
08-19-2010, 05:15
None of the commands in scoremod work (sm_setscore sm_addscore sm_setscoremod) and the save scores plugin (which uses this extension) does not save the scores.

Running the commands just does nothing. No errors, no crashes. Just nothing.


I have the exact same problem.

No errors or crashes, the commands simply don't work "don't exist/Unkown Command" and the save scores plugin does not work because of it.

crazydog
08-19-2010, 13:08
I'm glad someone else finally has the same issue. Mind posting your plugin + extension list? I'll post mine too..maybe we can find some unusual similarity.

Edit: I just remembered I took a handful of plugins of my server, so I don't know if that would have fixed it. I can't test it until this evening.

ImHackinBored!
08-20-2010, 16:25
Im pretty upset. This should be marked NOT for TF2. Completely raped peoples steam stats. The plugin does not load properly. Comands are unrecognized but yet alter steam score and NOT in-game score.

So lets recap...

Set's steam scores (incorrectly I might add) I add 5 points and I get over 200,000. Now EACH time I die I get that many points wether I scored at all. Or wether the extension and/or plugin are loaded at all.

My in-game score is not changed at all which is what I thought this is for...

Extension does not load and must be manually loaded every time.

My stats and game are currently ruined now and it appears there is no way to fix this. Even reseting my stats will not matter as the amount of points I score has been permanetly changed.

Unloading the extention has done nothing to fix anything now.

I do not advise using this or the plugin especially for TF2 unless you want to be called a hacker. I don't want to put all the blame on this extention because the plugin does not work right either it seems odd the plugin needs this when they conflict with each other so badly.

If anyone can assist me in restoring my game and stats to normal and others to normal please reply or message me.

Wazz
08-20-2010, 16:32
Resetting your TF2 stats will work. I have done it countless times after messing around with these things.

ImHackinBored!
08-21-2010, 00:49
Resetting your TF2 stats will work. I have done it countless times after messing around with these things.

I don't really want to lose all my stats especially my playing times.

I thought I could go in and alter the stats file (tf2_playerstats.dmx) but apparently it's dependant on the steam server and won't help it changes right back.

Is reseting my only option here?

Wazz
08-21-2010, 09:12
You could always use this to restore your 'most points' for each class, but play time will be lost.

Spacey
06-30-2011, 09:08
Is this still the one and one way to save player scores when they re-join during a map? Is there a working version for the current TF2 server?

With my version I always get:

L 06/29/2011 - 07:57:54: [SM] Unable to load extension "calcplayerscore.ext": /home/devtest/tf2-1/orangebox/tf/addons/sourcemod/extensions/calcplayerscore.ext.so: undefined symbol: _Unwind_Resume
L 06/29/2011 - 07:57:54: [SM] Plugin encountered error 25: Call was aborted
L 06/29/2011 - 07:57:54: [SM] Native "SetFailState" reported: CalcPlayerScore extension is not running
L 06/29/2011 - 07:57:54: [SM] Displaying call stack trace for plugin "savescores.smx":
L 06/29/2011 - 07:57:54: [SM] [0] Line 83, savescores/tf.sp::CheckTFExtensions()
L 06/29/2011 - 07:57:54: [SM] [1] Line 25, savescores/tf.sp::TF_Stuff()
L 06/29/2011 - 07:57:54: [SM] [2] Line 43, D:\Source-Servers\css_sm_1.2.4\cstrike\addons\sourcemod \scripting\savescores.sp::OnPluginStart()
L 06/29/2011 - 07:57:54: [SM] Unable to load plugin "scoremod.smx": Required extension "CalcPlayerScore" file("calcplayerscore.ext") not running

bl4nk
07-01-2011, 17:56
This extension is outdated and I'm not going to be supporting it any further. For another method of how to do what you want (without causing problems where players scores are overwritten), check out my post here:
http://forums.alliedmods.net/showthread.php?p=1473377#post1473377

kolya2142
06-03-2012, 21:07
not get anything, I have not worked Please help!
L 06/04/2012 - 05:01:45: [SM] Plugin encountered error 25: Call was aborted
L 06/04/2012 - 05:01:45: [SM] Native "SetFailState" reported: CalcPlayerScore extension is not running
L 06/04/2012 - 05:01:45: [SM] Displaying call stack trace for plugin "savescores.smx":
L 06/04/2012 - 05:01:45: [SM] [0] Line 86, savescores/tf.sp::CheckTFExtensions()
L 06/04/2012 - 05:01:45: [SM] [1] Line 25, savescores/tf.sp::TF_Stuff()
L 06/04/2012 - 05:01:45: [SM] [2] Line 42, D:\server\my\Public_Server_34_win_ubo_tdm\cst rike\addons\sourcemod\scripting\savescores.sp ::OnPluginStart()
The following explanation of how I can not help.
http://forums.alliedmods.net/showthread.php?p=1473377#post1473377

bl4nk
06-05-2012, 14:39
The error you posted doesn't give any information on why CalcPlayerScore isn't loaded properly. What does the output of "sm exts list" look like?

kolya2142
06-05-2012, 19:29
SM] Displaying 17 extensions:
[01] Automatic Updater (1.4.2): Updates SourceMod gamedata files
[02] Webternet (1.4.2): Extension for interacting with URLs
[03] SMRCon (1.2.1): Tools for SM plugins to interact with rcon auth and requests
[04] BinTools (1.4.2): Low-level C/C++ Calling API
[05] TF2 Tools (1.4.2): TF2 extended functionality
[06] SDK Tools (1.4.2): Source SDK Tools
[07] Top Menus (1.4.2): Creates sorted nested menus
[08] SteamTools (0.6.1): SteamWorks for SourceMod.
[09] cURL Extension (1.3.0.0): cURL Extension
[10] Socket (3.0.1): Socket extension for SourceMod
[11] Client Preferences (1.4.2): Saves client preference settings
[12] SQLite (1.4.2): SQLite Driver
[13] Builtin Votes (0.5.7): API to do votes using the L4D, L4D2, and Orange Box Valve game in-game vote interface
[14] SDK Hooks (2.1.0): Source SDK Hooks
[15] CBaseServer tools (2.0.1): Base server tools (and example of detours)
[16] Regex (1.4.2): Provides regex natives for plugins
[17] MySQL-DBI (1.4.2): MySQL driver implementation for DBI


[SM] Listing 52 plugins:
01 "SourceMod Anti-Cheat" (0.7.9.3) by GoD-Tony, psychonic
02 "TeamSwitch" (1.3) by MistaGee
03 "Updater" (1.1.5) by GoD-Tony
04 "Server Hop" (0.8.1) by [GRAVE] rig0r
05 "Admin File Reader" (1.4.2) by AlliedModders LLC
06 "ExtendedComm" (3.0.8b) by Twisted|Panda
07 "Client Preferences" (1.4.2) by AlliedModders LLC
08 "[STB] Save Temporary Bans" (0.4) by Bacardi
09 "BuiltinVotes Revote" (1.0) by Powerlord
10 "SMAC Aimbot Detector" (0.7.9.3) by GoD-Tony
11 "Fun Votes" (1.4.2) by AlliedModders LLC
12 "Fun Commands X" (1.9) by Spazman0 and Arg!
13 "Basic Commands" (1.4.2) by AlliedModders LLC
14 "SuperLogs: TF2" (2.0.6) by Thomas "CmptrWz" Berezansky & psychonic
15 "CBaseServer Ext Basic Reserve Slots" by predfoot winkerbottom
16 "Plugin Autoupdater" (1.5) by MikeJS
17 "Basic Comm Control" (1.4.2) by AlliedModders LLC
18 "Reserved Slots" (1.4.2) by AlliedModders LLC
19 "SMAC ConVar Checker" (0.7.9.3) by GoD-Tony, psychonic, Kigen
20 "Basic Info Triggers" (1.4.2) by AlliedModders LLC
21 "TF2 Class Restrictions" (0.6) by Tsunami
22 "Advertisements" (0.6.2) by Tsunami, Otstrel.ru Team
23 "Anti-Flood" (1.4.2) by AlliedModders LLC
24 "Fun Commands" (1.4.2) by AlliedModders LLC
25 "Sound Commands" (1.4.2) by AlliedModders LLC
26 "SMAC Anti-Speedhack" (0.7.9.3) by GoD-Tony
27 "Basic Votes" (1.4.2) by AlliedModders LLC
28 "Nextmap" (1.4.1) by AlliedModders LLC
29 "Win panel for losing team" (1.4-ff) by Reflex
30 "SMAC Rcon Locker" (0.7.9.3) by GoD-Tony, Kigen
31 "Trade Chat" (1.4) by Luki
32 "Admin Menu" (1.4.2) by AlliedModders LLC
33 "High Ping Kicker - Lite Edition" (1.0.0.1) by Liam
34 "[TF2] gScramble Team Manager" (3.0.11) by Goerge
35 "RockTheVote" (1.4) by ferret
36 "SMAC Eye Angle Test" (0.7.9.3) by GoD-Tony, psychonic
37 "SourceBans" (1.4.9) by SourceBans Development Team
38 "SMAC AutoTrigger Detector" (0.7.9.3) by GoD-Tony
39 "SMAC Command Monitor" (0.7.9.3) by GoD-Tony, psychonic, Kigen
40 "AFK Manager" (3.4.3) by Rothgar
41 "Admin Help" (1.4.2) by AlliedModders LLC
42 "Basic Chat" (1.4.2) by AlliedModders LLC
43 "Custom Votes" (0.5.6) by chundo
44 "HLstatsX CE Ingame Plugin" (1.6.15) by psychonic
45 "SMAC Spinhack Detector" (0.7.9.3) by GoD-Tony
46 "Remove Ads" (1.2) by Zephyrus
47 <Error> "Save Scores" (1.3.4) by exvel
48 "SMAC Anti-Wallhack" (0.7.9.3) by GoD-Tony, psychonic, Kigen
49 "Rules Menu" (1.0) by graczu_-
50 "Player Commands" (1.4.2) by AlliedModders LLC
51 "SetScore" (1.0.0) by bl4nk
52 "MapChooser Extended" (1.9.1) by Powerlord, Zuko, and AlliedModders LLC
Load Errors:
Save Scores: Error detected in plugin startup (see error logs)

bl4nk
06-06-2012, 20:35
I don't see CalcPlayerScore listed on there anywhere. Are you sure you installed it properly?

As a note, this extension is a bit outdated. You should probably use the method I posted that you linked. If you don't know how to modify the Save Scores plugin to use the aforementioned method, maybe someone could help you out with that (or I might if I have enough free time).

kolya2142
06-07-2012, 06:51
Well, sort of, I installed everything correctly, it is difficult, if not, please help, and then suffer for about a month does not work. or just throw off my archive files, which are known to work. thank you

SilentBr
08-02-2013, 12:41
I installed correctly but getting this error

[15] <FAILED> file "calcplayerscore.ext.so": vstdlib_i486.so: cannot open shared object file: No such file or directory

bl4nk, if I use your plugin will work savescore?

bl4nk
08-02-2013, 12:50
Read two posts above yours.

SilentBr
08-02-2013, 14:51
Read two posts above yours.

Yeah I did read that, so I get your script here (http://forums.alliedmods.net/showpost.php?p=1473377&postcount=2) and compile. Ok, but the problem is how to edit savescore to use your script and not the extension.

bl4nk
08-03-2013, 08:39
Try this out.

SilentBr
08-04-2013, 16:42
Try this out.

Going to test. Thank you.

Edit: It's not working, it still needed that old extension.

17:54:24 L 08/04/2013 - 17:54:27: [savescores.smx] CalcPlayerScore extension is not running
17:54:24 L 08/04/2013 - 17:54:27: [SM] Plugin encountered error 25: Call was aborted
17:54:24 L 08/04/2013 - 17:54:27: [SM] Native "SetFailState" reported: CalcPlayerScore extension is not running
17:54:24 L 08/04/2013 - 17:54:27: [SM] Displaying call stack trace for plugin "savescores.smx":
17:54:24 L 08/04/2013 - 17:54:27: [SM] [0] Line 116, savescores/tf.sp::CheckTFExtensions()
17:54:24 L 08/04/2013 - 17:54:27: [SM] [1] Line 25, savescores/tf.sp::TF_Stuff()
17:54:24 L 08/04/2013 - 17:54:27: [SM] [2] Line 43, C:\Users\bl4nk\Desktop\asdfsdf\savescores.sp: :OnPluginStart()

bl4nk
08-04-2013, 23:37
Whoops, I forgot to remove that check. This one should load without CalcPlayerScore.

SilentBr
08-11-2013, 20:26
Whoops, I forgot to remove that check. This one should load without CalcPlayerScore.

The plugin is working, but is saving 4 x your real score. I mean, if you have 10 and type retry, you'll back with 40, retry again back with 160...

rowedahelicon
08-12-2013, 04:20
The plugin is working, but is saving 4 x your real score. I mean, if you have 10 and type retry, you'll back with 40, retry again back with 160...

08/12/2013 - 03:11:21: [SM] Native "FindEntityByClassname" reported: Entity 26 is not valid
L 08/12/2013 - 03:11:21: [SM] Displaying call stack trace for plugin "savescores.smx":
L 08/12/2013 - 03:11:21: [SM] [0] Line 119, savescores/tf.sp::CheckTFExtensions()
L 08/12/2013 - 03:11:21: [SM] [1] Line 25, savescores/tf.sp::TF_Stuff()
L 08/12/2013 - 03:11:21: [SM] [2] Line 43, C:\Users\bl4nk\Desktop\asdfasdfasdf\savescore s.sp::OnPluginStart()

Also this. :S

bl4nk
08-13-2013, 08:46
I've put rewriting the Save Scores plugin on my to-do list. I'm working on quite a few projects in my spare time right now, so I'll try to get to it ASAP.

SilentBr
08-13-2013, 13:22
I've put rewriting the Save Scores plugin on my to-do list. I'm working on quite a few projects in my spare time right now, so I'll try to get to it ASAP.

Thank you.