Forum
CS2D Scripts how to stop 2 usgn login1
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
29
30
31
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
29
30
31
usgns={} function check_usgn(usgn) if usgn==0 then return false end for _,id in pairs(usgns) do if id==usgn then return true end end return false end addhook("join","_join") function _join(id) 	if check_usgn(player(id,"usgn")) then 		timer(2500,"parse","kick "..id.." \"Two players with the same USGN number are not allowed to play!\"") 	else 		table.insert(usgns,player(id,"usgn")) 	end end addhook("leave","_leave") function _leave(id) if player(id,"usgn")>0 then for n,ID in pairs(usgns) do if ID==player(id,"usgn") then table.remove(usgns,n) end end end end
The person has two Internet connections, or just changed his IP.
The person has gave someone else his U.S.G.N.
@ Yates: i know that but i need to stop %10 more i need %100 not %90
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
29
30
31
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
29
30
31
usgns={} function check_usgn(usgn) if usgn==0 then return false end for _,id in pairs(usgns) do if id==usgn then return true end end return false end addhook("join","_join") function _join(id) if check_usgn(player(id,"usgn")) then timer(2500,"parse","kick "..id.." \"Two players with the same USGN number are not allowed to play!\"") end 	 table.insert(usgns,player(id,"usgn")) end addhook("leave","_leave") function _leave(id) if player(id,"usgn")>0 then for n,ID in pairs(usgns) do if ID==player(id,"usgn") then table.remove(usgns,n) 					break end end end end
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
USGN_Table = {} addhook('join', 'JoinHook') function JoinHook(id) 	for n, w in pairs(USGN_Table) do 		if w == player(id, 'usgn') then 			parse('kick '.. id) 		end 	end 	if player(id, 'usgn') > 0 then table.insert(USGN_Table, player(id, 'usgn')) end end addhook('leave', 'LeaveHook') function LeaveHook(id) 	for n, w in pairs(USGN_Table) do 		if w == player(id, 'usgn') then 			table.remove(USGN_Table, n) 		end 	end end
Edit: Damn Bolt is faster... Well, my is more complicated then.
Edit2: AMG Bolt have lots of useless lines in his version.
1× editiert, zuletzt 06.07.12 18:48:57
EngiN33R hat geschrieben
You've got a typo in your code, Infinite Rain.
I can't see any typos in my code...
1
function LeveHook(id)
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
USGN_Table = {} addhook('join', 'JoinHook') function JoinHook(id) for n, w in pairs(USGN_Table) do if w == player(id, 'usgn') then timer(500, 'parse', 'kick '.. id) end end if player(id, 'usgn') > 0 then table.insert(USGN_Table, player(id, 'usgn')) end end addhook('leave', 'LeaveHook') function LeaveHook(id) for n, w in pairs(USGN_Table) do if w == player(id, 'usgn') then table.remove(USGN_Table, n) end end end
Ok, now this is perfect.
(Plus I'm your friend)
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
addhook("join","usgns") function usgns(id) 	for _,i in ipairs(player(0,"table")) do 		if id ~= i and player(i,"usgn") > 0 then 			if player(i,"usgn") == player(id,"usgn") then 				timer(100,"parse","kick "..id) 			end 		end 	end end