gabrielcosta Posted August 8, 2021 Share 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. Link to comment
Other Languages Moderators Lord Henry Posted August 11, 2021 Other Languages Moderators Share Posted August 11, 2021 Use isso: OnClientMinimize Link to comment
CastiaL Posted August 11, 2021 Share 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 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