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
function _loadstats(id)
local usgn = player(id,"usgn")
	if usgn > 0 then
		local file = io.open("sys/lua/saves/"..usgn..".txt")
		if file then
			local unnamedtable = {"mpoints","status","timeh","timem","times","clock","broad","fmsg","colchat","scorereset","pm","map","title","utitle","warn"}
			local i = 0
			for line in io.lines("sys/lua/saves/"..usgn..".txt") do
				if line == 1 then
					hatz[id] = table.concat(line[1],",")
				end
				if i > 0 then
					user[id][unnamedtable[i]] = tonumber(line) or tostring(line) or ""
				end
			i = i + 1
			end
			msg2(id,"\169000255000Welcome back, "..player(id,"name").."")
		else
			msg2(id,"\169255000000Failed to load your save.@C")
		end
	else
		msg2(id,"\169255000000You are not logged in. Please login or register an account at UnrealSoftware.de@C")
	end
end
function _savestats(id)
	local usgn = player(id,"usgn")
	if usgn > 0 then
		local file = io.open("sys/lua/saves/"..usgn..".txt","w")
		local points = user[id].mpoints
		local stat = user[id].status
		local hours = user[id].timeh
		local minutes = user[id].timem
		local seconds = user[id].times
		local time = user[id].clock
		local bc = user[id].broad
		local fake = user[id].fmsg
		local col = user[id].colchat
		local rs = user[id].scorereset
		local private = user[id].pm
		local map = user[id].map
		local title = user[id].title
		local usedtitle = user[id].utitle
		local warning = user[id].warn
		local hatss = table.concat(hatz[id],",")
		file:write(hatss.."\n"..points.."\n"..stat.."\n"..hours.."\n"..minutes.."\n"..seconds.."\n"..time.."\n"..bc.."\n"..fake.."\n"..col.."\n"..rs.."\n"..private.."\n"..map.."\n"..title.."\n"..usedtitle.."\n"..warning)
		print("\169000255000Saved.")
		file:close()
	end