Hello, Question about editing qagame.qvm to add player stats

Locked
Peruse
Posts: 1
Joined: Sat Feb 12, 2011 9:10 pm

Hello, Question about editing qagame.qvm to add player stats

Post by Peruse »

What I'm trying to do, is add stats like(top weapon accuracies) and post them when the map is over. I have the source code for the mod I want to edit but i'm lost at how I can create stats for each weapon fired and hit for each person on the server then post the top accuracies of each weapon from the top players at end of the map. I know OSP mod does this with /topshots command and has all sorts of stats that is all done by the serverside(qagame.qvm). I could use some help on how I can accomplish this goal. I want this to be serverside only. And one more quick question. Would editing the cgame.qvm be useless if I wanted the server to work without downloading the cgame file?

Thank you very much,
Chris
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Re: Hello, Question about editing qagame.qvm to add player stats

Post by ^misantropia^ »

What I'm trying to do, is add stats like(top weapon accuracies) and post them when the map is over. I have the source code for the mod I want to edit but i'm lost at how I can create stats for each weapon fired and hit for each person on the server then post the top accuracies of each weapon from the top players at end of the map. I know OSP mod does this with /topshots command and has all sorts of stats that is all done by the serverside(qagame.qvm). I could use some help on how I can accomplish this goal. I want this to be serverside only.
You need to add fields to the gclient_t struct in g_local.h, update them from within G_Damage() in g_combat.c and show the results from within BeginIntermission() in g_main.c (probably, depends on what you want to do exactly).
And one more quick question. Would editing the cgame.qvm be useless if I wanted the server to work without downloading the cgame file?
Yep, the cgame is client-side only.
Locked