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
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
------- Killing Floor Script by Robin Becker (aka. Beckerchen) -------
admin={14584}
vip={}
function Array(size,value)
	local array = {}
	for i = 1, size do
		array[i]=value
	end
	return array
end
language = Array(32,1)
exp = Array(32,0)
lvl = Array(32,1)
class = Array(32,0)
newbie = Array(32,1)
adminenter={'enters the server','betritt den Server'}
savefile1={'Savefile loaded','Speicherstand geladen'}
savefile2={'Your USGN-Nr:','Deine USGN-Nr:'}
savefile3={'Cant load savefile','Speicherstand konnte nicht geladen werden'}
savefile4={'New file will be saved','Neuer Speicherstand wird angelegt'}
savefile5={'Save Data Successfull','Speicherstand erfolgreich abgespeichert'}
savefile6={'Not possible to save file','Speicherstand konnte nicht abgespeichert werden'}
function isAdmin(id)
for _, usgn in ipairs(admin) do
if player(id,'usgn') == usgn then
return true
end
end
return false
end
function comloadfile(id)
	usgn = player(id,"usgn")
		if (usgn > 0) then
			local usgn = player(id, "usgn")
			files = io.open("sys/lua/Beckerchens/"..usgn..".txt","r")
			if(files~=nil) then
				msg2(id,"©255255255Your save file found!@C")
				msg2(id,"©255255255Your U.S.G.N ID: "..usgn.."@C")
				for line in io.lines("sys/lua/KillingFloor/"..usgn..".txt","r") do
				local parses = totable(line)
				if (tonumber(parses[1])>0) then
					language[id] = tonumber(parses[1])
				end
				if (tonumber(parses[2])>0) then
					class[id] = tonumber(parses[2])
				end
				if (tonumber(parses[3])>0) then
					exp[id] = tonumber(parses[3])
				end
				if (tonumber(parses[4])>0) then
					lvl[id] = tonumber(parses[4])
				end
				if (tonumber(parses[5])>0) then
					newbie[id] = tonumber(parses[5])
			break
		end
end
		else
			msg2(id,"©255000000Failed to load save!@C")
			msg2(id,"©255000000Please check your U.S.G.N account settings!@C")
		end
	end
end
function comsavefile(id)
	if (player(id, "usgn") > 0) then
		save_data = language[id].." "..class[id].." "..exp[id].." "..lvl[id].." "..newbie[id]
		file = assert(io.open("sys/lua/KillingFloor/"..player(id,"usgn")..".txt","w"))
		file:write(save_data)
		file:close()
		msg2(id,'©255255255'..savefile5[language[id]]..'!@C')
	else
		msg2(id,"©255000000"..savefile6[language[id]].."!@C")
	end
end
addhook('second','allsecond')
--addhook([[minute]],[[allminute]])"
addhook([[join]],[[alljoin]])
addhook([[leave]],[[allleave]])
--addhook([[team]],[[allteam]])
--addhook([[spawn]],[[allspawn]])
--addhook([[serveraction]],[[allserveraction]])
--addhook([[trigger]],[[alltrigger]])
--addhook([[triggerentity]],[[alltriggerentity]])
--addhook([[buy]],[[allbuy]])
--addhook([[walkover]],[[allwalkover]])
--addhook([[collect]],[[allcollect]])
--addhook([[drop]],[[alldrop]])
--addhook([[select]],[[allselect]])
--addhook([[reload]],[[allreload]])
--addhook([[attack]],[[allattack]])
--addhook([[attack2]],[[allattack2]])
--addhook([[projectile]],[[allprojectile]])
--addhook([[move]],[[allmove]])
--addhook([[movetile]],[[allmovetile]])
--addhook([[hit]],[[allhit]])
--addhook([[kill]],[[allkill]])
--addhook([[die]],[[alldie]])
--addhook([[use]],[[alluse]])
--addhook([[usebutton]],[[allusebutton]])
addhook([[say]],[[allsay]])
--addhook([[sayteam]],[[allsayteam]])
--addhook([[spray]],[[allspray]])
--addhook([[vote]],[[allvote]])
--addhook([[buildattempt]],[[allbuildattempt]])
--addhook([[build]],[[allbuild]])
--addhook([[menu]],[[allmenu]])
--addhook([[objectdamage]],[[allobjectdamage]])
--addhook([[objectkill]],[[allobjectkill]])
function alljoin(id)
	if isAdmin(id) then
		for all = 1,32 do
			if player(all,"exist") then
				msg2(all,"©255255255"..player(id,"name").." "..adminenter[language[all]].."!@C")
			end
		end
	end
	comloadfile(id)
end
function allleave(id,reason)
	comsavefile(id)
end
function allsay(id,txt)
	if txt:sub(1,1)=="!" then
		if txt == "!save" then
			comsavefile(id)
			return 1
		end
		if txt:sub(2,8) == "saveexp" then
			local usgn = player(id, "usgn")
			local fil = "sys/lua/KillingFloor/"..usgn..".txt","r"
			files = io.open(fil)
			if(files~=nil) then
				for line in io.lines(fil) do
					local parses = totable(line)
					msg2(id,"©255255255"..tonumber(parses[3]).."!")
				end
			else
				msg2(id,"©255255255nope!")
			end
			return 1
		end
	end
end
function allsecond()
	for i = 1,32 do
		if player(i,"exist") then
			parse('hudtxt2 '..i..'1 " '..language[i]..' " 5 300')
			parse('hudtxt2 '..i..'2 " '..class[i]..' " 5 310')
			parse('hudtxt2 '..i..'3 " '..exp[i]..' " 5 320')
			parse('hudtxt2 '..i..'4 " '..lvl[i]..' " 5 330')
			parse('hudtxt2 '..i..'5 " '..newbie[i]..' " 5 340')
		end
	end
end
Unfinished Killing Floor Lua
1 
Offline
if any GENUIS in making script plz make 1 ok? plz.....
cookies for anyone