Forum
CS2D General Need a good scripterNeed a good scripter
7 Antworten 1
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
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
addhookfunction 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 function load(id) usgn = player(id,"usgn") if (usgn > 0) then local usgn = player(id,"usgn") files = io.open("sys/lua/scelldata/"..usgn..".txt","r") if(files~=nil) then msg2(id,"©000255000Your save file found!@C") msg2(id,"©160160255Your U.S.G.N ID: "..usgn.."@C") parse('hudtxt2 '..id..' 7 "©000255000Login as: '..usgn..'" 40 415') for line in io.lines("sys/lua/scelldata/"..usgn..".txt","r") do local parses = totable(line) if (tonumber(parses[1])>0) then yourmon[id] = tonumber(parses[1]) license[id] = tonumber(parses[2]) 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 addhook("leave","save") function save(id) if (player(id,"usgn") > 0) then save_data = license[id].." "..yourmon[id] file = assert(io.open("sys/lua/scelldata/"..usgn..".txt","w")) file:write(save_data) file:close() msg2(id,'©000255001Save Data Successfull!@C') else msg2(id,"©255000000Failed to Save!@C") end
im going to need a scripter to fix this script for me please
What the hell is addhookfunction?
closed
1