Slothman Posted April 22, 2009 Posted April 22, 2009 this resource is the only reason Im capable of any gui in my scripts, definitly a lifesaver. https://community.multitheftauto.com/index.php?p=resources&s=details&id=141
MahaZ Posted April 22, 2009 Author Posted April 22, 2009 here's a nice example But that is LogIn window i just what windows with informaion not LOGIN
Lordy Posted April 22, 2009 Posted April 22, 2009 No, that's an introduction tutorial for scripting gui.
kalitonchik Posted April 23, 2009 Posted April 23, 2009 serverside root = getRootElement () function PlayerJoin () triggerClientEvent ( source, "displayLogo", source, true ) setTimer ( triggerClientEvent, 2000, 1, source, "displayLogo", source, false ) end addEventHandler ( "onPlayerJoin", root, PlayerJoin ) clientside addEvent("displayLogo", true) function displayLogo(toggle) if (toggle == true) then local screenWidth, screenHeight = guiGetScreenSize() Logo = guiCreateStaticImage(0, 0, screenWidth, screenHeight, 'serverlogo.bmp', false, nil) else destroyElement(Logo) Logo = nil end end addEventHandler("displayLogo", getRootElement(), displayLogo) in xml add your picture directory then (clientside.lua,serverside.lua,yourepicture.format,xml) put in zip
50p Posted April 24, 2009 Posted April 24, 2009 serverside local screenWidth, screenHeight = guiGetScreenSize() Logo = guiCreateStaticImage(0, 0, screenWidth, screenHeight, 'serverlogo.bmp', false, nil) You can replace those 2 lines with 1 Logo = guiCreateStaticImage(0, 0, 1, 1, 'serverlogo.bmp', true ) BTW, I wouldn't recommend using BMP since they are quite heavy and is really old. I'd recommend using PNG or JPG.
DutchCaffeine Posted April 25, 2009 Posted April 25, 2009 serverside.... You can replace those 2 lines with 1 Logo = guiCreateStaticImage(0, 0, 1, 1, 'serverlogo.bmp', true ) BTW, I wouldn't recommend using BMP since they are quite heavy and is really old. I'd recommend using PNG or JPG. huh, since when is jpg also suported. i though that you can use only png.
darkdreamingdan Posted April 25, 2009 Posted April 25, 2009 serverside.... You can replace those 2 lines with 1 Logo = guiCreateStaticImage(0, 0, 1, 1, 'serverlogo.bmp', true ) BTW, I wouldn't recommend using BMP since they are quite heavy and is really old. I'd recommend using PNG or JPG. huh, since when is jpg also suported. i though that you can use only png. You can use jpg,png,bmp and other common image formats. Its just that all the default resources use PNG (and imo its better than jpeg)
DutchCaffeine Posted April 26, 2009 Posted April 26, 2009 Oww, so you can also use a gif image. I should test that one out. But look png are bigger files then, jpeg/jpg. That is better for the client, less download.
50p Posted April 26, 2009 Posted April 26, 2009 Oww, so you can also use a gif image. I should test that one out. But look png are bigger files then, jpeg/jpg. That is better for the client, less download. Yes GIF works too but if it's an animated GIF then it will stop on the first frame. JPGs are lighter but worse quality. I always used PNG for everything, they also support alpha channel so you don't have solid color background but instead it's transparent.
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