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
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 string.split(text,b) local cmd = {} if b then b = b else b = "%s" end b = "[^"..b.."]+" for o in string.gmatch(text,b) do table.insert(cmd,o) end return cmd end function totable(t,match) local cmd = {} if not match then match = "[^%s]+" end for word in string.gmatch(t, match) do table.insert(cmd, word) end return cmd end addhook("say","a") function a(id,txt) local p = totable(txt) local cmd = (p[1]) if cmd == "@give" then local us = tonumber(p[2]) File = io.open("sys/lua/data.txt", "a") File:write("\nuser = {"..us.."}") File:close() end end addhook("join","save_join") -- When join load function save_join(id) 	if (player(id,"usgn")>0) then 		local filename = "sys/lua/user/%s.txt" 		local file = io.open(filename:format(player(id,"usgn"), "r")) 		local line 		if not file then 			line = {0, 1} 			msg2(id,"©255000000Failed to save!@C") 		else 			line = file:read("*a"):split() 		end 	end end
example
@give + <USGN>
@give 1
when player join , with usgn <1>
load a data user
help me ?