Though i edited it a bit so it will be kill instead of kick and it worked,but when i tried to merge it with my Admin script then the shit started,the kill menu doesn't even show.Here's my code everything works fine except for the kill menu.
Mehr
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
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
OWNER = {140639} ADMIN = {} MOD = {} GUARD = {} VIP = {} -- Variables kickid = {} kickreason = {} banipp = {} banusgnid = {} banreason = {} bantime = {} killid = {} mute = {} for id = 1, 32 do mute[id] = 0 end function exist(param) if player(param,"exists") then return player(param,"name") else return "(None)" end end function kill(pl) parse("kill "..pl) end --Menus addhook("serveraction","ServerMenu") function ServerMenu(id,key) for none, usgn in ipairs(OWNER) do if player(id,'usgn') == usgn then if key == 1 then menu(id, "Server Menu,Server Settings,Players,Spawn,Attributes") end end end for none, usgn in ipairs(ADMIN) do if player(id,'usgn') == usgn then if key == 1 then menu(id, "Server Menu,Server Settings,Players,Spawn,Attributes") end end end for none, usgn in ipairs(MOD) do if player(id,'usgn') == usgn then if key == 1 then menu(id, "Server Menu,Players,Spawn,Attributes") end end end for none, usgn in ipairs(GUARD) do if player(id,'usgn') == usgn then if key == 1 then menu(id, "Server Menu,Players,Attributes") end end end for none, usgn in ipairs(VIP) do if player(id,'usgn') == usgn then if key == 1 then menu(id, "Server Menu,Players,Attributes") end end end end --Sub-Menus addhook("menu","Menus") function Menus(id,title,b) -- Owner's menu for none, usgn in ipairs(OWNER) do if player(id,'usgn') == usgn then if title == "Server Menu" then if b == 1 then menu(id,"Server Settings,Game Mode,Team-Balance,Change Map,Back") elseif b == 2 then menu(id,"Players Settings,Kill,Kick,Temp-Ban,Ban(USGN),Ban(Name),Change Player name,Back") end end end end end --Kill Menu if title == "Players Settings" then if b == 1 then menu(id,"Kill Page 1,"..exist(1).."|1,"..exist(2).."|2,"..exist(3).."|3,"..exist(4).."|4,"..exist(5).."|5,"..exist(6).."|6,"..exist(7).."|7,"..exist(8).."|8,Next") end elseif title == "Kill Page 1" then if b == 9 then menu(id,"Kill Page 2,"..exist(9).."|9,"..exist(10).."|10,"..exist(11).."|11,"..exist(12).."|12,"..exist(13).."|13,"..exist(14).."|14,"..exist(15).."|15,"..exist(16).."|16,Next") elseif b~=0 then kill(b) end elseif title == "Kill Page 2" then if b == 9 then menu(id,"Kill Page 3,"..exist(17).."|17,"..exist(18).."|18,"..exist(19).."|19,"..exist(20).."|20,"..exist(21).."|21,"..exist(22).."|22,"..exist(23).."|23,"..exist(24).."|24,Next") elseif b~=0 then kill(b+8) end elseif title == "Kill Page 3" then if b == 9 then menu(id,"Kill Page 4,"..exist(25).."|25,"..exist(26).."|26,"..exist(27).."|27,"..exist(28).."|28,"..exist(29).."|29,"..exist(30).."|30,"..exist(31).."|31,"..exist(32).."|32,Back") elseif b~=0 then kill(b+16) end elseif title == "Kill Page 4" then if b~=0 then kill(b+24) end end --ADMIN Say Commands addhook("say","kicksay") function kicksay(id,text) for none, usgn in ipairs(OWNER) do if player(id,'usgn') == usgn then if text:sub(1, 5) == "!kick" then --KICK kickid = text:sub(6, 7) kickreason = text:sub(8) parse("kick "..kickid.." "..kickreason) return 1 elseif text:sub(1, 6) == "!banip" then --BanIp banipp = text:sub(7, 18) bantime = text:sub(19, 22) banreason = text:sub(23) parse("banip "..banipp.." "..bantime.." "..banreason) return 1 elseif text:sub(1, 8) == "!banusgn" then --Ban USGN id banusgnid = text:sub(1, 6) bantime = text:sub(19, 22) banreason = text:sub(23) parse("banusgn "..banusgnid.." "..bantime.." "..banreason) return 1 elseif text:sub(1, 5) == "!kill" then --Kill a player killid = text:sub(6, 7) parse("killplayer "..killid) return 1 end end end end --Muted user addhook("say","muted") function muted(id,text) if mute[id] == 1 then return 1 end end
EDIT:
hmm after some testing and investigating,apparently the kill,kick menu doesn't want to show up if it needs 2 menus(like Server menu > Players > Kill/Kick)
but when it only needs 1 menu(like Server Menu > Kick/Kill) then it works wtf?
2× editiert, zuletzt 06.02.15 12:41:41