Tr1ton. Posted July 1, 2018 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)
Moderators Lord Henry Posted July 1, 2018 Moderators Posted July 1, 2018 Não entendi. Você está querendo fazer o que o código acima já faz? Eu te ajudei ou achou meu comentário útil? Não esqueça de deixar um Thanks! Minhas contribuições para a comunidade: LordHenry - MTA Wiki Profile Inscreva-se no meu canal do YouTube: Lord Henry - Entertainment Discord Oficial do MTA: https://mtasa.com/discord Blacklist e Whitelist de Scripters: Planilha Por favor, não me envie mensagens privadas solicitando suporte. Crie um tópico no fórum em vez disso.
MandaBraza Posted July 1, 2018 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? どうも Nani?
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