removing
4 replies



16.05.12 07:03:16 pm
when i say : !r <USGN>
i delete usgn in folder
example :
i delete usgn in folder
example :
Code:
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
addhook('say','multi')
function multi(id,txt)
local userd = tonumber (p[2])
if (txt=="!r") then
os.remove(sys/lua/user/"..userd..".txt")
return 1
end
end
function multi(id,txt)
local userd = tonumber (p[2])
if (txt=="!r") then
os.remove(sys/lua/user/"..userd..".txt")
return 1
end
end
Try this..
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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','multi')
function multi(id,txt)
p = totable(txt)
if string.sub(txt,1,2) == "!r" then
userd = tonumber (p[2])
os.remove(sys/lua/user/"..userd..".txt")
return 1
end
end
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','multi')
function multi(id,txt)
p = totable(txt)
if string.sub(txt,1,2) == "!r" then
userd = tonumber (p[2])
os.remove(sys/lua/user/"..userd..".txt")
return 1
end
end
People help the people

Try this..
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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','multi')
function multi(id,txt)
p = totable(txt)
if string.sub(txt,1,2) == "!r" then
userd = tonumber (p[2])
os.remove(sys/lua/user/"..userd..".txt")
return 1
end
end
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','multi')
function multi(id,txt)
p = totable(txt)
if string.sub(txt,1,2) == "!r" then
userd = tonumber (p[2])
os.remove(sys/lua/user/"..userd..".txt")
return 1
end
end
opss ... ! , have error but i fixed
fine works
thank you man
edited 1×, last 16.05.12 08:21:29 pm
Still might be wrong, but looking at it there is an error that sticks out clearly.
to
Code:
1
os.remove(sys/lua/user/"..userd..".txt")
to
Code:
1
os.remove("sys/lua/user/"..userd..".txt")

Still might be wrong, but looking at it there is an error that sticks out clearly.
to
Code:
1
os.remove(sys/lua/user/"..userd..".txt")
to
Code:
1
os.remove("sys/lua/user/"..userd..".txt")
yes , i fixed its line



