• Return a player when the name is found.
    6 replies, posted
I saw it a few days ago and now forgot how. Does anyone know how if i sent a function [b]RTM xBEASTx[/b] how i can make it return the player as a entity.
What?
Something like this? [lua] function FindPlayer(info) local pls = player.GetAll() for k, v in pairs(pls) do if string.find(string.lower(v:Name()), string.lower(tostring(info)), 1, true) ~= nil then return v end end return nil end [/lua]
Ill try it now. Thanks anyway. [editline]7th March 2011[/editline] Thank you. It worked perfect.
Oh, sorry for not understanding you.
It's ok, I typed in a hurry to get the code finished. I'm not very good at putting stuff across. Please may I add you on steam, you seem good with Lua and I need quite a bit of help.
[QUOTE=RTM xBEASTx;28480117]It's ok, I typed in a hurry to get the code finished. I'm not very good at putting stuff across. Please may I add you on steam, you seem good with Lua and I need quite a bit of help.[/QUOTE] You can add me RTM I am happy to help
Sorry, you need to Log In to post a reply to this thread.