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

Members Online

»
0 Active | 67 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP Mapping

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, DrBiggzz, supersword, playername
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: _plusscore.gsc - help
test1234
General Member
Since: Jan 22, 2012
Posts: 4
Last: Dec 1, 2012
[view latest posts]
Level 0
Category: CoD2 Scripting
Posted: Sunday, Sep. 16, 2012 08:20 am
Hey everyone.
As you can see this script is from IzNoGoD's CoD4MoD.

Code:
blinkhud()
{
	self endon("disconnect");
	self endon("hudscore_restart");

	//enlarge the score element
	while(self.scoresize<2.0&&isdefined(self.hud_plusscore))
	{
		wait 0.05;
		self.scoresize+=0.35;
		self.hud_plusscore.fontscale = self.scoresize;
	}
	//make score element smaller
	while(self.scoresize>1.8&&isdefined(self.hud_plusscore))
	{
		wait 0.05;
		self.scoresize-=0.2;
		self.hud_plusscore.fontscale = self.scoresize;
	}
	self.scoresize=1.5;
	self.hud_plusscore.fontscale=self.scoresize;
}

fadehud()
{
	self endon("disconnect");
	self endon("hudscore_restart");
	//make alpha bigger
	while(self.scorealpha<=0.9&&isdefined(self.hud_plusscore))
	{
		self.hud_plusscore.alpha=self.scorealpha;
		self.hud_plusscore fadeovertime(0.05);
		self.scorealpha+=0.1;
		self.hud_plusscore.alpha = self.scorealpha;
		wait 0.05;
	}
	wait 1;
	//make score element smaller
	while(self.scorealpha>0.05&&isdefined(self.hud_plusscore))
	{
		self.hud_plusscore.alpha=self.scorealpha;
		self.hud_plusscore fadeovertime(0.05);
		self.scorealpha-=0.1;
		self.hud_plusscore.alpha = self.scorealpha;
		wait 0.05;
	}
}


plusscore(plus)
{
	self notify("hudscore_restart");
	self.scoretoshow+=plus;
	self endon("disconnect");
	self endon("hudscore_restart");
	if(isDefined(self.hud_plusscore))
		self.hud_plusscore destroy();
	self.hud_plusscore = newClientHudElem(self);
	self.hud_plusscore.alignX = "center";
	self.hud_plusscore.alignY = "middle";
	self.hud_plusscore.x = 320; //x-coordinate
	self.hud_plusscore.y = 220;  //y-coordinate
	self.hud_plusscore.fontscale = self.scoresize; //cod4 starts@small score
	self.hud_plusscore.alpha = self.scorealpha;
	if(self.scoretoshow<0)
		self.hud_plusscore.color = (235/255,10/255,10/255);	//red for teamkills
	else
	{
		self.hud_plusscore.color = (1,230/255,125/255);	//cod4 like rgb values
		self.hud_plusscore.label = &"IZNO_PLUS";
	}
	self.hud_plusscore setValue(self.scoretoshow);
	self thread blinkhud();
	self fadehud();
	self.scoresize=0.5;
	self.scorealpha=0.3;
	wait 0.5;
	self.scoretoshow=0;
	if(isDefined(self.hud_plusscore))
		self.hud_plusscore destroy();
}



I've looked everywhere on forum, and more and unfortunately found nothing about "plusscore".
Could someone explain me step by step where you have to make thread plusscore, precacheString etc. Just only the script plusscore(plus).

Thank you very much for help.
Regards
Share |
IzNoGoD
General Member
Since: Nov 29, 2008
Posts: 694
Last: Nov 10, 2012
[view latest posts]
Level 6
Category: CoD2 Scripting
Posted: Sunday, Sep. 16, 2012 08:42 am
This is what i have:

onplayerconnect:
Code:

	self.scoretoshow=0;



onplayerspawn:
Code:

	self.scoretoshow=0;
	self.scoresize=0.5;
	self.scorealpha=0.3;


and ongametypestart:
Code:
	precacheString(&"IZNO_PLUS");


Just noticed how messy the code actually is. Might rewrite it some day if not too lazy.
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 Scripting

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»