here is the lua
1)addhook join
Spoiler
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
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
addhook("join","rp_load") function rp_load(id) 	rp_license[id]=0 	rp_ct[id]=false 	rp_Adminlevel[id]=0 	rp_arrest[id]=false 	player_have_pos[id]=false 	tele_x[id]=1043 	tele_y[id]=44 	rp_money[id]=100 	UsgnIds[id]= 0 	rp_vipmsg[id]=0 	rp_vipaddons[id]=0 	rp_NextAddons[id]=0 	InternalFreeImage(id) 	InternalFreeAddons(id) 	local UsgnID = player(id,"usgn") 	UsgnIds[id] = 0 	if UsgnID > 0 then 		local sameusgn = false 		for ids = 1,32 do 			if ids~=id then 				if UsgnIds[ids]==UsgnID then 					sameusgn=true 					break 				end 			end 		end 		if sameusgn==false then 			rp_msg2(id,"000255000","Login with "..UsgnID) 			rp_Adminlevel[id]= isAdmin(UsgnID) 			if rp_Adminlevel[id]>1 then 				rp_ct[id]=true 				rp_license[id]=3 				rp_msg2(id,"000255000","Welcome Admin!") 			else 				local filename = "sys/lua/rp_citylife/"..UsgnID..".txt" 				local file = io.open(filename) 				if file then 					LoadUserStat(id,file) 					rp_msg2(id,"000255000","Load Successfully!") 					if file ~= nil then 						file:close() 					end 				end 			end 			UsgnIds[id] = UsgnID 		else 			rp_msg2(id,"255000000","Load fail!") 		end 	else 		rp_msg2(id,"255000000","Please register a U.S.G.N. account at http://www.unrealsoftware.de/ and make sure that you are logged in!") 		rp_msg2(id,"255000000","Your money and license not save on Database") 	end end
2) save & load lua
Spoiler
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
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
function SaveUserStat(id,UsgnID) 	file = io.open("sys/lua/rp_citylife/"..UsgnID..'.txt', "w+") or io.tmpfile() 	local text = "" 	text = tostring(rp_money[id]) 	text = text .." "..rp_license[id] 	if rp_arrest[id]==true then 		text = text .." 1" 	else 		text = text .." 0" 	end 		 	for k, v in ipairs(Addons) do 		text = text .." "..v.FLic[id] 	end 	file:write(text) 	file:close() end function LoadUserStat(id,file) 	for line in file:lines() do 		local parses = totable(line) 		local userMoney=tonumber(parses[1]) 		if userMoney ~= nil then 			rp_money[id]= userMoney 		end 		if (tonumber(parses[2])~=nil) then 			rp_license[id]=tonumber(parses[2]) 		end 		if (tonumber(parses[3]) == 1) then 			rp_arrest[id]=true 			rp_license[id]=0 		end 		 		local counter=3 		for k, v in ipairs(Addons) do 			counter=counter+1 			local LicItem = tonumber(parses[counter]) 			if LicItem~=nil then 				v.FLic[id]=LicItem 			else 				v.FLic[id]=0 			end 		end 	end end
how to connect the first lua with second lua?
the save is working , but not with the load
in other thread i know put the
to the
Spoiler
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
addhook("join","rp_load") function rp_load(id) 	rp_license[id]=0 	rp_ct[id]=false 	rp_Adminlevel[id]=0 	rp_arrest[id]=false 	player_have_pos[id]=false 	tele_x[id]=1043 	tele_y[id]=44 	rp_money[id]=100 	UsgnIds[id]= 0 	rp_vipmsg[id]=0 	rp_vipaddons[id]=0 	rp_NextAddons[id]=0 	InternalFreeImage(id) 	InternalFreeAddons(id)
but i dont know put it where
sorry im newbie lua editor
please tell me where i should put them