khalid-mks Posted January 16, 2015 Share Posted January 16, 2015 hello I have a picture in my script. client addEventHandler("onClientResourceStart",root ,function() local x,y = guiGetScreenSize() img = guiCreateStaticImage(x/1.8-110, y/2-117,97,80, "cs.png", false) guiSetVisible(img,false) setTimer (guiSetVisible,10000,1,img,true) setTimer (guiSetVisible,28000,1,img,false) end) Picture comes after a normal period of time passage I do not want her to come normal I want her to slowly come and go slowly To understand more Watch video Note first picture how come It comes slowly And go slowly I want to do like her But how? Please you to help me TNX Link to comment
0 Jusonex Posted January 16, 2015 Share Posted January 16, 2015 guiSetVisible only differntiates between visible and invisible. If you want to set the alpha, you have to use guiSetAlpha instead. Example: function fadeIn(element) local alpha = 0.0 setTimer(function() alpha = alpha + 0.1 guiSetAlpha(element, alpha) end, 75, 10) end local img = guiCreateStaticImage(x/1.8-110, y/2-117,97,80, "cs.png", false) fadeIn(img) Even though I would recommand you to use onClientPreRender rather than a timer to get a smooth animation. This is btw the wrong section. The correct one would be viewforum.php?f=91 Link to comment
Question
khalid-mks
hello
I have a picture in my script.
client
Picture comes after a normal period of time passage
I do not want her to come normal
I want her to slowly come and go slowly
To understand more Watch video
Note first picture how come
It comes slowly
And go slowly
I want to do like her
But how?
Please you to help me
TNX
Link to comment
1 answer to this question
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