Thorn
Spriting since 2013
Hello guys, i have a tfs 0.3 and i get an error trying to use the !commands command lol
here is the full script and the error
also i haven't seen how the script works yet, but i would like for it to show only those with access 1 in talkactions.xml
plz help me
here is the full script and the error
also i haven't seen how the script works yet, but i would like for it to show only those with access 1 in talkactions.xml
plz help me
Code:
function onSay(cid, words, param)
local total_string = "The command is:\n"
local file = io.open("data/talkactions/talkactions.xml","r")
str = file:read(-1)
file:close()
stra = string.explode(str," ")
for i=1, #stra do
if stringcontains(stra[i],'access') then
stre = string.explode(stra[i],'"')
for i=1, #stre do
if stre[i] == "words=" then
total_string = total_string ..stre[i+1].." \n"
end
end
end
end
doShowTextDialog(cid,2597, total_string)
end