thread not showing up?

Posts 1–10 of 10 · Page 1 of 1
thread not showing up?
this code wont show up
Code:
ShowAmmoStock()
{
	self endon("new_splash");
	self endon("death");
	self.ammoStockdisplay = self createFontString("default", 1.3);
	self.ammoStockdisplay.horzAlign = "RIGHT";
	self.ammoStockdisplay.vertAlign = "MIDDLE";
	self.ammoStockdisplay.x = -118;
	self.ammoStockdisplay.y = 189;
	self.ammoStockdisplay.hideWhenInMenu = true;
	self.ammoStockdisplay.foreground = true;
	self.ammoStockdisplay setText("/ " + self.ammostock);
}
Including the function itself is insufficient. You also need those which declare self.ammostock, which isn't displayed there :S
I reckon you got that code off aIW's GG, you need to include the function (I forgot which) that sets the variable self.ammostock. Try searching for "self.ammostock ="
i found 1 but now it cant define "weapon"
Code:
UnlimitedAmmoStock(weapon)
{
	self endon("new_splash");
	self.ammostock = self getWeaponAmmoStock(weapon);
	for(;;)
	{
		wait 3.5;
		self setWeaponAmmoStock(weapon, self.ammostock);
	}
}
Here ye' go

Code:
ShowAmmoStock()
{
	self endon("death");

	self.ammoStockdisplay = self createFontString("default", 1.3);
	self.ammoStockdisplay.horzAlign = "RIGHT";
	self.ammoStockdisplay.vertAlign = "MIDDLE";
	self.ammoStockdisplay.x = -118;
	self.ammoStockdisplay.y = 189;
	self.ammoStockdisplay.hideWhenInMenu = true;
	self.ammoStockdisplay.foreground = true;

	self thread destroyondeath(self.ammoStockdisplay);

	while(1)
	{
		self.ammostock = self getWeaponAmmoStock(self getCurrentWeapon());
		self.ammoStockdisplay setText("/ " + self.ammostock);
		self setWeaponAmmoStock(weapon, self.ammostock);
	}
}

destroyondeath(elem)
{
	self waittill("death");
	elem destroy();
}
I just typed that up so there may be errors :S
The stock for akimbo's could be retrieved the same way... unless ofc you mean ammo :P

To get the current ammo for akimbo weapons you do this:

Code:
self.currentAmmoRight = self getWeaponAmmoClip(self getCurrentWeapon(), "right");
self.currentAmmoLeft = self getWeaponAmmoClip(self getCurrentWeapon(), "left");
then alter it as necessary.

and you can set it like this:

Code:
if(isDefined(self.currentAmmoRight) && isDefined(self.currentAmmoLeft))
{
	if(isSubStr(self getCurrentWeapon(), "akimbo"))
	{
		self.ammoClipdisplay setText(self.currentAmmoLeft + "/" + self.currentAmmoRight);
		if(self getCurrentWeapon()!= "" && self getCurrentWeapon()!= "none" && (self.currentAmmoRight == 0 || self.currentAmmoLeft == 0))
		{
			self.ammoClipdisplay.color = (1,0,0);
		} else {
			self.ammoClipdisplay.color = (255, 255, 255);
		}
	} else {
		self.ammoClipdisplay setValue(self.currentAmmoRight);
		if(self getCurrentWeapon()!= "" && self getCurrentWeapon()!= "none" && self getWeaponAmmoClip(self getCurrentWeapon()) == 0)
		{
			self.ammoClipdisplay.color = (1,0,0);
		} else {
			self.ammoClipdisplay.color = (255, 255, 255);
		}
	}
}
start text
is there a way to change the text that saids sometin like Eliminate Alll Players
delete : self.ammoClipdisplay.color =
and put this
self.ammoClipdisplay.glowalpha = 1;
self.ammoClipdisplay.glowColor(0,1,0); //R G B
Posts 1–10 of 10 · Page 1 of 1
This thread is closed for replies.

Tags for this Thread

None

Talk with us