Forum

> > CS2D > Scripts > Admin say (Addhock) lua
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Deutsch Admin say (Addhock) lua

7 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Admin say (Addhock) lua

berkebaba35
User Off Offline

Zitieren
Hallo US, ich habe noch für diesen meiner Frage, nochmals ein Thema erstellt, ich hoffe ich kriege schnelle antworten, denn mein Server ist grad fast neu gekommen

> Ich wollte euch fragen, warum dieser Script nicht geht, bzw könnt ihr das Script in ordnung machen, das es funktioniert? ist nicht schwer, aber ich habe es leider nicht geschaft, da ich kein Scripter bin.

Script:

Spoiler >


Diesen Script würde ich von euch sehr gerne funktioniert geschrieben haben.

Dankeschön!

alt Re: Admin say (Addhock) lua

Apache uwu
User Off Offline

Zitieren
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
Admins = {65491}
vip = {xxxxx}
mode = {xxxxx}
adminlist={xxxxx}
images={}

imgNames={"helmet","spikes","phoenix","corner","tryans"}
imgPath={"helmet.bmp","spikes.png","phoenix.png","wing5.bmp"}

addhook("say","modsay")
addhook("spawn","speedlua")

function modsay(id,txt)
	for index,name in pairs(imgNames) do
		if txt=="!"..name then
			if images[id]~=nil then
				freeimage(images[id])
				images[id]=nil
			end
			images[id]=image("gfx/hats/"..imgPath[index],1,1,200+id)
		end
	end
	if txt=="!nohat" then
		if images[id]~=nil then
			freeimage(images[id])
			images[id]=nil
		end
	end
	for _, usgn in pairs(Admins) do
		if player(id,'usgn') == usgn then
			msg("©022172253"..player(id,"name").." (MODERATOR): "..txt)
			return 1
		end -- Endet if-schleife
	end -- Endet for-schleife
	for _, usgn in pairs(vip) do
		if player(id,'usgn') == usgn then
			msg("©193000255"..player(id,"name").." (VIP): "..txt)
			return 1
		end -- Endet if-schleife
	end -- Endet for-schleife
	for _, usgn in pairs(mode) do
		if player(id,'usgn') == usgn then
			msg("©255255255"..player(id,"name").." (ADMIN): "..txt)
			return 1
		end
	end
	for _, usgn in pairs(adminlist) do
		if player(id,'usgn') == usgn then
			msg("©255142043"..player(id,"name").." (SUPER-MOD): "..txt)
			return 1
		end -- Endet if-schleife
	end -- Endet for-schleife
end


function speedlua(id)
	parse("speedmod "..id.." 11")
end

alt Re: Admin say (Addhock) lua

berkebaba35
User Off Offline

Zitieren
Das Funktioniert schon, aber @user Apache uwu: weißt du auch wie der Lua funktioniert?

Spoiler >


Wenn du das auch Funktionierten lässt, werde ich dir 1000 Mal danken!

Dieser Lua geht schon, aber dann wird der "ganz afang" die !spikes, undso gehen nicht, auch für USER gehen die nicht,

alt Re: Admin say (Addhock) lua

Apache uwu
User Off Offline

Zitieren
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
Admins = {65491}
vip = {xxxxx}
mode = {xxxxx}
adminlist={xxxxx}
images={}

imgNames={"helmet","spikes","phoenix","corner","tryans"}
imgPath={"helmet.bmp","spikes.png","phoenix.png","wing5.bmp"}

addhook("say","modsay")
addhook("spawn","speedlua")

function modsay(id,txt)
     for index,name in pairs(imgNames) do
          if txt=="!"..name then
               if images[id]~=nil then
                    freeimage(images[id])
                    images[id]=nil
               end
               images[id]=image("gfx/hats/"..imgPath[index],1,1,200+id)
          end
     end
     if txt=="!nohat" then
          if images[id]~=nil then
               freeimage(images[id])
               images[id]=nil
          end
     end
     for _, usgn in pairs(Admins) do
          if player(id,'usgn') == usgn then
               msg("©022172253"..player(id,"name").." (MODERATOR): "..txt)
               return 1
          end -- Endet if-schleife
     end -- Endet for-schleife
     for _, usgn in pairs(vip) do
          if player(id,'usgn') == usgn then
               msg("©193000255"..player(id,"name").." (VIP): "..txt)
               return 1
          end -- Endet if-schleife
     end -- Endet for-schleife
     for _, usgn in pairs(mode) do
          if player(id,'usgn') == usgn then
               msg("©255255255"..player(id,"name").." (ADMIN): "..txt)
               return 1
          end
     end
     for _, usgn in pairs(adminlist) do
          if player(id,'usgn') == usgn then
               msg("©255142043"..player(id,"name").." (SUPER-MOD): "..txt)
               return 1
          end -- Endet if-schleife
     end -- Endet for-schleife
end


function speedlua(id)
     parse("speedmod "..id.." 11")
end

addhook("serveraction","adminaction")
function adminaction(id,b)
	if b == 1 then
		for _, usgn in ipairs(Admins) do
			if player(id,'usgn') == usgn then
				menu(id,"Moderator Menü,Kill,Kick,Slap,Change Team,Restart Round")
				return 1
			end
		end
	end
end

function k(pl)
	parse("killplayer "..pl)
end
function ki(pl)
	parse("kick "..pl.." '-'")
end
function ak(pl)
	parse("slap "..pl)
end

function exist(a)
	if player(a,"exists") then
		return player(a,"name")
	else
		return "(None)"
	end
end

addhook("menu","adminmenu")
function adminmenu(id,t,b)
	if t=="Moderator Menü" then
		if b==1 then
			menu(id,"Kill Page 1@b,"..exist(1)..","..exist(2)..","..exist(3)..","..exist(4)..","..exist(5)..","..exist(6)..","..exist(7)..","..exist(8)..",Next")
		elseif b==2 then
			menu(id,"Kick Page 1@b,"..exist(1)..","..exist(2)..","..exist(3)..","..exist(4)..","..exist(5)..","..exist(6)..","..exist(7)..","..exist(8)..",Next")
		elseif b==3 then
			menu(id,"Slap Page 1@b,"..exist(1)..","..exist(2)..","..exist(3)..","..exist(4)..","..exist(5)..","..exist(6)..","..exist(7)..","..exist(8)..",Next")
		elseif b==4 then
			menu(id,"Change Team,Spectator,Terrorist,Counter-Terrorist")
		elseif b==5 then
			parse("restart")
		end
	elseif t=="Kill Page 1" then
		if b==9 then
			menu(id,"Kill Page 2@b,"..exist(9)..","..exist(10)..","..exist(11)..","..exist(12)..","..exist(13)..","..exist(14)..","..exist(15)..","..exist(16)..",Next")
		elseif b~=0 then
			k(b)
		end
	elseif t=="Kill Page 2" then
		if b==9 then
			menu(id,"Kill Page 3@b,"..exist(17)..","..exist(18)..","..exist(19)..","..exist(20)..","..exist(21)..","..exist(22)..","..exist(23)..","..exist(24)..",Next")
		elseif b~=0 then
			k(b+8)
		end
	elseif t=="Kill Page 3" then
		if b==9 then
			menu(id,"Kill Page 4@b,"..exist(25)..","..exist(26)..","..exist(27)..","..exist(28)..","..exist(29)..","..exist(30)..","..exist(31)..","..exist(32))
		elseif b~=0 then
			k(b+16)
		end
	elseif t=="Kill Page 4" then
		if b~=0 then
			k(b+24)
		end
	elseif t=="Kick Page 1" then
		if b==9 then
			menu(id,"Kick Page 2@b,"..exist(9)..","..exist(10)..","..exist(11)..","..exist(12)..","..exist(13)..","..exist(14)..","..exist(15)..","..exist(16)..",Next")
		elseif b~=0 then
			ki(b)
		end
	elseif t=="Kick Page 2" then
		if b==9 then
			menu(id,"Kick Page 3@b,"..exist(17)..","..exist(18)..","..exist(19)..","..exist(20)..","..exist(21)..","..exist(22)..","..exist(23)..","..exist(24)..",Next")
		elseif b~=0 then
			ki(b+8)
		end
	elseif t=="Kick Page 3" then
		if b==9 then
			menu(id,"Kick Page 4@b,"..exist(25)..","..exist(26)..","..exist(27)..","..exist(28)..","..exist(29)..","..exist(30)..","..exist(31)..","..exist(32))
		elseif b~=0 then
			ki(b+16)
		end
	elseif t=="Kick Page 4" then
		if b~=0 then
			ki(b+24)
		end
	elseif t=="Slap Page 1" then
		if b==9 then
			menu(id,"Slap Page 2@b,"..exist(9)..","..exist(10)..","..exist(11)..","..exist(12)..","..exist(13)..","..exist(14)..","..exist(15)..","..exist(16)..",Next")
		elseif b~=0 then
			ak(b)
		end
	elseif t=="Slap Page 2" then
		if b==9 then
			menu(id,"Slap Page 3@b,"..exist(17)..","..exist(18)..","..exist(19)..","..exist(20)..","..exist(21)..","..exist(22)..","..exist(23)..","..exist(24)..",Next")
		elseif b~=0 then
			ak(b+8)
		end
	elseif t=="Slap Page 3" then
		if b==9 then
			menu(id,"Slap Page 4@b,"..exist(25)..","..exist(26)..","..exist(27)..","..exist(28)..","..exist(29)..","..exist(30)..","..exist(31)..","..exist(32))
		elseif b~=0 then
			ak(b+16)
		end
	elseif t=="Slap Page 4" then
		if b~=0 then
			ak(b+24)
		end
	elseif t=="Change Team" then
		if b==1 then
			parse("makespec "..id)
		elseif b==2 then
			parse("maket "..id)
		elseif b==3 then
			parse("makect "..id)
		end
	end
end

alt Re: Admin say (Addhock) lua

berkebaba35
User Off Offline

Zitieren
user Apache uwu hat geschrieben
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
Admins = {65491}
vip = {xxxxx}
mode = {xxxxx}
adminlist={xxxxx}
images={}

imgNames={"helmet","spikes","phoenix","corner","tryans"}
imgPath={"helmet.bmp","spikes.png","phoenix.png","wing5.bmp"}

addhook("say","modsay")
addhook("spawn","speedlua")

function modsay(id,txt)
     for index,name in pairs(imgNames) do
          if txt=="!"..name then
               if images[id]~=nil then
                    freeimage(images[id])
                    images[id]=nil
               end
               images[id]=image("gfx/hats/"..imgPath[index],1,1,200+id)
          end
     end
     if txt=="!nohat" then
          if images[id]~=nil then
               freeimage(images[id])
               images[id]=nil
          end
     end
     for _, usgn in pairs(Admins) do
          if player(id,'usgn') == usgn then
               msg("©022172253"..player(id,"name").." (MODERATOR): "..txt)
               return 1
          end -- Endet if-schleife
     end -- Endet for-schleife
     for _, usgn in pairs(vip) do
          if player(id,'usgn') == usgn then
               msg("©193000255"..player(id,"name").." (VIP): "..txt)
               return 1
          end -- Endet if-schleife
     end -- Endet for-schleife
     for _, usgn in pairs(mode) do
          if player(id,'usgn') == usgn then
               msg("©255255255"..player(id,"name").." (ADMIN): "..txt)
               return 1
          end
     end
     for _, usgn in pairs(adminlist) do
          if player(id,'usgn') == usgn then
               msg("©255142043"..player(id,"name").." (SUPER-MOD): "..txt)
               return 1
          end -- Endet if-schleife
     end -- Endet for-schleife
end


function speedlua(id)
     parse("speedmod "..id.." 11")
end

addhook("serveraction","adminaction")
function adminaction(id,b)
	if b == 1 then
		for _, usgn in ipairs(Admins) do
			if player(id,'usgn') == usgn then
				menu(id,"Moderator Menü,Kill,Kick,Slap,Change Team,Restart Round")
				return 1
			end
		end
	end
end

function k(pl)
	parse("killplayer "..pl)
end
function ki(pl)
	parse("kick "..pl.." '-'")
end
function ak(pl)
	parse("slap "..pl)
end

function exist(a)
	if player(a,"exists") then
		return player(a,"name")
	else
		return "(None)"
	end
end

addhook("menu","adminmenu")
function adminmenu(id,t,b)
	if t=="Moderator Menü" then
		if b==1 then
			menu(id,"Kill Page 1@b,"..exist(1)..","..exist(2)..","..exist(3)..","..exist(4)..","..exist(5)..","..exist(6)..","..exist(7)..","..exist(8)..",Next")
		elseif b==2 then
			menu(id,"Kick Page 1@b,"..exist(1)..","..exist(2)..","..exist(3)..","..exist(4)..","..exist(5)..","..exist(6)..","..exist(7)..","..exist(8)..",Next")
		elseif b==3 then
			menu(id,"Slap Page 1@b,"..exist(1)..","..exist(2)..","..exist(3)..","..exist(4)..","..exist(5)..","..exist(6)..","..exist(7)..","..exist(8)..",Next")
		elseif b==4 then
			menu(id,"Change Team,Spectator,Terrorist,Counter-Terrorist")
		elseif b==5 then
			parse("restart")
		end
	elseif t=="Kill Page 1" then
		if b==9 then
			menu(id,"Kill Page 2@b,"..exist(9)..","..exist(10)..","..exist(11)..","..exist(12)..","..exist(13)..","..exist(14)..","..exist(15)..","..exist(16)..",Next")
		elseif b~=0 then
			k(b)
		end
	elseif t=="Kill Page 2" then
		if b==9 then
			menu(id,"Kill Page 3@b,"..exist(17)..","..exist(18)..","..exist(19)..","..exist(20)..","..exist(21)..","..exist(22)..","..exist(23)..","..exist(24)..",Next")
		elseif b~=0 then
			k(b+8)
		end
	elseif t=="Kill Page 3" then
		if b==9 then
			menu(id,"Kill Page 4@b,"..exist(25)..","..exist(26)..","..exist(27)..","..exist(28)..","..exist(29)..","..exist(30)..","..exist(31)..","..exist(32))
		elseif b~=0 then
			k(b+16)
		end
	elseif t=="Kill Page 4" then
		if b~=0 then
			k(b+24)
		end
	elseif t=="Kick Page 1" then
		if b==9 then
			menu(id,"Kick Page 2@b,"..exist(9)..","..exist(10)..","..exist(11)..","..exist(12)..","..exist(13)..","..exist(14)..","..exist(15)..","..exist(16)..",Next")
		elseif b~=0 then
			ki(b)
		end
	elseif t=="Kick Page 2" then
		if b==9 then
			menu(id,"Kick Page 3@b,"..exist(17)..","..exist(18)..","..exist(19)..","..exist(20)..","..exist(21)..","..exist(22)..","..exist(23)..","..exist(24)..",Next")
		elseif b~=0 then
			ki(b+8)
		end
	elseif t=="Kick Page 3" then
		if b==9 then
			menu(id,"Kick Page 4@b,"..exist(25)..","..exist(26)..","..exist(27)..","..exist(28)..","..exist(29)..","..exist(30)..","..exist(31)..","..exist(32))
		elseif b~=0 then
			ki(b+16)
		end
	elseif t=="Kick Page 4" then
		if b~=0 then
			ki(b+24)
		end
	elseif t=="Slap Page 1" then
		if b==9 then
			menu(id,"Slap Page 2@b,"..exist(9)..","..exist(10)..","..exist(11)..","..exist(12)..","..exist(13)..","..exist(14)..","..exist(15)..","..exist(16)..",Next")
		elseif b~=0 then
			ak(b)
		end
	elseif t=="Slap Page 2" then
		if b==9 then
			menu(id,"Slap Page 3@b,"..exist(17)..","..exist(18)..","..exist(19)..","..exist(20)..","..exist(21)..","..exist(22)..","..exist(23)..","..exist(24)..",Next")
		elseif b~=0 then
			ak(b+8)
		end
	elseif t=="Slap Page 3" then
		if b==9 then
			menu(id,"Slap Page 4@b,"..exist(25)..","..exist(26)..","..exist(27)..","..exist(28)..","..exist(29)..","..exist(30)..","..exist(31)..","..exist(32))
		elseif b~=0 then
			ak(b+16)
		end
	elseif t=="Slap Page 4" then
		if b~=0 then
			ak(b+24)
		end
	elseif t=="Change Team" then
		if b==1 then
			parse("makespec "..id)
		elseif b==2 then
			parse("maket "..id)
		elseif b==3 then
			parse("makect "..id)
		end
	end
end


Herzlichen Dank!
Danke das du für mich Zeit genommen hast,

EINEN 1000 DANK!
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht