Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --AnyPlayer Get
- local function pom(txt)MsgC(Color(255,125,0),'[PO] ',color_white,txt..'\n')end
- concommand.Add('po',function(pl,cmd,args,str)
- local plys,plycnt,nstr = player.GetAll(),{},tonumber(str)
- for k,v in pairs(plys) do
- if type(nstr) == 'number' and nstr == v:UserID() then
- plycnt[1]=v:UserID()
- break
- end
- if string.find(string.lower(v:Name()),string.lower(str)) then
- plycnt[#plycnt+1]=v:UserID()
- end
- end
- if #plycnt == 1 and #plys > 1 then
- pom('Opening '..Player(plycnt[1]):Name())
- Player(plycnt[1]):ShowProfile()
- elseif #plycnt == 0 then
- pom('No players found!')
- elseif #plycnt>1 then
- pom(#plycnt..' players found')
- for k,v in pairs(plycnt) do
- if k == 1 then MsgC(color_white,'[-------------------]\n') end
- MsgC(color_white,k..'['..v..']. '..Player(v):Name()..'\n')
- if k == #plycnt then MsgC(color_white,'[-------------------]\n') end
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement