Forum
CS2D Scripts Portal CreatorPortal Creator
29 replies1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
addhook("ms100","_ms") function _ms() 	for _, id in pairs(player(0,"tableliving")) do 		if (not player(id,"bot")) and player(id,"weapontype") == 88 then 			reqcld(id,2) 		end 	end end addhook("select","_sel") function _sel(id,t) 	if t ~= 88 then 		parse('hudtxt2 '..id..' 0 "" 0 0 0') 	end end addhook("clientdata","_cld") function _cld(id,m,x,y) 	if m == 2 then 		local tx, ty = math.floor(x/32), math.floor(y/32) 		local oid = math.max(objectat(tx,ty,22),objectat(tx,ty,23)) 		if oid > 0 then 			parse('hudtxt2 '..id..' 0 "\169255000000Created by '..player(object(oid,"player"),'name')..'" '..x-player(id,"x")+324 ..' '..y-player(id,"y")+244 ..' 0') 		else 			parse('hudtxt2 '..id..' 0 "" 0 0 0') 		end 	end end
edited 4×, last 08.05.18 11:38:39 am
You could even check if the player were a bot or not, but I don't know if requesting data from a bot would even work and the bot would have to have a portal gun equipped and hovering over a portal so the chances are quite slim.
Cure Pikachu has written
@ Yates: Something like this then.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
addhook("ms100","_ms") function _ms() 	for _, id in pairs(player(0,"tableliving")) do 		if (not player(id,"bot")) and player(id,"weapontype") == 88 then 			reqcld(id,2) 		end 	end end addhook("select","_sel") function _sel(id,t) 	if t ~= 88 then 		parse('hudtxt2 0 '..id..' "" 0 0 0') 	end end addhook("clientdata","_cld") function _cld(id,m,x,y) 	if m == 2 then 		local tx, ty = math.floor(x/32), math.floor(y/32) 		local oid = math.max(objectat(tx,ty,22),objectat(tx,ty,23)) 		if oid > 0 then 			parse('hudtxt2 0 '..id..' "\169255000000Created by '..player(object(oid,"player"),'name')..'" '..x-player(id,"x")+324 ..' '..y-player(id,"y")+244 ..' 0') 		else 			parse('hudtxt2 0 '..id..' "" 0 0 0') 		end 	end end
I want to use this script but i want that only who point on portal see the hud and not everyone (like msg2).
edited 3×, last 13.10.16 09:38:15 pm
Rainoth has written
@ francis007:
Step 1: Take my code and put it in a notepad file.
Step 2: Take Baloon's code and put it in that same notepad file
Step 3: Save the notepad file.
Congratulations! You got the full script
Step 1: Take my code and put it in a notepad file.
Step 2: Take Baloon's code and put it in that same notepad file
Step 3: Save the notepad file.
Congratulations! You got the full script
You should insert my code first, before Rainoth's one.
And, don't forget about hud id.
idcomes first and then the internal hudtxt
id.
Just switch them around and it's fixed.