-WiLSoN- has written
how can i center a message ??
i mean how to make a message to be in the center of the screen ?
i mean how to make a message to be in the center of the screen ?
1
msg "Test@C"
Scripts
Lua Scripts/Questions/Helpmsg "Test@C"
function heal(id,hp)
	parse("sethealth "..id.." "..(player(id,"health") + hp)
end
function heal(id,hp)
	parse('sethealth '..id..' '..player(id,"health") + hp)
end
function heal(id,hp)
	parse("sethealth "..id.." "..(player(id,"health") + hp)
end

function spawnobject(type,tilex,tiley,rot,mode,team,pl)
	parse("spawnobject "..type.." "..tilex.." "..tiley.." "..rot.." "..mode.." "..team.." "..pl)
end
BUT if you put Team= 3 then it summons up
"SPECTATOR" type objects(do no harm to you)
Also They appear white.. So it's kinda awesome =D
addhook("build","buildtest")
	function buildtest(i,t,x,y)
	 spawnobject(type,x,y,90,0,team,i)
	end
--[[--
Builds DOUBLE Layers of that same building
pretty awesome..
Basically If you build a wall 3
then another wall 3 is built in it also
so you would have to destroy the first wall 3 then the second =D
Oh and when you use dispenser with this it makes the light surrounding the dispenser giant
and TURRETS, the 1st turret(turret(norm)) covers the second turret(which you upgrade)))(norm turret can't be upgraded))
The first covers second so ppl only see a turret(norm) with the Second Turret's type over it like
example.
1st turret(norm)
2nd turret(Triple Turret)
the 1st covers second
but has second's name
--]]--
initArray(s,v)
	local table = {}
	for i=1,s do
		table[i] = v
	end
	return table
end
table_of_tables = initArray(32,{health = 0, armor = 1})
table_of_tables[2].health = 200
function initArray(size,value)
	local tbl={}
	local istable = false
	if type(value)=="table" then istable = true end
	for i = 1, size do
		if istable then
			tbl[i] = {}
			for d,v in pairs(value) do
				tbl[i][d]=v
			end
		else
			tbl[i] = value
		end
	end
	return tbl
end
function spawnobject(type,tilex,tiley,rot,mode,team,pl)
	parse("spawnobject "..type.." "..tilex.." "..tiley.." "..rot.." "..mode.." "..team.." "..pl)
end
BUT if you put Team= 3 then it summons up
"SPECTATOR" type objects(do no harm to you)
Also They appear white.. So it's kinda awesome =D
[b] Oops Fixed[/b]
addhook("build","buildtest")
	function buildtest(i,t,x,y)
	 spawnobject(t,x,y,90,0,player(i,"team"),i)
	end
Basically this uses the wrapper in first code
so that when you build something
it spawns that object in that spot already
and another of that object gets built there
function spawnobject(type,tilex,tiley,rot,mode,team,pl)
	parse("spawnobject "..type.." "..tilex.." "..tiley.." "..rot.." "..mode.." "..team.." "..pl)
end
addhook("build","buildtest")
	function buildtest(i,t,x,y)
	 spawnobject(t,x,y,90,0,player(i,"team"),i)
	end
addhook("build","sdtturret")
	function sdtturret(i,t,x,y)
		if (t==8) then
---Menu stuff---
menuselect
blah blah
yatayatayata do it yourself yata
-----------------
script_texts = {{1,"txt"}}..........