Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds
Watch MODSonair

Members Online

»
0 Active | 6 Guests
Online:

LATEST FORUM THREADS

»
Node is floating???
CoD4 SP Mapping
new scripter cod4
CoD4 Scripting
Kharkov xmodels
CoD+UO General
[Release]SP East Prussian ...
CoD2 Map + Mod Releases

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Call of Duty 2
Category: CoD2 Scripting
Scripting and coding with Call of Duty 2.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, supersword, playername
Latest Posts
Subscribed Posts
Search
Restricted Access Restricted Access subscribe
Author Topic: Personal Stats is Menu
csocsi96
General Member
Since: Aug 9, 2010
Posts: 70
Last: Apr 21, 2013
[view latest posts]
Level 3
Im a fan of MODSonair
Category: CoD2 Scripting
Posted: Saturday, Nov. 19, 2011 06:33 am
Hello,

I have an Account System mod working on my server. (register, login)

So, I want to make a personal menu in the ingame menu Called: Statistics.

The mod should save all kind of statistics what you can imagine,
like: Shots fired, kills, death, headshots, nade kills, bashes, All time played on server, XP, level, rank, Grenades thrown, You Jumped X times, you have logined x times, teamkills, killed by teammates, highest killstreak, highest death streak, Won matches, etc etc...

So I want to save a lot of personal statistics.

I know how to make the variables for it, like the kills: where is attacker.score++; i place attacker.kills++; etc.., but i don't know how to display these PERSONAL settings, in the menu, for only the logined users.

Can you help me?
Share |
serthy
General Member
Since: Sep 8, 2010
Posts: 480
Last: Apr 15, 2013
[view latest posts]
Level 5
Im a fan of MODSonair
Category: CoD2 Scripting
Posted: Saturday, Nov. 19, 2011 07:09 am
in your script:
player setClientCvar( "ui_kills" , player.kills );
in the menu:
text "Your kills:"
dvar ui_kills

maybe start opening your stock iwd's and looking how the serversettings.menu is done?!
Share |
csocsi96
General Member
Since: Aug 9, 2010
Posts: 70
Last: Apr 21, 2013
[view latest posts]
Level 3
Im a fan of MODSonair
Category: CoD2 Scripting
Posted: Saturday, Nov. 19, 2011 10:28 am
Hey!

I could made It, but only the text shows up in the menu, the variable is not.

So the "Your kills: " text appears, but the ui_kills is not.

I have script in tdm.gsc
self setClientCvar( "ui_kills", self.kills );

and in menu dvar ui_kills
Share |
serthy
General Member
Since: Sep 8, 2010
Posts: 480
Last: Apr 15, 2013
[view latest posts]
Level 5
Im a fan of MODSonair
Category: CoD2 Scripting
Posted: Saturday, Nov. 19, 2011 10:54 am
Code:
		itemDef 
		{
			name stats
			text "Your kills: "
			dvar "ui_kills" 
			style 0
			textscale HEADER_SIZE 
			textstyle ITEM_TEXTSTYLE_SHADOWED
			rect 126 25 110 20
			textalign 1
			textalignx -7
			textaligny 5
			decoration
			visible 1
		}


Code:
player setClientCvar( "ui_kills" , "This is a test" );
Share |
liltc64
General Member
Since: Feb 12, 2007
Posts: 906
Last: Oct 22, 2012
[view latest posts]
Level 7
Im a fan of MODSonair
Category: CoD2 Scripting
Posted: Saturday, Nov. 19, 2011 08:04 pm
maybe because its not suppose to be self.kills its suppose to be self.score??? [duh]
Share |
Restricted Access Restricted Access subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 Scripting

Latest Syndicated News

»
Codutility is for sale!
Seems like a plan to save Codutility ..Quote:Well guys I heard what you said...
Codutility is for sale!
Well as modding dies, so does the sites that support it.. Its a sad sad day,...
Codutility is for sale!
Quote:Codutility is for sale! Yes, you read well. Codutility ( sites/do...
Why console gaming is dying
Quote:Consider this: Dedicated gaming sales — including living-room consoles...
Devs: Games are being dumb...
Click 'read more' to view the contents of this post.

Partners & Friends

»