Gallagher Posted February 17, 2014 Share Posted February 17, 2014 how to do that when I press bindkey digit or 9 / logo? local screenWidth,screenHeight = guiGetScreenSize() gRoot = getRootElement() gResRoot = getResourceRootElement( getThisResource() ) addEventHandler("onClientResourceStart", gResRoot, function () serverlogo = guiCreateStaticImage ( 0.505, 0.378, 0.1, 0.1, "logo.png", true ) end ) addEventHandler("onClientResourceStart", gResRoot, function () bindKey("9","down","logovisible") end ) function changeVisibility ( ) if guiGetVisible ( serverlogo ) then guiSetVisible ( serverlogo, false ) else guiSetVisible ( serverlogo, true ) end end addCommandHandler("logo", changeVisibility) Link to comment
Gallagher Posted February 17, 2014 Author Share Posted February 17, 2014 fadeCamera(); I can not fit this function in my script Link to comment
MTA Team 0xCiBeR Posted February 17, 2014 MTA Team Share Posted February 17, 2014 You want to fade the entire screen or just fade in your image? In the last case, you have two options: If it's linear, use: onClientRender And calculate every frame the new pos setting a max value. Else: interpolateBetween And if you mean the alpha(transparincy) use: onClientRender guiSetAlpha Or a timer, instead of onClientRender. 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