I am looking for a money counter that works.
The one i have get bugged when you buy something.

I am looking for:

A Money Counter+The command for buy items.




Money:
Code:
Money()
{
self endon("disconnect");

self.credits = 0;
self.killscheck = 0;
self.deathscheck = 0;
self.assistscheck = 0;

	while(1){
		if(self.pers["kills"] != self.killscheck){
		self.addpoints = (self.pers["kills"] - self.killscheck);
		self.credits += self.addpoints * 150;
		self.killscheck = self.pers["kills"];}
		
		if(self.pers["deaths"] != self.deathscheck){
		self.removepoints = (self.pers["deaths"] - self.deathscheck);
		self.credits -= self.removepoints * 50;
		self.deathscheck = self.pers["deaths"];}
		
		if(self.pers["assists"] != self.assistscheck){
		self.assistpoints = (self.pers["assists"] - self.assistscheck);
		self.credits += self.assistpoints * 50;
		self.assistscheck = self.pers["assists"];}
		
		if(self.credits > 5000)
		self.credits = 5000;
		if(self.credits < 0)
		self.credits = 0;
		wait 2;
	}
}
This is from the CSwarfare. By AZUMIKKEL.

Buy Action:
Code:
if(self.credits >= 300){self.credits -= 300; self giveWeapon("ump45_mp", 3, true);
So i wonder, could any make this work better.

Problem is:

When you get like 300$ and you buy the ump45.

And on death i get the money back that I paid for the ump45.

So the moeny you buy things for you you don't lose the money.

Just the counter show that you lose but on death. you lost nothing

Money Counter:
Code:
Money Counter()
{
	self endon ("disconnect");
	
	CSLText4 = self createFontString( "objective", 1.5 );
	CSLText4 setPoint( "TOPLEFT", "TOPLEFT", 4, 140 );
	
	while(1) {
		CSLText4 setText( "^2Cash: ^3   " +self.credits );
		wait 0.1;
	}
}
Thanks for all that read and may have an answer