Forum

> > CS2D > Scripts > Kick Script?
Forums overviewCS2D overview Scripts overviewLog in to reply

German Kick Script?

3 replies
To the start Previous 1 Next To the start

old Kick Script?

nSecret-tk
BANNED Off Offline

Quote
Hallo, Ich Werde mein erstes Lua rausbringen, aber ich weiß nicht wie man z.B in F3 (KickModus) beibringt, das man leute kicken kann auf der Menu!

Also:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
adminlist = {xxxxx}

addhook("say","adminsay")
function adminsay(id,txt)
for _, usgn in ipairs(adminlist) do
if player(id,'usgn') == usgn then
	msg("©255255255"..player(id,"name").." (Member): "..txt)
return 1
end
end
end

addhook("serveraction","adminsa")
function adminsa(id,act)
for _, usgn in ipairs(adminlist) do
if player(id,'usgn') == usgn then
if act==1 then
menu(id,"(Member) Menü, KICK! ")
end
return 1
end
end
end


Wer kann hier weitermachen, mit das Kick undso also:

addhook("menu","adminmenu")
function adminmenu(id,title,buton)
if title=="(Member) Menü" then
if buton==1 then
....

old Re: Kick Script?

Apache uwu
User Off Offline

Quote
thread cs2d My menu (for kill player) don't work

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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
function initArray(s,v)
	local t = {}
	for i=1,s do
		t[i] = v
	end
	return t
end
function strtok(s,tok)
	local buff = {}
	tok = tok or " "
	tok = "[^"..tok.."]+"
	for w in string.gmatch(s,tok) do
		table.insert(buff,w)
	end
	return buff
end
function getPlayersByTeam(team)
	local list = player(0,"table")
	local str = initArray(math.floor(#list/8)+1,"")
	players = {}
	local pages = 1
	for i=1, #list do
		if player(list[i],"team") == team then
			str[math.floor(#players/8)+1] = str[math.floor(#players/8)+1]..","..player(list[i],"name").."|"..list[i]
			table.insert(players,list[i])
		end
	end
	return {str,players}
end
addhook("serveraction","svac")
function svac(id,action)
	if action == 1 then
		menu(id,"Kick - Team Menu,Terrorist,Counter-Terrorist")
	end
end
addhook("menu","menu_click")
function menu_click(id,title,button)
	
	if title=="Kick - Team Menu" then
		if button == 1 then
			local a = getPlayersByTeam(1)
			local menustr = "Kick Ts Page 1"..a[1][1]
			if #a[2] > 8 then
				menustr = menustr..",NextPage"
			end
			menu(id,menustr)
		elseif button == 2 then
			
			local a = getPlayersByTeam(2)
			local menustr = "Kick CTs Page 1"..a[1][1]
			if #a[2] > 8 then
				menustr = menustr..",NextPage"
			end
			menu(id,menustr)
		end
		else
		local split = strtok(title)
		local page = tonumber(split[#split])
		local team = 0
		if split[2] == "Ts" then team = 1 elseif split[2] == "CTs" then
			team = 2
		end
		if button < 9 then
			parse("kick "..getPlayersByTeam(team)[2][8*(page-1)+button])
			else
			local a = getPlayersByTeam(team)
			local t_str = ""
			if team==1 then t_str="Ts" elseif team==2 then
				t_str="CTs"
			end
			local menustr = "Kick "..t_str.." Page "..(page+1)..a[1][page+1]
			if #a/8 > page then
				menustr = menustr..",NextPage"
			end
			menu(id,menustr)
		end
	end
end

old Re: Kick Script?

nSecret-tk
BANNED Off Offline

Quote
Endschuldigung, aber ich will das sie vom meiner Letzten zeile ..

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
adminlist = {xxxxx}

addhook("say","adminsay")
function adminsay(id,txt)
for _, usgn in ipairs(adminlist) do
if player(id,'usgn') == usgn then
     msg("©255255255"..player(id,"name").." (Member): "..txt)
return 1
end
end
end

addhook("serveraction","adminsa")
function adminsa(id,act)
for _, usgn in ipairs(adminlist) do
if player(id,'usgn') == usgn then
if act==1 then
menu(id,"(Member) Menü, KICK! ")
end
return 1
end
end
end

addhook("menu","adminmenu")
function adminmenu(id,title,buton)
if title=="(Member) Menü" then
if buton==1 then

Weitermachen. Kopieren sie meine und Fügen sie ihre dazu, und Posten sie es wieder zu mir.

old Re: Kick Script?

Seekay
Reviewer Off Offline

Quote
Stop using Google Translator. Use the english forum if you can't speak german.

[GER]

Hör auf Google Translater zubenutzen. Benutz das englische Forum wenn du kein deutsch kannst.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview