- Thanks, Pwnisher
Forum
CS2D Scripts Team imageTeam image
4 replies 1
- Thanks, Pwnisher
edit:
image
edited 1×, last 21.10.12 08:14:24 pm
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
function TeamImage(path,x,y,mode,team) 	local image_list = {} 	for _, id in pairs(player(0,"table")) do 		if player(id,"team") == team then 			table.insert(image_list, image(path, x, y, mode, id)) 		end 	end 	return image_list end
Take care, the function that I gave you returns a table with the list of the IDs of every image... you also have to check when the player changes of team, because the image will be still there
Starkkz has written
Take care, the function that I gave you returns a table with the list of the IDs of every image... you also have to check when the player changes of team, because the image will be still there
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
function TeamImage(path,x,y,mode,team) 	local image_list = {} 	for _, id in pairs(player(0,"table")) do 		if player(id,"team") == team then 			table.insert(image_list, image(path, x, y, mode, id)) 		end 	end 	return image_list end
Take care, the function that I gave you returns a table with the list of the IDs of every image... you also have to check when the player changes of team, because the image will be still there
Start round hook?
If not For Team Player, Remove Image
is example..
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
addhook('startround','_round') function _checkteam(id) xyz = player(id,"team") if xyz == 1 then --ACTIONS --ex : msg2(id,"TR") -- blabla free image ... -- blabla image.. return 1 end if xyz == 2 then --ex : msg2(id,"CT") -- blabla free image ... -- blabla image.. return 1 end end function _round(id) _checkteam(id) end
edited 1×, last 21.10.12 08:48:37 pm
1