![](img/smiles/thoughtfully2.gif)
this leads to X-Treme lag,because the lines are parse 50times the second!
function arr([b]s[/b],[b]v[/b]) [b]t[/b] = {} for i=1, [b]s[/b] do [b]t[/b][i] = [b]v[/b] end return [b]t[/b] end
function initArray([b]m[/b]) 	local array = {} 	for i = 1, [b]m[/b] do 		array[i]=0 	end 	return array end
function arr([b]s[/b],[b]v[/b]) [b]t[/b] = {} for i=1, [b]s[/b] do [b]t[/b][i] = [b]v[/b] end return [b]t[/b] end
function initArray([b]m[/b]) --define a function that --creates a table with m entries 	local array = {} -- create an empty table 	for i = 1, [b]m[/b] do -- fill m entries with 0 		array[i]=0 	end 	return array -- return the table end
-------------------------------------------------- -- Glowing Players Script by Unreal Software -- -- 08.11.2009 - www.UnrealSoftware.de -- -------------------------------------------------- if sample==nil then sample={} end sample.glowing={} -- I won't be using the samples table if I were you... -------------------------------------- -- GLOW -- -------------------------------------- -- Glow Function function sample.glowing.makeallglow() 	if (team==1) then 		for i=1,32,1 do 			id=image("gfx/sprites/flare2.bmp",0,0,100+i)	-- Create image @ Player 			imagecolor(id,255,255,0)				-- Make image yellow 			imageblend(id,1)						-- Make image glow 			imagealpha(id,0.5)					-- Decrease Glow Strength 		end 	end end -- Make Glow instantly after starting server sample.glowing.makeallglow() -- Make Glow after roundstart (because images are deleted on roundstart!) addhook("startround","sample.glowing.startround") function sample.glowing.startround() 	sample.glowing.makeallglow() end
function arr(s,v) t = {} for i=1, s do t[i] = v end return t end
-------------------------------------------------- -- Glowing Players Script by Unreal Software -- -- 08.11.2009 - www.UnrealSoftware.de -- -------------------------------------------------- if sample==nil then sample={} end sample.glowing={} -- I won't be using the samples table if I were you... -------------------------------------- -- GLOW -- -------------------------------------- -- Glow Function function sample.glowing.makeallglow() 	if (team==1) then 		for i=1,32,1 do 			id=image("gfx/sprites/flare2.bmp",0,0,100+i)	-- Create image @ Player 			imagecolor(id,255,255,0)				-- Make image yellow 			imageblend(id,1)						-- Make image glow 			imagealpha(id,0.5)					-- Decrease Glow Strength 		end 	end end -- Make Glow instantly after starting server sample.glowing.makeallglow() -- Make Glow after roundstart (because images are deleted on roundstart!) addhook("startround","sample.glowing.startround") function sample.glowing.startround() 	sample.glowing.makeallglow() end
math.randomseed(os.time()) addhook("movetile","zmfs") function zmfs(id) local fs = math.random(1,4) 	if player(id,"team") == 1 then 		if fs == 1 then 			img = image("gfx/...bmp",1.1,0) 			imagecolor(img,200,0,0) 			imageblend(img,3) 		end 		if fs == 2 then 			img = image("gfx/...bmp",1.1,0) 			imagecolor(img,200,0,0) 			imageblend(img,3) 		end	 		if fs == 3 then 			img = image("gfx/...bmp",1.1,0) 			imagecolor(img,200,0,0) 			imageblend(img,3) 		end 		if fs == 4 then 			img = image("gfx/...bmp",1.1,0) 			imagecolor(img,200,0,0) 			imageblend(img,3) 		end end
-------------------------------------------------- -- Glowing Players Script by Unreal Software -- -- 08.11.2009 - www.UnrealSoftware.de -- -------------------------------------------------- if sample==nil then sample={} end sample.glowing={} -- I won't be using the samples table if I were you... -------------------------------------- -- GLOW -- -------------------------------------- -- Glow Function function sample.glowing.makeallglow() 	if (team==1) then 		for i=1,32,1 do 			id=image("gfx/sprites/flare2.bmp",0,0,100+i)	-- Create image @ Player 			imagecolor(id,255,255,0)				-- Make image yellow 			imageblend(id,1)						-- Make image glow 			imagealpha(id,0.5)					-- Decrease Glow Strength 		end 	end end -- Make Glow instantly after starting server sample.glowing.makeallglow() -- Make Glow after roundstart (because images are deleted on roundstart!) addhook("startround","sample.glowing.startround") function sample.glowing.startround() 	sample.glowing.makeallglow() end
math.randomseed(os.time()) addhook("movetile","zmfs") function zmfs(id) local fs = math.random(1,4) 	if player(id,"team") == 1 then 		if fs == 1 then 			img = image("gfx/...bmp",1.1,0) 			imagecolor(img,200,0,0) 			imageblend(img,3) 		end 		if fs == 2 then 			img = image("gfx/...bmp",1.1,0) 			imagecolor(img,200,0,0) 			imageblend(img,3) 		end	 		if fs == 3 then 			img = image("gfx/...bmp",1.1,0) 			imagecolor(img,200,0,0) 			imageblend(img,3) 		end 		if fs == 4 then 			img = image("gfx/...bmp",1.1,0) 			imagecolor(img,200,0,0) 			imageblend(img,3) 		end end
items = { {title ="Medikit",price = 500,cmd = "equip",param=64}, {title ="Bandage",price = 100,cmd = "equip",param=65}, {title = "Vodka",price=100,cmd = "shake",param=20000}, {title = "PrimaryAmmo",price=300,cmd = "equip",param=61}, {title = "SecondaryAmmo",price=300,cmd = "equip",param=62}, {title = "Snowball",price=3000,cmd = "equip",param=75}, {title = "Armor100",price=1000,cmd = "setarmor",param=100}, {title = "Armor200",price=3000,cmd = "setarmor",param=200}, {title = "Speed x5",price=1000,cmd = "speedmod",param=25}, {title = "Speed x10",price=3000,cmd = "speedmod",param=50}, {title = "MAC10",price=16000,cmd = "equip",param=23} } function createMenu(header, matrix) local menuString = header; menuString = menuString..", " for key, value in ipairs(matrix) do menuString = menuString..value.title.." | $"..tostring(value.price).. "," end return menuString end addhook("serveraction","my_serveraction") function my_serveraction(id,action) if(action == 1) then menu(id,createMenu("Items",items)) end end addhook("menu","my_menu") function my_menu(id,title,button) if(button == 0) then return end if(title == "Items") then if(player(id,"money") > items[button].price) then parse("setmoney "..id.." "..(player(id,"money") - items[button].price)) cmd = string.format("%s %i %i",items[button].cmd,id,items[button].param) parse(cmd) else msg2(id,"©255000000 You have insufficient funds!") end end end