iPrestege Posted January 7, 2013 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
TD[M]ER Posted January 7, 2013 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
iPrestege Posted January 7, 2013 Author 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 !
TD[M]ER Posted January 7, 2013 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 =\
MR.S3D Posted January 7, 2013 Posted January 7, 2013 Yeah and the script not working now show me your script
iPrestege Posted January 7, 2013 Author 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 )
TD[M]ER Posted January 7, 2013 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"/>
iPrestege Posted January 7, 2013 Author 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: (
TD[M]ER Posted January 7, 2013 Posted January 7, 2013 i try it may you have problem with something ..
iPrestege Posted January 7, 2013 Author Posted January 7, 2013 it,s not working with me still i need help !
TD[M]ER Posted January 7, 2013 Posted January 7, 2013 http://www.mediafire.com/?bq4d4bqvkah90dq take this :@
iPrestege Posted January 7, 2013 Author 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)
MR.S3D Posted January 7, 2013 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
iPrestege Posted January 7, 2013 Author 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 !
MR.S3D Posted January 7, 2013 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)
iPrestege Posted January 7, 2013 Author 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 .
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