
Forum




happy town script
13 replies




1
2
3
2
3
O#O #P# O#O
O = nichts
# = wall III
P = Person/player
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
addhook ("hit","harghs")
function harghs(id,src,wpn)
if (wpn==WEAPONidHERE) then
--Befehl fürs spawnen von Objekten ;)
end
end
<-- Reaktion auf deine Blödheit simple Dinge zu verstehen

edit:
hier haste dein Script(trololololo):
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
addhook ("startround","SDS")
function SDS()
while (true) do
parse ("effect \"flare\" "..(map("sizex")*32)/2).." "..(map("sizey")*32)/2).." 1000 50000 50 0 0");
end
end
edit² :
Und vergess bloß nicht die Milch


edited 2×, last 11.07.11 08:59:59 pm

Das Opfer (Das getroffen wurde) ist gefangen, weil dort Wall3 stehen.
Ich würds so machen:
1
2
3
4
5
6
7
2
3
4
5
6
7
addhook("kill","Superkalifrakilistigefcialigetisch")
function Superkalifrakilistigefcialigetisch(killer,victim,weapon)
if weapon==WEAPONidHERE then
-- Befehl für das Spawnen Hier xD
-- TIPP: Jetzt kannst du schreiben "player(victim,"...")
end
end
Das geht dann aber nur
"Kannst du Lua?"
Du musst noch eigl. alles einfügen!
Wir haben jetzt lediglich die Anfänge gemacht.

ok danke
*soweit sogut*
Quote
und das nur noch in server und fertig dann mit scout fertig mit wall 3?
*whut?*
Quote
und kannste mir das dann machen mit der waffe und so und muss ich noch was haben dafür?
*ehm...*
Lerne mal deutsch, das ist echt grausam!
Und wie Bowlinghead sagte, weisst du überhaupt was Lua ist?
Achja und was hat das ganze mit "happy town" zutun?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2
3
4
5
6
7
8
9
10
11
12
13
14
15
addhook ("hit","1")
function 1(id,source,weapon,hpdmg,apdmg)
x=player(id,"tilex")
y=player(id,"tiley")
if weapon==34 then
parse ("spawnobject 5 "..(x-1).." "..(y-1))
parse ("spawnobject 5 "..(x).." "..(y-1))
parse ("spawnobject 5 "..(x+1).." "..(y-1))
parse ("spawnobject 5 "..(x-1).." "..(y))
parse ("spawnobject 5 "..(x+1).." "..(y))
parse ("spawnobject 5 "..(x-1).." "..(y+1))
parse ("spawnobject 5 "..(x).." "..(y+1))
parse ("spawnobject 5 "..(x+1).." "..(y+1))
end
end
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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
--[[
9 P228 Functions for Admins
- Bugfree version
Version: 1.1
Original script by Snake_Eater
]]--
new = {}
for i=1, 32 do
new[i]=0
end
players={}
for i=1, 32 do
players[i]=0
end
admins={60372}
dedicated=true
if dedicated then
addhook ("say","say_hook")
else
addhook ("parse","parse_hook")
end
function say_hook(id, cmd)
if isPlayerAdmin(id) then
return updateHudText(id, cmd)
end
end
function parse_hook(cmd)
if (updateHudText(1, cmd)==1) then
return 2
end
end
function updateHudText(id, cmd)
if cmd=="toggle_p228_adm_mode" and new[id]==0 then
new[id] = 1
parse ("sv_sound2 "..id.." weapons/click.wav")
parse ("mp_wpndmg p228 1000000")
parse ('hudtxt2 '..id..' 1 "©000255000P228=normal" 30 10 0')
return 1
elseif cmd=="toggle_p228_adm_mode" and new[id]==1 then
new[id] = 2
parse ("sv_sound2 "..id.." weapons/click.wav")
parse ("mp_wpndmg p228 0")
parse ('hudtxt2 '..id..' 1 "©255000000P228=normal" 20 10 0')
parse ('hudtxt2 '..id..' 2 "©000255000P228=kick" 30 20 0')
return 1
elseif cmd=="toggle_p228_adm_mode" and new[id]==2 then
new[id] = 3
parse ("sv_sound2 "..id.." weapons/click.wav")
parse ("mp_wpndmg p228 0")
parse ('hudtxt2 '..id..' 2 "©255000000P228=kick" 20 20 0')
parse ('hudtxt2 '..id..' 3 "©000255000P228=ban" 30 30 0')
return 1
elseif cmd=="toggle_p228_adm_mode" and new[id]==3 then
new[id] = 4
parse ("sv_sound2 "..id.." weapons/click.wav")
parse ("mp_wpndmg p228 0")
parse ('hudtxt2 '..id..' 3 "©255000000P228=ban" 20 30 0')
parse ('hudtxt2 '..id..' 4 "©000255000P228=catch" 30 40 0')
return 1
elseif cmd=="toggle_p228_adm_mode" and new[id]==4 then
new[id] = 5
parse ("sv_sound2 "..id.." weapons/click.wav")
parse ("mp_wpndmg p228 0")
parse ('hudtxt2 '..id..' 4 "©255000000P228=catch" 20 40 0')
parse ('hudtxt2 '..id..' 5 "©000255000P228=data" 30 50 0')
return 1
elseif cmd=="toggle_p228_adm_mode" and new[id]==5 then
new[id] = 6
parse ("sv_sound2 "..id.." weapons/click.wav")
parse ("mp_wpndmg p228 0")
parse ('hudtxt2 '..id..' 5 "©255000000P228=data" 20 50 0')
parse ('hudtxt2 '..id..' 6 "©000255000P228=freeze" 30 60 0')
return 1
elseif cmd=="toggle_p228_adm_mode" and new[id]==6 then
new[id] = 7
parse ("sv_sound2 "..id.." weapons/click.wav")
parse ("mp_wpndmg p228 0")
parse ('hudtxt2 '..id..' 6 "©255000000P228=freeze" 20 60 0')
parse ('hudtxt2 '..id..' 7 "©000255000P228=come back" 30 70 0')
return 1
elseif cmd=="toggle_p228_adm_mode" and new[id]==7 then
new[id] = 8
parse ("sv_sound2 "..id.." weapons/click.wav")
parse ("mp_wpndmg p228 0")
parse ('hudtxt2 '..id..' 7 "©255000000P228=come back" 20 70 0')
parse ('hudtxt2 '..id..' 8 "©000255000P228=unfreeze" 30 80 0')
return 1
elseif cmd=="toggle_p228_adm_mode" and new[id]==8 then
new[id] = 9
parse ("sv_sound2 "..id.." weapons/click.wav")
parse ("mp_wpndmg p228 0")
parse ('hudtxt2 '..id..' 8 "©255000000P228=unfreeze" 20 80 0')
parse ('hudtxt2 '..id..' 9 "©000255000P228=strip" 30 90 0')
return 1
elseif cmd=="toggle_p228_adm_mode" and new[id]==9 then
new[id] = 1
parse ("sv_sound2 "..id.." weapons/click.wav")
parse ("mp_wpndmg p228 1000000")
parse ('hudtxt2 '..id..' 1 "©000255000P228=normal" 30 10 0')
parse ('hudtxt2 '..id..' 9 "©255000000P228=strip" 20 90 0')
return 1
end
end
addhook ("hit","hit_hook")
function hit_hook(id,source,we)
if (((not dedicated) and source==1) or (dedicated and isPlayerAdmin(source))) then
if we==4 and player(id,"health") > 0 and new[source]==1 then
parse ("killplayer "..id.."")
elseif we==4 and new[source]==2 then
parse ("kick "..id.."")
elseif we==4 and new[source]==3 then
parse ("banip "..player(id,"ip").."")
elseif new[source]==4 and we==4 then
local x=player(id,"tilex")
local y=player(id,"tiley")
if tile(x-1, y-1, "walkable") then parse ("spawnobject 5 "..(x-1).." "..(y-1)) end
if tile(x, y-1, "walkable") then parse ("spawnobject 5 "..(x).." "..(y-1)) end
if tile(x+1, y-1, "walkable") then parse ("spawnobject 5 "..(x+1).." "..(y-1)) end
if tile(x-1, y, "walkable") then parse ("spawnobject 5 "..(x-1).." "..(y)) end
if tile(x+1, y, "walkable") then parse ("spawnobject 5 "..(x+1).." "..(y)) end
if tile(x-1, y+1, "walkable") then parse ("spawnobject 5 "..(x-1).." "..(y+1)) end
if tile(x, y+1, "walkable") then parse ("spawnobject 5 "..(x).." "..(y+1)) end
if tile(x+1, y+1, "walkable") then parse ("spawnobject 5 "..(x+1).." "..(y+1)) end
elseif we==4 and new[source]==5 then
msg2(1,"©255255000Name= "..player(id,"name").." Health= "..player(id,"health"))
msg2(1,"©255255000Id= "..id.." Ip= "..player(id,"ip"))
msg2(1,"©255255000Score= "..player(id,"score").." Deaths= "..player(id,"deaths"))
msg2(1,"©255255000Team= "..player(id,"team"))
elseif we==4 and new[source]==7 then
parse ("setpos "..id.." "..player(source,"x").." "..player(source,"y"))
elseif we==4 and new[source]==6 then
parse ("speedmod "..id.." -100")
players[id]=true
elseif we==4 and new[source]==8 then
parse ("speedmod "..id.." 0")
players[id]=false
elseif we==4 and new[source]==9 then
for z=1,88,1 do
parse ("strip "..id.." "..z.."")
end
end
end
end
addhook ("spawn","lop")
function lop(id)
if (((not dedicated) and id==1) or (dedicated and isPlayerAdmin(id))) then
if new[id]==1 then
parse ('hudtxt2 '..id..' 1 "©000255000P228=normal" 30 10 0')
else
parse ('hudtxt2 '..id..' 1 "©255000000P228=normal" 20 10 0')
end
if new[id]==2 then
parse ('hudtxt2 '..id..' 2 "©000255000P228=kick" 30 20 0')
else
parse ('hudtxt2 '..id..' 2 "©255000000P228=kick" 20 20 0')
end
if new[id]==3 then
parse ('hudtxt2 '..id..' 3 "©000255000P228=ban" 30 30 0')
else
parse ('hudtxt2 '..id..' 3 "©255000000P228=ban" 20 30 0')
end
if new[id]==4 then
parse ('hudtxt2 '..id..' 4 "©000255000P228=catch" 30 40 0')
else
parse ('hudtxt2 '..id..' 4 "©255000000P228=catch" 20 40 0')
end
if new[id]==5 then
parse ('hudtxt2 '..id..' 5 "©000255000P228=data" 30 50 0')
else
parse ('hudtxt2 '..id..' 5 "©255000000P228=data" 20 50 0')
end
if new[id]==6 then
parse ('hudtxt2 '..id..' 6 "©000255000P228=freeze" 30 60 0')
else
parse ('hudtxt2 '..id..' 6 "©255000000P228=freeze" 20 60 0')
end
if new[id]==7 then
parse ('hudtxt2 '..id..' 7 "©000255000P228=come back" 30 70 0')
else
parse ('hudtxt2 '..id..' 7 "©255000000P228=come back" 20 70 0')
end
if new[id]==8 then
parse ('hudtxt2 '..id..' 8 "©000255000P228=unfreeze" 30 80 0')
else
parse ('hudtxt2 '..id..' 8 "©255000000P228=unfreeze" 20 80 0')
end
if new[id]==9 then
parse ('hudtxt2 '..id..' 9 "©000255000P228=strip" 30 90 0')
else
parse ('hudtxt2 '..id..' 9 "©255000000P228=strip" 20 90 0')
end
parse ('hudtxt2 '..id..' 34 "©2552550001." 0 10 0')
parse ('hudtxt2 '..id..' 35 "©2552550002." 0 20 0')
parse ('hudtxt2 '..id..' 36 "©2552550003." 0 30 0')
parse ('hudtxt2 '..id..' 37 "©2552550004." 0 40 0')
parse ('hudtxt2 '..id..' 38 "©2552550005." 0 50 0')
parse ('hudtxt2 '..id..' 39 "©2552550006." 0 60 0')
parse ('hudtxt2 '..id..' 40 "©2552550007." 0 70 0')
parse ('hudtxt2 '..id..' 41 "©2552550008." 0 80 0')
parse ('hudtxt2 '..id..' 42 "©2552550009." 0 90 0')
if (not dedicated) then parse ("bind mouse3 toggle_p228_adm_mode") end
parse ("equip "..id.." 4")
end
end
addhook("join","joinhook")
function joinhook(id)
new[id] = 0
end
-------------------
-- Little helper --
-------------------
function isPlayerAdmin(id)
for _, usgn in ipairs(admins) do
if player(id,"usgn") == usgn then
return true
end
end
return false
end




