Guest User

Untitled

a guest
Apr 21st, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.49 KB | None | 0 0
  1. if( CLIENT ) then
  2.  
  3.     function DoFind( target )
  4.  
  5.         local match
  6.  
  7.         target = string.lower( target )
  8.  
  9.         for k, v in ipairs( player.GetAll() ) do
  10.  
  11.             if( string.find( string.lower( v:Nick() ), target ) ||
  12.                 string.find( string.lower( v:Name() ), target ||
  13.                 string.find( string.lower( v:SteamID() ), target ) ) ) then
  14.  
  15.                 if( match ) then
  16.  
  17.                     print( "Multiple targets found." )
  18.                     return false
  19.  
  20.                 end
  21.  
  22.                 match = v
  23.  
  24.             end
  25.  
  26.         end
  27.  
  28.         return print( match )
  29.  
  30.     end
  31.  
  32. end
Add Comment
Please, Sign In to add comment