image("gfx/"..math.random(1,2)..".bmp",1,1,1)
Forum




image("gfx/"..math.random(1,2)..".bmp",1,1,1)
function returnRandom(tab)
return tab[math.random(#tab)]
end
Enjoy. Just specify a table of image names/paths and use this function on it.
image("gfx/backgrounds/water4.jpg", 34, 1, 101)
1
2
3
4
5
6
2
3
4
5
6
addhook("startround","bps") function bps 	parse("mp_wpndmg Elite 10000") 	parse("mp_wpndmg_z1 Elite 10000") 	parse("mp_wpndmg_z2 Elite 10000") end
Khaleed has written
can some1 help me with this script =
1
2
3
4
5
6
2
3
4
5
6
addhook("startround","bps") function bps 	parse("mp_wpndmg Elite 10000") 	parse("mp_wpndmg_z1 Elite 10000") 	parse("mp_wpndmg_z2 Elite 10000") end
1
2
3
4
5
6
2
3
4
5
6
addhook("startround","bps") function bps() 	parse("mp_wpndmg Elite 10000") 	parse("mp_wpndmg_z1 Elite 10000") 	parse("mp_wpndmg_z2 Elite 10000") end
Dark Byte has written
why does this not work?
image("gfx/backgrounds/water4.jpg", 34, 1, 101)
image("gfx/backgrounds/water4.jpg", 34, 1, 101)
1
image("gfx/backgrounds/water4.jpg",34,1,1)
You need to transfer a 1x1 image to the client, and use this function:
tbl can consist of :
mode: image mode
width: line width
color: {r, g, b}
alpha: same as imagealpha
blend: same as imageblend
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
function drawLine(x1, y1, x2, y2, tbl) 	if not (x1 and y1 and x2 and y2) then 		return false 	end 	tbl = tbl or {} 	local line = image('gfx/weiwen/1x1.png', 0, 0, tbl.mode or 1) 	local x3, y3, rot = (x1+x2)/2, (y1+y2)/2, math.deg(math.atan2(y1-y2, x1-x2))+90 	imagepos(line, x3, y3, rot) 	imagescale(line, tbl.width or 1, math.sqrt((x1-x2)^2+(y1-y2)^2)) 	if tbl.color then 		imagecolor(line, tbl.color[1] or 0, tbl.color[2] or 0, tbl.color[3] or 0) 	end 	if tbl.alpha then 		imagealpha(line, tbl.alpha) 	end 	if tbl.blend then 		imageblend(line, tbl.blend) 	end 	return line end
i have one problem
[/code]addhook("spawn","niema")
function niema(spawnplayer)
end
if (team>1) then
parse("setmaxhealth "..id.." 250")
parse("equip "..id.." 84")
parse("equip "..id.." 69")
parse("speedmod "..id.." 20")
end
if (team>2) then
parse("equip "..id.." 23")
parse("equip "..id.." 30")
parse("equip "..id.." 1")
parse("equip "..id.." 3")
end[/code]
its error
Who Can Repair Plz!
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2
3
4
5
6
7
8
9
10
11
12
13
14
15
addhook("spawn","niema") function niema(spawnplayer) 	local team = player(spawnplayer,"team") 	if (team==1) then 		parse("setmaxhealth "..id.." 250") 		parse("equip "..id.." 84") 		parse("equip "..id.." 69") 		parse("speedmod "..id.." 20") 	elseif (team==2) then 		parse("equip "..id.." 23") 		parse("equip "..id.." 30") 		parse("equip "..id.." 1") 		parse("equip "..id.." 3") 	end end
Flacko has written
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
addhook("spawn","niema") function niema(spawnplayer) 	local team = player(spawnplayer,"team") 	local id = spawnplayer 	if (team==1) then 		parse("setmaxhealth "..id.." 250") 		parse("equip "..id.." 84") 		parse("equip "..id.." 69") 		parse("speedmod "..id.." 20") 	elseif (team==2) then 		parse("equip "..id.." 23") 		parse("equip "..id.." 30") 		parse("equip "..id.." 1") 		parse("equip "..id.." 3") 	end end
function niema(spawnplayer)
local team = player(spawnplayer,"team")
local id = spawnplayer
if (team==1) then
parse ("equip "..id.." 69")
parse("setweapon "..id.." 69")
parse("strip "..id.." 2")
parse("setmaxhealth "..id.." 250")
parse("equip "..id.." 84") - stealth suit
parse ("equip "..id.." 59")
parse("speedmod "..id.." 20")
elseif (team==2) then
parse("equip "..id.." 23")
parse("equip "..id.." 30")
parse("equip "..id.." 1")
parse("equip "..id.." 3")
parse("speedmod "..id.." 6")
parse("setmaxhealth "..id.." 150")
parse ("equip "..id.." 79")
end
end[/code]
Terrorist in nextround is visible WTF? HELP
edited 2×, last 04.04.10 11:22:29 am
from Flacko's
This doesn't give secondary weapons, though.
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
addhook("spawn","niema") function niema(id) 	local team = player(id,"team") 	if (team==1) then 		parse("setmaxhealth "..id.." 250") 		parse("speedmod "..id.." 20") 		return "84,69" 	elseif (team==2) then 		return "23,30,1,3" 	end end
-----------------------
-- NO COLLECTING --
-----------------------
addhook("walkover","walkover")
function walkover(id,iid,type)
if (type>=1 and type<=88) then
return 0
end
return 1
end
[/code]
it don't work players can take weapons and armors why?
edited 1×, last 04.04.10 11:50:16 am
Please speak properly, I really don't get what you saying
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
----------------------- -- NO COLLECTING -- ----------------------- addhook("walkover","walkover") function walkover(id,iid,type) if (type>=1 and type<=88) then return 0 end return 1 end
it don't work players can take weapons and armors why?
1
2
3
4
5
6
7
2
3
4
5
6
7
----------------------- -- NO COLLECTING -- ----------------------- addhook("walkover","walkover") function walkover(id,iid,type) 	return 0 end
edited 1×, last 04.04.10 12:21:09 pm
Replace x and y with your values..
Example:
1
2
3
4
2
3
4
addhook("spawn","mspawn") function mspawn(id) 	parse("effect \"smoke\" "..(player(id,"x")).." "..(player(id,"y"))) --Create smoke when player spawns end
addhook("spawn","mspawn")
function mspawn(id)
parse("effect \"smoke\" "..(player(id,"x")).." "..(player(id,"y"))) --Create smoke when player spawns
end
can smoke if say !smoke?
?