Turbesz Posted November 18, 2020 Posted November 18, 2020 I tried this method, but does not work: local tabla = {"Valami", "ASdasd", "Teszt", "Proba"} function teszt() local talalat = table.find(tabla,"Va") outputChatBox(talalat) end addCommandHandler("test",teszt) function table.find(tabl,word) if type(tabl) ~= "table" or word == nil then return false else local ret = false for k,v in pairs(tabl) do if v == word then return k end end end end What if the only way not to feel bad, is to stop feeling, anything at all, forever? - Hannah Baker I cost a girl her life because I was afraid to love her... - Clay Jensen ~ 13 Reasons Why
Moderators Patrick Posted November 18, 2020 Moderators Posted November 18, 2020 It works, but "Va" is not in the list. community profile | map converters | map images | pDownloader | pAttach | model encrypter
Tekken Posted November 18, 2020 Posted November 18, 2020 Try this function table.find(tabl,word) if type(tabl) ~= "table" or word == nil then return false else local ret = false for k,v in pairs(tabl) do if string.find(v, word) then return k end end end end Resources I made: attachToBones - A newer bone_attach. Simple Level system - Just a simple level system. Do not PM me for help with leaked scripts! I WILL NOT HELP YOU!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now