Jump to content

I have a problem with markers and panels help me plis


Zero^^

Recommended Posts

This is all code which achieves do but do not work for me.

createMarker markerinicio = (2176, -1763, 13, "cylinder", 1, 0, 0, 255, 255)

window function ()

Window = guiCreateWindow (156, 103, 471, 441, "Departments LS", false)

guiWindowSetSizable (Window, false)

image = guiCreateStaticImage (18, 28, 434, 243, "guieditor / images / examples / mta-screen_2014-12-03_19-39-00.png", false, GUIEditor.window [1])

text = guiCreateMemo (18, 282, 434, 123, "Tired of living in the street? Well, I have an answer for it. \ n \ nCompra a department Departments LS and you can make your dream come true. \ n \ n¡Solo for $ 25,000 you can get a home! ", false, GUIEditor.window [1])

guiMemoSetReadOnly (text, true)

button = guiCreateButton (348, 410, 104, 21, "Close", false, GUIEditor.window [1])

guiSetProperty (button, "NormalTextColour", "FFAAAAAA")

ShowCursor (true)

AddEventHandler ("onClientGUIClick" Close, SalirFuncion, false)

end

addEvent ("onGreeting", true)

AddEventHandler ("onGreeting" localPlayer window)

SalirFuncion function ()

ShowCursor (false)

guiSetVisible (Ventana, not guiGetVisible (Window))

end

Link to comment
function createWindow () 
Window = guiCreateWindow (156, 103, 471, 441, "Departments LS", false) 
guiWindowSetSizable (Window, false) 
guiWindowSetMovable (Window, false) 
guiSetVisible (Window, false) 
  
image = guiCreateStaticImage (18, 28, 434, 243, "guieditor/images/examples/mta-screen_2014-12-03_19-39-00.png", false, Window) 
text = guiCreateMemo (18, 282, 434, 123, "Tired of living in the street? Well, I have an answer for it.\n \nCompra a department Departments LS and you can make your dream come true. \n \n¡Solo for $ 25,000 you can get a home! ", false, Window) 
guiMemoSetReadOnly (text, true) 
button = guiCreateButton (348, 410, 104, 21, "Close", false, Window) 
guiSetProperty (button, "NormalTextColour", "FFAAAAAA") 
AddEventHandler ("onClientGUIClick" button, SalirFuncion, false) 
end 
  
addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), createWindow) 
  
function SalirFuncion () 
showCursor (false) 
guiSetVisible (Window, false) 
end 
  
-- IF it needs to be opened by the marker use this full code, else the below part can be removed. 
  
function abiertoFuncion () 
guiSetVisible(Window, true) 
showCursor (true) 
end 
  
addEvent("abiertoEvent", true) 
addEventHandler("abiertoEvent", getRootElement(), abiertoEvent) 
  
-- SERVER SIDE 
markerinicio = createMarker (2176, -1763, 13, "cylinder", 1, 0, 0, 255, 255) 
  
function abiertoServerFuncion (thePlayer) 
triggerClientEvent("abiertoEvent", thePlayer) 
end 
  
addEventHandler("onMarkerHit", markerinicio, abiertoServerFuncion) 

Didn't test it, made it quickly while on a school computer but I can't test here without MTA.

I hope it works for you, take a look at it because there are many mistake on writing your declaration on the wrong side.

Example: You write: function_name function () => what it needs to be: function function_name ()

Learn from this,

Regards Viruz

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