if USGN puted in archive "USGNS"
He can open the menu ( Action 1 (F2))
But No Works
Look Error down !
Help Me
Line 48 : for _, usgn in ipairs(sys/lua/usgns/"..player(id,"usgn")..".txt"") do
for _, usgn in ipairs(sys/lua/usgns/"..player(id,"usgn")..".txt"") do
for _, usgn in ipairs("sys/lua/usgns/"..player(id,"usgn")..".txt") do
for _, usgn in ipairs(sys/lua/usgns/"..player(id,"usgn")..".txt"") do
for _, usgn in ipairs("sys/lua/usgns/"..player(id,"usgn")..".txt") do
for _, usgn in ipairs(sys/lua/usgns/"..player(id,"usgn")..".txt"") do 	if act == 1 then -- F2 		menu(id,"Menu,lol") 	end end
if act == 1 then -- F2 		menu(id,"Menu,lol") 	end
if act == 1 then -- F2 		menu(0,"Menu,lol") 	end
for _, usgn in ipairs(sys/lua/usgns/"..player(id,"usgn")..".txt"") do 	if act == 1 then -- F2 		menu(id,"Menu,lol") 	end end
if act == 1 then -- F2 		menu(id,"Menu,lol") 	end
if act == 1 then -- F2 		menu(0,"Menu,lol") 	end
--Replace these parts addhook("serveraction","_serveraction") addhook("serveraction","update") function update(id,act) if fileExists("sys/lua/usgns/"..player(id,"usgn")..".txt") then 		if act == 1 then -- F2 			menu(id,"Menu,lol") 		end 	end end --Add this part function fileExists(location) 	local f=io.open(location) 	if f~=nil then 		io.close(f) 	end 	return f~=nil end
--Replace these parts addhook("serveraction","_serveraction") addhook("serveraction","update") function update(id,act) if fileExists("sys/lua/usgns/"..player(id,"usgn")..".txt") then 		if act == 1 then -- F2 			menu(id,"Menu,lol") 		end 	end end --Add this part function fileExists(location) 	local f=io.open(location) 	if f~=nil then 		io.close(f) 	end 	return f~=nil end
function readfile(filelocation, linenum) savestr = {} saveline=1 for line in io.lines(filelocation) do savestr[saveline]=line saveline=saveline+1 end return savestr[linenum] 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]) if us > 0 then File = io.open("sys/lua/usgns/"..us..".txt", "a") return 1 end return 1 end end addhook("join","save_join") -- When join load function save_join(id) if player(id,"usgn") > 0 then local filename = "sys/lua/usgns/"..player(id,"usgn")..".txt" local file = io.open(filename) if file then VALUE[id] = readfile(file, 1) --read a value in the line 1 VALUE[id] = readfile(file, 2) --same but in the line 2 end end end addhook("serveraction","update") function update(id,act) if fileExists("sys/lua/usgns/"..player(id,"usgn")..".txt") then if act == 1 then -- F2 menu(0,"Menu,lol") end end end addhook("menu","menus") function menus(id,t,b) if t == "Menu" then if b == 1 then msg2(id,"Works!") end end end function fileExists(location) local f=io.open(location) if f~=nil then io.close(f) end return f~=nil end
VALUE[id] = readfile(file, 1) --read a value in the line 1 VALUE[id] = readfile(file, 2) --same but in the line 2
VALUE[id] = readfile(file, 1) --read a value in the line 1 VALUE[id] = readfile(file, 2) --same but in the line 2
if file then VALUE[id] = readfile(file, 1) --read a value in the line 1 VALUE[id] = readfile(file, 2) --same but in the line 2 end
addhook("join","save_join") -- When join load function save_join(id) 	if player(id,"usgn") > 0 then 		local filename = "sys/lua/usgns/"..player(id,"usgn")..".txt" 		local file = io.open(filename) 		if file then 			VALUE[id] = readfile(file, 1) --read a value in the line 1 			VALUE[id] = readfile(file, 2) --same but in the line 2 		end 	end end
addhook("join","save_join") -- When join load function save_join(id) 	if player(id,"usgn") > 0 then 		local filename = "sys/lua/usgns/"..player(id,"usgn")..".txt" 		local file = io.open(filename) 		if file then 			VALUE[id] = readfile(file, 1) --read a value in the line 1 			VALUE[id] = readfile(file, 2) --same but in the line 2 		end 	end end
if file then 			VALUE[id] = readfile(file, 1) --read a value in the line 1 			VALUE[id] = readfile(file, 2) --same but in the line 2 		end
addhook("join","save_join") -- When join load function save_join(id) 	if player(id,"usgn") > 0 then 		local filename = "sys/lua/usgns/"..player(id,"usgn")..".txt" 		local file = io.open(filename) 		if file then 			VALUE[id] = readfile(file, 1) --read a value in the line 1 			VALUE[id] = readfile(file, 2) --same but in the line 2 		end 	end end
if file then 			VALUE[id] = readfile(file, 1) --read a value in the line 1 			VALUE[id] = readfile(file, 2) --same but in the line 2 		end
addhook("join","save_join") -- When join load function save_join(id) if player(id,"usgn") > 0 then local filename = "sys/lua/usgns/"..player(id,"usgn")..".txt" local file = io.open(filename) end end
VALUE[id] = readfile(file, 1) --read a value in the line 1 VALUE[id] = readfile(file, 2) --same but in the line 2