iPrestege Posted January 7, 2013 Share Posted January 7, 2013 (edited) hello how can i set the image in the center for all players screen ?? i find centerWindow but i think it,s for guiwindow only ~ Edited January 7, 2013 by Guest Link to comment
TD[M]ER Posted January 7, 2013 Share Posted January 7, 2013 (edited) hello how can i set the image in the center for all players screen ?? i find centerWindow but i think it,s for guiwindow only ~ function centerWindow(center_window) local screenW,screenH=guiGetScreenSize() local windowW,windowH=guiGetSize(center_window,false) local x,y = (screenW-windowW)/2,(screenH-windowH)/2 guiSetPosition(center_window,x,y,false) end IMg = guiCreateStaticImage(30, 28, 355, 251, "img.png", false) -- you image centerWindow( IMg ) Edited January 7, 2013 by Guest Link to comment
iPrestege Posted January 7, 2013 Author Share Posted January 7, 2013 hello how can i set the image in the center for all players screen ?? i find centerWindow but i think it,s for guiwindow only ~ function centerWindow(center_window) local screenW,screenH=guiGetScreenSize() local windowW,windowH=guiGetSize(center_window,false) local x,y = (screenW-windowW)/2,(screenH-windowH)/2 guiSetPosition(center_window,x,y,false) end IMg = guiCreateStaticImage(30, 28, 355, 251, "img.png", false) -- you image centerWindow( IMg ) centerWindow i mean image not window ! Link to comment
TD[M]ER Posted January 7, 2013 Share Posted January 7, 2013 hello how can i set the image in the center for all players screen ?? i find centerWindow but i think it,s for guiwindow only ~ function centerWindow(center_window) local screenW,screenH=guiGetScreenSize() local windowW,windowH=guiGetSize(center_window,false) local x,y = (screenW-windowW)/2,(screenH-windowH)/2 guiSetPosition(center_window,x,y,false) end IMg = guiCreateStaticImage(30, 28, 355, 251, "img.png", false) -- you image centerWindow( IMg ) centerWindow i mean image not window ! did you try it ? this code work with anything =\ Link to comment
MR.S3D Posted January 7, 2013 Share Posted January 7, 2013 as MR.T[D]MER say its work with all Link to comment
iPrestege Posted January 7, 2013 Author Share Posted January 7, 2013 Yeah and the script not working now Link to comment
MR.S3D Posted January 7, 2013 Share Posted January 7, 2013 Yeah and the script not working now show me your script Link to comment
iPrestege Posted January 7, 2013 Author Share Posted January 7, 2013 Yeah and the script not working now show me your script function centerWindow(center_window) local screenW,screenH=guiGetScreenSize() local windowW,windowH=guiGetSize(center_window,false) local x,y = (screenW-windowW)/2,(screenH-windowH)/2 guiSetPosition(center_window,x,y,false) end Image = guiCreateStaticImage( 0, 0, 1920, 1200, "login.jpeg", false ) centerWindow( Image ) Link to comment
TD[M]ER Posted January 7, 2013 Share Posted January 7, 2013 function centerWindow(center_window) local screenW,screenH=guiGetScreenSize() local windowW,windowH=guiGetSize(center_window,false) local x,y = (screenW-windowW)/2,(screenH-windowH)/2 guiSetPosition(center_window,x,y,false) end Image = guiCreateStaticImage( 0, 0, 1920, 1200, "TD[M]ER.png", false ) guiSetVisible ( Image ,true ) centerWindow( Image ) now it's work =D meta.xml "Imge" version="1.0" type="script" name="img"/> Link to comment
iPrestege Posted January 7, 2013 Author Share Posted January 7, 2013 function centerWindow(center_window) local screenW,screenH=guiGetScreenSize() local windowW,windowH=guiGetSize(center_window,false) local x,y = (screenW-windowW)/2,(screenH-windowH)/2 guiSetPosition(center_window,x,y,false) end Image = guiCreateStaticImage( 0, 0, 1920, 1200, "TD[M]ER.png", false ) guiSetVisible ( Image ,true ) centerWindow( Image ) now it's work =D meta.xml "Imge" version="1.0" type="script" name="img"/> does not work: ( Link to comment
TD[M]ER Posted January 7, 2013 Share Posted January 7, 2013 i try it may you have problem with something .. Link to comment
iPrestege Posted January 7, 2013 Author Share Posted January 7, 2013 it,s not working with me still i need help ! Link to comment
TD[M]ER Posted January 7, 2013 Share Posted January 7, 2013 http://www.mediafire.com/?bq4d4bqvkah90dq take this :@ Link to comment
iPrestege Posted January 7, 2013 Author Share Posted January 7, 2013 -- Client Side : |ِ-- Do not remove the green text! -- ><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>< -- Script by: John_Scott -- Skype: dekaman12 -- Release date: 2013.01.06 -- Made in Hungary -- Original langue: Hungaryan -- >>>>> Hard Bytes Team <<<<< -- facebook.com/HardBytesTeam -- IP: 91.82.85.203:22076 -- >>>>> Hard Bytes Team <<<<< -- ><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>< -- Do not remove the green text! wdwLogin_Pannel = {} tabPannel_Main = {} tab_Login = {} tab_Register = {} function open_log_reg_pannel() if not(isElement(wdwLogin_Pannel)) then showChat(false) x,y = guiGetScreenSize() function centerWindow(center_window) local screenW,screenH=guiGetScreenSize() local windowW,windowH=guiGetSize(center_window,false) local x,y = (screenW-windowW)/2,(screenH-windowH)/2 guiSetPosition(center_window,x,y,false) end Image = guiCreateStaticImage( 0, 0, 1920, 1200, "login_bg.jpeg", false ) guiSetEnabled (Image, false) Login_img = guiCreateStaticImage( X, Y + 120, 350, 350, "login_window.png", false ) centerWindow( Login_img ) guiSetEnabled (Login_img, false) Link to comment
MR.S3D Posted January 7, 2013 Share Posted January 7, 2013 (edited) x,y = guiGetScreenSize() function centerWindow(center_window) local screenW,screenH=guiGetScreenSize() local windowW,windowH=guiGetSize(center_window,false) local x,y = (screenW-windowW)/2,(screenH-windowH)/2 guiSetPosition(center_window,x,y,false) end Image = guiCreateStaticImage( 0, 0, 1, 1, "login_bg.jpeg", true ) guiSetEnabled (Image, false) Login_img = guiCreateStaticImage( X, Y + 120, 350, 350, "login_window.png", false ) centerWindow( Login_img ) guiSetEnabled (Login_img, false) Edited January 7, 2013 by Guest Link to comment
iPrestege Posted January 7, 2013 Author Share Posted January 7, 2013 x,y = guiGetScreenSize() function centerWindow(center_window) local screenW,screenH=guiGetScreenSize() local windowW,windowH=guiGetSize(center_window,false) local x,y = (screenW-windowW)/2,(screenH-windowH)/2 guiSetPosition(center_window,x,y,false) end Image = guiCreateStaticImage( 0, 0, 1, 1, "login_bg.jpeg", true ) guiSetEnabled (Image, false) Login_img = guiCreateStaticImage( X, Y + 120, 350, 350, "login_window.png", false ) centerWindow( Login_img ) guiSetEnabled (Login_img, false) still not working ! Link to comment
MR.S3D Posted January 7, 2013 Share Posted January 7, 2013 try with this local screenWidth, screenHeight = guiGetScreenSize() mainWidth,mainHeight = 350, 350 Image = guiCreateStaticImage( 0, 0, 1, 1, "login_bg.jpeg", true ) guiSetEnabled (Image, false) Login_img = guiCreateStaticImage( screenWidth/2-mainWidth/2,screenHeight/2-mainHeight/2,mainWidth,mainHeight, "login_window.png", false ) guiSetEnabled (Login_img, false) Link to comment
iPrestege Posted January 7, 2013 Author Share Posted January 7, 2013 try with this local screenWidth, screenHeight = guiGetScreenSize() mainWidth,mainHeight = 350, 350 Image = guiCreateStaticImage( 0, 0, 1, 1, "login_bg.jpeg", true ) guiSetEnabled (Image, false) Login_img = guiCreateStaticImage( screenWidth/2-mainWidth/2,screenHeight/2-mainHeight/2,mainWidth,mainHeight, "login_window.png", false ) guiSetEnabled (Login_img, false) thanks it works as what i mean . 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