gabrielcosta Posted August 8, 2021 Posted August 8, 2021 Pessoal, como faço pra quando um player minimizar a tela, aparecer esse text em cima dele: Janela Minimizada E quando ele voltar ao jogo, sumir? Quem puder me ajudar ficarei muito grato.
Moderators Lord Henry Posted August 11, 2021 Moderators Posted August 11, 2021 Use isso: OnClientMinimize 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.
CastiaL Posted August 11, 2021 Posted August 11, 2021 try this script client-side function minimize() for k, player in ipairs(getElementsByType("player")) do if getElementData(player, "minimize") then local screenWidth, screenHeight = guiGetScreenSize() local sx,sy = getScreenFromWorldPosition (getElementPosition(player)) dxDrawText("Janela Minimizada",sx,sy,screenWidth, screenHeight,tocolor ( 255, 255, 0, 0 ), 1.5,"sans") end end end addEventHandler("onClientRender",rootElement, minimize) function handleMinimize() setElementData(localPlayer, "minimize", true) end addEventHandler( "onClientMinimize", root, handleMinimize ) function handleRestore() setElementData(localPlayer, "minimize", false) end addEventHandler("onClientRestore",root,handleRestore) 1 I would be very happy if you send a like to support me
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