Advertisement
Guest User

Untitled

a guest
Sep 25th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.90 KB | None | 0 0
  1. --AnyPlayer Get
  2. local function pom(txt)MsgC(Color(255,125,0),'[PO] ',color_white,txt..'\n')end
  3. concommand.Add('po',function(pl,cmd,args,str)
  4.     local plys,plycnt,nstr = player.GetAll(),{},tonumber(str)
  5.     for k,v in pairs(plys) do
  6.         if type(nstr) == 'number' and nstr == v:UserID() then
  7.             plycnt[1]=v:UserID()
  8.             break
  9.         end
  10.         if string.find(string.lower(v:Name()),string.lower(str)) then
  11.             plycnt[#plycnt+1]=v:UserID()
  12.         end
  13.     end
  14.     if #plycnt == 1 and #plys > 1 then
  15.         pom('Opening '..Player(plycnt[1]):Name())
  16.         Player(plycnt[1]):ShowProfile()
  17.     elseif #plycnt == 0 then
  18.         pom('No players found!')
  19.     elseif #plycnt>1 then
  20.         pom(#plycnt..' players found')
  21.         for k,v in pairs(plycnt) do
  22.             if k == 1 then MsgC(color_white,'[-------------------]\n') end
  23.             MsgC(color_white,k..'['..v..']. '..Player(v):Name()..'\n')
  24.             if k == #plycnt then MsgC(color_white,'[-------------------]\n') end
  25.         end
  26.     end
  27. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement