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
xMKHx Posted July 20, 2018 Share Posted July 20, 2018 i'm using my phone try this 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 findPlayer (player, cmd, target) local target_ = getPlayerFromPartialName ( target ) local targetN = getPlayerName(target_) if cmd == "find" then if target_ then createBlipAttachedTo ( getPlayerFromName(targetN), 52 ) else outputChatBox("Player not found !", player, 255, 0, 0) end end end addCommandHandler("find", findPlayer) Link to comment
Discord Moderators Pirulax Posted July 20, 2018 Discord Moderators Share Posted July 20, 2018 You should use utf8.lower() instead of the built-in one. 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