Jump to content

[HELP] Static image window doesn't appear


..:D&G:..

Recommended Posts

So, I created this phone system, with a static image as the main window. When I open the phone, only the buttons (static images) appear, but bigger and on all of the screen, but the main window doesn't...

wPhoneMenu = guiCreateStaticImage(sx/2 - 125,sy/2 - 175,250,450,"phone.png",false) 

Link to comment

This is the code that I made:

function showPhoneGui(itemValue) 
    wPhoneMenu = guiCreateStaticImage(sx/2 - 125,sy/2 - 175,250,450,"phone.png",false) 
    cCall = guiCreateStaticImage(0.12,0.23,0.18,0.13,"butoane/Suna.png",true, wPhoneMenu) 
    bNumbers = guiCreateStaticImage(0.42,0.23,0.18,0.13,"butoane/Agenda.png",true, wPhoneMenu) 
    bRingtones = guiCreateStaticImage(0.71,0.23,0.18,0.13,"butoane/Sonerii.png",true, wPhoneMenu) 
    cNotite = guiCreateStaticImage(0.12, 0.38, 0.18, 0.13, "butoane/Notite.png",true, wPhoneMenu) 
    cCopyright = guiCreateLabel(549, 618, 181, 15, "Copyright © România World Gaming - D&G", false) 
    guiSetFont(cCopyright, "default-small") 
    guiLabelSetVerticalAlign(cCopyright, "top") 
    bCancel = guiCreateButton(0.3880,0.8667,0.2200,0.0933,"Ieși",true,wPhoneMenu) 
    guiGridListSetSelectedItem(gRingtones, itemValue, 1) 
    guiSetAlpha(bCancel,0) 
    addEventHandler("onClientGUIClick", getRootElement(), onGuiClick) 
    showCursor(true) 
  
--Sună 
    setElementData(cCall, "tooltip-text", "Apelare", false) 
    setElementData(cCall, "tooltip-color", "#FFFFFF", false) 
    setElementData(cCall, "tooltip-background", "#666666", false) 
  
--Numere     
    setElementData(bNumbers, "tooltip-text", "Agendă", false) 
    setElementData(bNumbers, "tooltip-color", "#FFFFFF", false) 
    setElementData(bNumbers, "tooltip-background", "#666666", false) 
  
--Sonerii    
    setElementData(bRingtones, "tooltip-text", "Sonerii", false) 
    setElementData(bRingtones, "tooltip-color", "#FFFFFF", false) 
    setElementData(bRingtones, "tooltip-background", "#666666", false) 
     
--Notite     
    setElementData(cNotite, "tooltip-text", "Notițe", false) 
    setElementData(cNotite, "tooltip-color", "#FFFFFF", false) 
    setElementData(cNotite, "tooltip-background", "#666666", false) 
end 
addEvent("showPhoneGUI", true) 
addEventHandler("showPhoneGUI", getRootElement(), showPhoneGui) 

Link to comment
function showPhoneGui(itemValue) 
    outputChatBox ( tostring ( fileExists ( "phone.png" ) ) ) 
    wPhoneMenu = guiCreateStaticImage(sx/2 - 125,sy/2 - 175,250,450,"phone.png",false) 
    cCall = guiCreateStaticImage(0.12,0.23,0.18,0.13,"butoane/Suna.png",true, wPhoneMenu) 
    bNumbers = guiCreateStaticImage(0.42,0.23,0.18,0.13,"butoane/Agenda.png",true, wPhoneMenu) 
    bRingtones = guiCreateStaticImage(0.71,0.23,0.18,0.13,"butoane/Sonerii.png",true, wPhoneMenu) 
    cNotite = guiCreateStaticImage(0.12, 0.38, 0.18, 0.13, "butoane/Notite.png",true, wPhoneMenu) 
    cCopyright = guiCreateLabel(549, 618, 181, 15, "Copyright © România World Gaming - D&G", false) 
    guiSetFont(cCopyright, "default-small") 
    guiLabelSetVerticalAlign(cCopyright, "top") 
    bCancel = guiCreateButton(0.3880,0.8667,0.2200,0.0933,"Ie?i",true,wPhoneMenu) 
    guiGridListSetSelectedItem(gRingtones, itemValue, 1) 
    guiSetAlpha(bCancel,0) 
    addEventHandler("onClientGUIClick", getRootElement(), onGuiClick) 
    showCursor(true) 
  
--Suna 
    setElementData(cCall, "tooltip-text", "Apelare", false) 
    setElementData(cCall, "tooltip-color", "#FFFFFF", false) 
    setElementData(cCall, "tooltip-background", "#666666", false) 
  
--Numere     
    setElementData(bNumbers, "tooltip-text", "Agenda", false) 
    setElementData(bNumbers, "tooltip-color", "#FFFFFF", false) 
    setElementData(bNumbers, "tooltip-background", "#666666", false) 
  
--Sonerii   
    setElementData(bRingtones, "tooltip-text", "Sonerii", false) 
    setElementData(bRingtones, "tooltip-color", "#FFFFFF", false) 
    setElementData(bRingtones, "tooltip-background", "#666666", false) 
    
--Notite     
    setElementData(cNotite, "tooltip-text", "Noti?e", false) 
    setElementData(cNotite, "tooltip-color", "#FFFFFF", false) 
    setElementData(cNotite, "tooltip-background", "#666666", false) 
end 
addEvent("showPhoneGUI", true) 
addEventHandler("showPhoneGUI", getRootElement(), showPhoneGui) 

Use that and see what it says.

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...