MRThinker Posted July 8, 2018 Share Posted July 8, 2018 Hi all. Please give me a find player script. Like /find <PlayerName> and showing target Player on map / radar Thanks Link to comment
Tommy. Posted July 8, 2018 Share Posted July 8, 2018 (edited) function getPlayerFromPartialName(name) local name = name and name:gsub("#%x%x%x%x%x%x", ""):lower() or nil if name then for _, player in ipairs(getElementsByType("player")) do local name_ = getPlayerName(player):gsub("#%x%x%x%x%x%x", ""):lower() if name_:find(name, 1, true) then return player end end end end function blipPlayer(command, playerName) if playerName then if getPlayerFromPartialName(playerName) then local player = getPlayerFromPartialName(playerName) local blip = createBlipAttachedTo(player, 41) end end end addCommandHandler("find", blipPlayer) EDIT: Not tested Edited July 8, 2018 by Tommy. Link to comment
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