Jump to content

[HELP] Static image window doesn't appear


..:D&G:..

Recommended Posts

Posted

That image isn't showing up? are you sure that the position is correct?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Are you sure that the image path is correct, and that the image is on the meta.xml?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Could you post the whole script?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

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) 

76561198066470453.png

SP37Ecj.jpg?2MTA:Rust Pre-Alpha Build v.0.3:SP37Ecj.jpg?2

https://forum.mtasa.com/viewtopic.php?f=114&t=97848

2Pac: ''Only God can judge me!''

Posted

Where is "sx" and "sy" defined at?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Try adding this:

outputChatBox ( tostring ( wPhoneMenu ) ) 

after:

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

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
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.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

That means that "phone.png" doesn't exist.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

What was the problem?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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...