Tr1ton. Posted July 1, 2018 Share Posted July 1, 2018 Como faço para criar um outputChatBox para cada player que aparecer no procurados ? exemplo : Quote Code : function s() local player = getElementsByType ( "player" ) for theKey,thePlayer in ipairs(player) do local level = getPlayerWantedLevel ( thePlayer ) if ( level > 0 ) then outputChatBox ( "#ff0000".. getPlayerName ( thePlayer ) .. " #bebebeEstá Com #ff0000" .. level .. " #bebebeEstrelas De Procurado!",source,255,255,255,true ) end end end addCommandHandler("s",s) Link to comment
Other Languages Moderators Lord Henry Posted July 1, 2018 Other Languages Moderators Share Posted July 1, 2018 Não entendi. Você está querendo fazer o que o código acima já faz? Link to comment
MandaBraza Posted July 1, 2018 Share Posted July 1, 2018 function playersWantedLevel(player, cmd, getTarget) local target = getPlayerFromParticalName(getTarget) if (target) then if (isElement(target)) then local level = getPlayerWantedLevel(player) outputChatBox(getPlayerName(target).. " #ffffffestá com: " ..level.. " estrelas de procurado!", root, 255, 255, 255, true) end else outputChatBox("Não foi encontrando nenhum player com esse nome.", 255, 0, 0) end end addCommandHandler("getlevel", playersWantedLevel) function getPlayerFromParticalName(thePlayerName) local thePlayer = getPlayerFromName(thePlayerName) if thePlayer then return thePlayer end for _,thePlayer in ipairs(getElementsByType("player")) do if string.find(string.gsub(getPlayerName(thePlayer):lower(),"#%x%x%x%x%x%x", ""), thePlayerName:lower(), 1, true) then return thePlayer end end return false end Seria isso? 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