Jump to content

Ammu marker error


OrbTanT

Recommended Posts

Good i've created a ammunation for my server, then I leave to open the ammu when entering within the marker displays the following error:

79ab7d33727b64ba1ece4ab25dc71efd.jpg

This error does not disturb anything to open and ammunation, more I would like to know why that is occurring this error and how to resolve.

client

GUIEditor = { 
    tab = {},
    staticimage = {},
    tabpanel = {},
    button = {},
    window = {}
}
addEventHandler("onClientMarkerHit", resourceRoot,
    function()
        showCursor ( true )
       
        GUIEditor.window[1] = guiCreateWindow(270, 100, 800, 600, "Ammunation", false)
        guiWindowSetSizable(GUIEditor.window[1], false)
       
       
        GUIEditor.staticimage[1] = guiCreateStaticImage(130, 40, 500, 500, ":ammunation1/files/mira.png", false, GUIEditor.window[1])    
        GUIEditor.tabpanel[1] = guiCreateTabPanel(25, 20, 750, 565, false, GUIEditor.window[1])
        guiSetAlpha(GUIEditor.tabpanel[1], 0.90)
        guiSetAlpha(GUIEditor.staticimage[1], 0.99)
       
       
        GUIEditor.tab[1] = guiCreateTab("Armas", GUIEditor.tabpanel[1])
 
        GUIEditor.staticimage[15] = guiCreateStaticImage(50, 50, 100, 100, ":ammunation1/files/8.png", false, GUIEditor.tab[1])
        GUIEditor.staticimage[16] = guiCreateStaticImage(190, 380, 100, 100, ":ammunation1/files/2.png", false, GUIEditor.tab[1])
        GUIEditor.staticimage[17] = guiCreateStaticImage(330, 215, 100, 100, ":ammunation1/files/11.png", false, GUIEditor.tab[1])
        GUIEditor.staticimage[18] = guiCreateStaticImage(470, 50, 100, 100, ":ammunation1/files/5.png", false, GUIEditor.tab[1])
        GUIEditor.staticimage[19] = guiCreateStaticImage(610, 50, 100, 100, ":ammunation1/files/6.png", false, GUIEditor.tab[1])
        GUIEditor.staticimage[20] = guiCreateStaticImage(50, 215, 100, 100, ":ammunation1/files/9.png", false, GUIEditor.tab[1])
        GUIEditor.staticimage[21] = guiCreateStaticImage(50, 380, 100, 100, ":ammunation1/files/10.png", false, GUIEditor.tab[1])
        GUIEditor.staticimage[22] = guiCreateStaticImage(190, 50, 100, 100, ":ammunation1/files/4.png", false, GUIEditor.tab[1])
        GUIEditor.staticimage[24] = guiCreateStaticImage(190, 215, 100, 100, ":ammunation1/files/1.png", false, GUIEditor.tab[1])
        GUIEditor.staticimage[25] = guiCreateStaticImage(330, 50, 100, 100, ":ammunation1/files/12.png", false, GUIEditor.tab[1])
        GUIEditor.staticimage[26] = guiCreateStaticImage(330, 380, 100, 100, ":ammunation1/files/13.png", false, GUIEditor.tab[1])
        GUIEditor.staticimage[27] = guiCreateStaticImage(470, 215, 100, 100, ":ammunation1/files/7.png", false, GUIEditor.tab[1])
        GUIEditor.staticimage[23] = guiCreateStaticImage(610, 215, 100, 100, ":ammunation1/files/3.png", false, GUIEditor.tab[1])
        b1 = guiCreateButton(50, 155, 100, 50, "Pistol", false, GUIEditor.tab[1])
        guiSetProperty(b1, "NormalTextColour", "FFFFFFFF")
        b2 = guiCreateButton(190, 155, 100, 50, "Shotgun", false, GUIEditor.tab[1])
        guiSetProperty(b2, "NormalTextColour", "FFFFFFFF")
        b3 = guiCreateButton(330, 155, 100, 50, "Uzi", false, GUIEditor.tab[1])
        guiSetProperty(b3, "NormalTextColour", "FFFFFFFF")
        b4 = guiCreateButton(470, 155, 100, 50, "M4", false, GUIEditor.tab[1])
        guiSetProperty(b4, "NormalTextColour", "FFFFFFFF")
        b5 = guiCreateButton(610, 155, 100, 50, "Sniper Rifle", false, GUIEditor.tab[1])
        guiSetProperty(b5, "NormalTextColour", "FFFFFFFF")
        b6 = guiCreateButton(50, 320, 100, 50, "Silenced Pistol", false, GUIEditor.tab[1])
        guiSetProperty(b6, "NormalTextColour", "FFFFFFFF")
        b7 = guiCreateButton(190, 320, 100, 50, "SPAZ-12 Combat", false, GUIEditor.tab[1])
        guiSetProperty(b7, "NormalTextColour", "FFFFFFFF")
        b8 = guiCreateButton(330, 320, 100, 50, "TEC-9", false, GUIEditor.tab[1])
        guiSetProperty(b8, "NormalTextColour", "FFFFFFFF")
        b9 = guiCreateButton(470, 320, 100, 50, "AK-47", false, GUIEditor.tab[1])
        guiSetProperty(b9, "NormalTextColour", "FFFFFFFF")
        b10 = guiCreateButton(610, 320, 100, 50, "Country Rifle", false, GUIEditor.tab[1])
        guiSetProperty(b10, "NormalTextColour", "FFFFFFFF")
        b11 = guiCreateButton(50, 480, 100, 50, "Desert Eagle", false, GUIEditor.tab[1])
        guiSetProperty(b11, "NormalTextColour", "FFFFFFFF")
        b12 = guiCreateButton(190, 480, 100, 50, "Sawn-Off", false, GUIEditor.tab[1])
        guiSetProperty(b12, "NormalTextColour", "FFFFFFFF")
        b13 = guiCreateButton(330, 480, 100, 50, "MP5", false, GUIEditor.tab[1])
        guiSetProperty(b13, "NormalTextColour", "FFFFFFFF")
 
 
        GUIEditor.button[15] = guiCreateButton(50, 15, 100, 35, "HandGuns", false, GUIEditor.tab[1])
        guiSetProperty(GUIEditor.button[15], "NormalTextColour", "FFFFFFFF")
        GUIEditor.button[16] = guiCreateButton(190, 15, 100, 35, "ShotGuns", false, GUIEditor.tab[1])
        guiSetProperty(GUIEditor.button[16], "NormalTextColour", "FFFFFFFF")
        GUIEditor.button[17] = guiCreateButton(330, 15, 100, 35, "Sub-Machine", false, GUIEditor.tab[1])
        guiSetProperty(GUIEditor.button[17], "NormalTextColour", "FFFFFFFF")
        GUIEditor.button[18] = guiCreateButton(470, 15, 100, 35, "Assault Rifles", false, GUIEditor.tab[1])
        guiSetProperty(GUIEditor.button[18], "NormalTextColour", "FFFFFFFF")
        GUIEditor.button[19] = guiCreateButton(610, 15, 100, 35, "Rifles", false, GUIEditor.tab[1])
        guiSetProperty(GUIEditor.button[19], "NormalTextColour", "FFFFFFFF")
        GUIEditor.button[20] = guiCreateButton(630, 475, 100, 50, "Sair", false, GUIEditor.tab[1])
        guiSetProperty(GUIEditor.button[20], "NormalTextColour", "FFFF0000")
   
        GUIEditor.tab[2] = guiCreateTab("Equipamentos", GUIEditor.tabpanel[1])
 
        GUIEditor.staticimage[13] = guiCreateStaticImage(50, 50, 100, 100, ":ammunation1/files/colete.png", false, GUIEditor.tab[2])
        GUIEditor.staticimage[14] = guiCreateStaticImage(190, 45, 110, 110, ":ammunation1/files/16.png", false, GUIEditor.tab[2])
        GUIEditor.button[7] = guiCreateButton(50, 10, 100, 35, "Colete", false, GUIEditor.tab[2])
        guiSetProperty(GUIEditor.button[7], "NormalTextColour", "FFFFFFFF")
        GUIEditor.button[8] = guiCreateButton(190, 10, 100, 35, "Paraquedas", false, GUIEditor.tab[2])
        guiSetProperty(GUIEditor.button[8], "NormalTextColour", "FFFFFFFF")
        GUIEditor.button[9] = guiCreateButton(50, 155, 100, 50, "Comprar", false, GUIEditor.tab[2])
        guiSetProperty(GUIEditor.button[9], "NormalTextColour", "FFFFFFFF")
        GUIEditor.button[10] = guiCreateButton(190, 155, 100, 50, "Comprar", false, GUIEditor.tab[2])
        guiSetProperty(GUIEditor.button[10], "NormalTextColour", "FFFFFFFF")
        GUIEditor.button[11] = guiCreateButton(630, 475, 100, 50, "Sair", false, GUIEditor.tab[2])
        guiSetProperty(GUIEditor.button[11], "NormalTextColour", "FFFF0000")    
    end
)
 
addEventHandler("onClientRender", root,
    function()
        dxDrawRectangle(466, 207, 0, 0, tocolor(255, 255, 255, 255), true)
        dxDrawText("", 488, 217, 488, 217, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, true, false, false)
        dxDrawRectangle(466, 207, 0, 0, tocolor(255, 255, 255, 255), true)
        dxDrawText("", 488, 217, 488, 217, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, true, false, false)
        dxDrawRectangle(466, 207, 0, 0, tocolor(255, 255, 255, 255), true)
        dxDrawText("", 488, 217, 488, 217, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, true, false, false)
        dxDrawRectangle(466, 207, 0, 0, tocolor(255, 255, 255, 255), true)
        dxDrawText("", 488, 217, 488, 217, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, true, false, false)
        dxDrawRectangle(466, 207, 0, 0, tocolor(255, 255, 255, 255), true)
        dxDrawText("", 488, 217, 488, 217, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, true, false, false)
        dxDrawRectangle(466, 207, 0, 0, tocolor(255, 255, 255, 255), true)
        dxDrawText("", 488, 217, 488, 217, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, true, false, false)
    end
)
 
addEventHandler ("onClientGUIClick", getRootElement(),
 
function(button, state, absoluteX, absoluteY)
 
if ( source ==  b1 ) then
 
triggerServerEvent("pistol",getLocalPlayer())
 
end
 end
 
)
 
addEventHandler ("onClientGUIClick", getRootElement(),
 
function(button, state, absoluteX, absoluteY)
 
if ( source ==  b2 ) then
 
triggerServerEvent("shotgun",getLocalPlayer())
 
end
 end
 
)
 
addEventHandler ("onClientGUIClick", getRootElement(),
 
function(button, state, absoluteX, absoluteY)
 
if ( source ==  b3 ) then
 
triggerServerEvent("uzi",getLocalPlayer())
 
end
 end
 
)
 
addEventHandler ("onClientGUIClick", getRootElement(),
 
function(button, state, absoluteX, absoluteY)
 
if ( source ==  b4 ) then
 
triggerServerEvent("m4",getLocalPlayer())
 
end
 end
 
)
 
addEventHandler ("onClientGUIClick", getRootElement(),
 
function(button, state, absoluteX, absoluteY)
 
if ( source ==  b5 ) then
 
triggerServerEvent("sniper",getLocalPlayer())
 
end
 end
 
)
 
addEventHandler ("onClientGUIClick", getRootElement(),
 
function(button, state, absoluteX, absoluteY)
 
if ( source ==  b6 ) then
 
triggerServerEvent("spistol",getLocalPlayer())
 
end
 end
 
)
 
addEventHandler ("onClientGUIClick", getRootElement(),
 
function(button, state, absoluteX, absoluteY)
 
if ( source ==  b7 ) then
 
triggerServerEvent("combat",getLocalPlayer())
 
end
 end
 
)
 
addEventHandler ("onClientGUIClick", getRootElement(),
 
function(button, state, absoluteX, absoluteY)
 
if ( source ==  b8 ) then
 
triggerServerEvent("tec",getLocalPlayer())
 
end
 end
 
)
 
addEventHandler ("onClientGUIClick", getRootElement(),
 
function(button, state, absoluteX, absoluteY)
 
if ( source ==  b9 ) then
 
triggerServerEvent("ak",getLocalPlayer())
 
end
 end
 
)
 
addEventHandler ("onClientGUIClick", getRootElement(),
 
function(button, state, absoluteX, absoluteY)
 
if ( source ==  b10 ) then
 
triggerServerEvent("country",getLocalPlayer())
 
end
 end
 
)
 
addEventHandler ("onClientGUIClick", getRootElement(),
 
function(button, state, absoluteX, absoluteY)
 
if ( source ==  b11 ) then
 
triggerServerEvent("eagle",getLocalPlayer())
 
end
 end
 
Link to comment

For you, what is line 363, because it's not the same in this code.

The error is basically saying the GUI element that you're trying to change the visibility of doesn't exist or hasn't been created yet.

i think you need to define the window on the top of the script like this ,

GUIEditor.window = { } 

That's already defined here:

GUIEditor = { 
    tab = {},  -- Creates: GUIEditor.tab 
    staticimage = {}, -- Creates: GUIEditor.staticimage 
    tabpanel = {}, -- Creates: GUIEditor.tabpanel 
    button = {}, -- Creates: GUIEditor.button 
    window = {} -- Creates: GUIEditor.window 
} 

Link to comment

So , it's must be this line making the error

addEventHandler ("onClientMarkerHit", marker1, markerHit) 
addEventHandler ("onClientMarkerHit", marker2, markerHit) 
addEventHandler ("onClientMarkerHit", marker3, markerHit) 
addEventHandler ("onClientMarkerHit", marker4, markerHit) 
addEventHandler ("onClientMarkerHit", marker5, markerHit) 
addEventHandler ("onClientMarkerHit", marker6, markerHit) 
addEventHandler ("onClientMarkerHit", marker7, markerHit) 

You Could , Make a tabel or somthing than making 6 events !

Link to comment

Try using this, but I'm not sure if it'll work, I didn't test it.

GUIEditor = { 
    tab = {},
    staticimage = {},
    tabpanel = {},
    button = {},
    window = {}
}
    function makeGui ( )
        showCursor ( true )
       
        GUIEditor.window[1] = guiCreateWindow(270, 100, 800, 600, "Ammunation", false)
        guiWindowSetSizable(GUIEditor.window[1], false)
       
       
        GUIEditor.staticimage[1] = guiCreateStaticImage(130, 40, 500, 500, ":ammunation1/files/mira.png", false, GUIEditor.window[1])    
        GUIEditor.tabpanel[1] = guiCreateTabPanel(25, 20, 750, 565, false, GUIEditor.window[1])
        guiSetAlpha(GUIEditor.tabpanel[1], 0.90)
        guiSetAlpha(GUIEditor.staticimage[1], 0.99)
       
       
        GUIEditor.tab[1] = guiCreateTab("Armas", GUIEditor.tabpanel[1])
 
        GUIEditor.staticimage[15] = guiCreateStaticImage(50, 50, 100, 100, ":ammunation1/files/8.png", false, GUIEditor.tab[1])
        GUIEditor.staticimage[16] = guiCreateStaticImage(190, 380, 100, 100, ":ammunation1/files/2.png", false, GUIEditor.tab[1])
        GUIEditor.staticimage[17] = guiCreateStaticImage(330, 215, 100, 100, ":ammunation1/files/11.png", false, GUIEditor.tab[1])
        GUIEditor.staticimage[18] = guiCreateStaticImage(470, 50, 100, 100, ":ammunation1/files/5.png", false, GUIEditor.tab[1])
        GUIEditor.staticimage[19] = guiCreateStaticImage(610, 50, 100, 100, ":ammunation1/files/6.png", false, GUIEditor.tab[1])
        GUIEditor.staticimage[20] = guiCreateStaticImage(50, 215, 100, 100, ":ammunation1/files/9.png", false, GUIEditor.tab[1])
        GUIEditor.staticimage[21] = guiCreateStaticImage(50, 380, 100, 100, ":ammunation1/files/10.png", false, GUIEditor.tab[1])
        GUIEditor.staticimage[22] = guiCreateStaticImage(190, 50, 100, 100, ":ammunation1/files/4.png", false, GUIEditor.tab[1])
        GUIEditor.staticimage[24] = guiCreateStaticImage(190, 215, 100, 100, ":ammunation1/files/1.png", false, GUIEditor.tab[1])
        GUIEditor.staticimage[25] = guiCreateStaticImage(330, 50, 100, 100, ":ammunation1/files/12.png", false, GUIEditor.tab[1])
        GUIEditor.staticimage[26] = guiCreateStaticImage(330, 380, 100, 100, ":ammunation1/files/13.png", false, GUIEditor.tab[1])
        GUIEditor.staticimage[27] = guiCreateStaticImage(470, 215, 100, 100, ":ammunation1/files/7.png", false, GUIEditor.tab[1])
        GUIEditor.staticimage[23] = guiCreateStaticImage(610, 215, 100, 100, ":ammunation1/files/3.png", false, GUIEditor.tab[1])
        b1 = guiCreateButton(50, 155, 100, 50, "Pistol", false, GUIEditor.tab[1])
        guiSetProperty(b1, "NormalTextColour", "FFFFFFFF")
        b2 = guiCreateButton(190, 155, 100, 50, "Shotgun", false, GUIEditor.tab[1])
        guiSetProperty(b2, "NormalTextColour", "FFFFFFFF")
        b3 = guiCreateButton(330, 155, 100, 50, "Uzi", false, GUIEditor.tab[1])
        guiSetProperty(b3, "NormalTextColour", "FFFFFFFF")
        b4 = guiCreateButton(470, 155, 100, 50, "M4", false, GUIEditor.tab[1])
        guiSetProperty(b4, "NormalTextColour", "FFFFFFFF")
        b5 = guiCreateButton(610, 155, 100, 50, "Sniper Rifle", false, GUIEditor.tab[1])
        guiSetProperty(b5, "NormalTextColour", "FFFFFFFF")
        b6 = guiCreateButton(50, 320, 100, 50, "Silenced Pistol", false, GUIEditor.tab[1])
        guiSetProperty(b6, "NormalTextColour", "FFFFFFFF")
        b7 = guiCreateButton(190, 320, 100, 50, "SPAZ-12 Combat", false, GUIEditor.tab[1])
        guiSetProperty(b7, "NormalTextColour", "FFFFFFFF")
        b8 = guiCreateButton(330, 320, 100, 50, "TEC-9", false, GUIEditor.tab[1])
        guiSetProperty(b8, "NormalTextColour", "FFFFFFFF")
        b9 = guiCreateButton(470, 320, 100, 50, "AK-47", false, GUIEditor.tab[1])
        guiSetProperty(b9, "NormalTextColour", "FFFFFFFF")
        b10 = guiCreateButton(610, 320, 100, 50, "Country Rifle", false, GUIEditor.tab[1])
        guiSetProperty(b10, "NormalTextColour", "FFFFFFFF")
        b11 = guiCreateButton(50, 480, 100, 50, "Desert Eagle", false, GUIEditor.tab[1])
        guiSetProperty(b11, "NormalTextColour", "FFFFFFFF")
        b12 = guiCreateButton(190, 480, 100, 50, "Sawn-Off", false, GUIEditor.tab[1])
        guiSetProperty(b12, "NormalTextColour", "FFFFFFFF")
        b13 = guiCreateButton(330, 480, 100, 50, "MP5", false, GUIEditor.tab[1])
        guiSetProperty(b13, "NormalTextColour", "FFFFFFFF")
 
 
        GUIEditor.button[15] = guiCreateButton(50, 15, 100, 35, "HandGuns", false, GUIEditor.tab[1])
        guiSetProperty(GUIEditor.button[15], "NormalTextColour", "FFFFFFFF")
        GUIEditor.button[16] = guiCreateButton(190, 15, 100, 35, "ShotGuns", false, GUIEditor.tab[1])
        guiSetProperty(GUIEditor.button[16], "NormalTextColour", "FFFFFFFF")
        GUIEditor.button[17] = guiCreateButton(330, 15, 100, 35, "Sub-Machine", false, GUIEditor.tab[1])
        guiSetProperty(GUIEditor.button[17], "NormalTextColour", "FFFFFFFF")
        GUIEditor.button[18] = guiCreateButton(470, 15, 100, 35, "Assault Rifles", false, GUIEditor.tab[1])
        guiSetProperty(GUIEditor.button[18], "NormalTextColour", "FFFFFFFF")
        GUIEditor.button[19] = guiCreateButton(610, 15, 100, 35, "Rifles", false, GUIEditor.tab[1])
        guiSetProperty(GUIEditor.button[19], "NormalTextColour", "FFFFFFFF")
        GUIEditor.button[20] = guiCreateButton(630, 475, 100, 50, "Sair", false, GUIEditor.tab[1])
        guiSetProperty(GUIEditor.button[20], "NormalTextColour", "FFFF0000")
   
        GUIEditor.tab[2] = guiCreateTab("Equipamentos", GUIEditor.tabpanel[1])
 
        GUIEditor.staticimage[13] = guiCreateStaticImage(50, 50, 100, 100, ":ammunation1/files/colete.png", false, GUIEditor.tab[2])
        GUIEditor.staticimage[14] = guiCreateStaticImage(190, 45, 110, 110, ":ammunation1/files/16.png", false, GUIEditor.tab[2])
        GUIEditor.button[7] = guiCreateButton(50, 10, 100, 35, "Colete", false, GUIEditor.tab[2])
        guiSetProperty(GUIEditor.button[7], "NormalTextColour", "FFFFFFFF")
        GUIEditor.button[8] = guiCreateButton(190, 10, 100, 35, "Paraquedas", false, GUIEditor.tab[2])
        guiSetProperty(GUIEditor.button[8], "NormalTextColour", "FFFFFFFF")
        GUIEditor.button[9] = guiCreateButton(50, 155, 100, 50, "Comprar", false, GUIEditor.tab[2])
        guiSetProperty(GUIEditor.button[9], "NormalTextColour", "FFFFFFFF")
        GUIEditor.button[10] = guiCreateButton(190, 155, 100, 50, "Comprar", false, GUIEditor.tab[2])
        guiSetProperty(GUIEditor.button[10], "NormalTextColour", "FFFFFFFF")
        GUIEditor.button[11] = guiCreateButton(630, 475, 100, 50, "Sair", false, GUIEditor.tab[2])
        guiSetProperty(GUIEditor.button[11], "NormalTextColour", "FFFF0000")    
    end
 
addEventHandler("onClientRender", root,
    function()
        dxDrawRectangle(466, 207, 0, 0, tocolor(255, 255, 255, 255), true)
        dxDrawText("", 488, 217, 488, 217, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, true, false, false)
        dxDrawRectangle(466, 207, 0, 0, tocolor(255, 255, 255, 255), true)
        dxDrawText("", 488, 217, 488, 217, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, true, false, false)
        dxDrawRectangle(466, 207, 0, 0, tocolor(255, 255, 255, 255), true)
        dxDrawText("", 488, 217, 488, 217, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, true, false, false)
        dxDrawRectangle(466, 207, 0, 0, tocolor(255, 255, 255, 255), true)
        dxDrawText("", 488, 217, 488, 217, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, true, false, false)
        dxDrawRectangle(466, 207, 0, 0, tocolor(255, 255, 255, 255), true)
        dxDrawText("", 488, 217, 488, 217, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, true, false, false)
        dxDrawRectangle(466, 207, 0, 0, tocolor(255, 255, 255, 255), true)
        dxDrawText("", 488, 217, 488, 217, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, true, false, false)
    end
)
 
addEventHandler ("onClientGUIClick", getRootElement(),
 
function(button, state, absoluteX, absoluteY)
 
if ( source ==  b1 ) then
 
triggerServerEvent("pistol",getLocalPlayer())
 
end
 end
 
)
 
addEventHandler ("onClientGUIClick", getRootElement(),
 
function(button, state, absoluteX, absoluteY)
 
if ( source ==  b2 ) then
 
triggerServerEvent("shotgun",getLocalPlayer())
 
end
 end
 
)
 
addEventHandler ("onClientGUIClick", getRootElement(),
 
function(button, state, absoluteX, absoluteY)
 
if ( source ==  b3 ) then
 
triggerServerEvent("uzi",getLocalPlayer())
 
end
 end
 
)
 
addEventHandler ("onClientGUIClick", getRootElement(),
 
function(button, state, absoluteX, absoluteY)
 
if ( source ==  b4 ) then
 
triggerServerEvent("m4",getLocalPlayer())
 
end
 end
 
)
 
addEventHandler ("onClientGUIClick", getRootElement(),
 
function(button, state, absoluteX, absoluteY)
 
if ( source ==  b5 ) then
 
triggerServerEvent("sniper",getLocalPlayer())
 
end
 end
 
)
 
addEventHandler ("onClientGUIClick", getRootElement(),
 
function(button, state, absoluteX, absoluteY)
 
if ( source ==  b6 ) then
 
triggerServerEvent("spistol",getLocalPlayer())
 
end
 end
 
)
 
addEventHandler ("onClientGUIClick", getRootElement(),
 
function(button, state, absoluteX, absoluteY)
 
if ( source ==  b7 ) then
 
triggerServerEvent("combat",getLocalPlayer())
 
end
 end
 
)
 
addEventHandler ("onClientGUIClick", getRootElement(),
 
function(button, state, absoluteX, absoluteY)
 
if ( source ==  b8 ) then
 
triggerServerEvent("tec",getLocalPlayer())
 
end
 end
 
)
 
addEventHandler ("onClientGUIClick", getRootElement(),
 
function(button, state, absoluteX, absoluteY)
 
if ( source ==  b9 ) then
 
triggerServerEvent("ak",getLocalPlayer())
 
end
 end
 
)
 
addEventHandler ("onClientGUIClick", getRootElement(),
 
function(button, state, absoluteX, absoluteY)
 
if ( source ==  b10 ) then
 
triggerServerEvent("country",getLocalPlayer())
 
end
 end
 
)
 
addEventHandler ("onClientGUIClick", getRootElement(),
 
function(button, state, absoluteX, absoluteY)
 
if ( source ==  b11 ) then
 
triggerServerEvent("eagle",getLocalPlayer())
 
end
 end
 
)
 
Link to comment

It is no longer showing the error, thank you, more could help me in one more thing, I think that now it is in the server side, if I buy the vest for example appears to all that I bought the vest, How do I appear only for the player to buy the items

addEvent("parachute",true) 
 
addEventHandler("parachute",root,
 
function()
local PlayerMoney = getPlayerMoney(source)
 if ( PlayerMoney >= 100) then
 
    takePlayerMoney(source,100)
   
    giveWeapon ( source ,  46, 1)
     
    setPedWeaponSlot(source, getSlotFromWeapon(46))
     local name = getPlayerName(source)
 
        outputChatBox ( "#ffffff" .. name .. " #ff0000 Você comprou Parachute", getRootElement(), 255, 0, 0, true )
 
     
    else
 
 
        outputChatBox("#ff0000 Dinheiro insuficiente", source, 255, 0, 0, true)
end
 
end
 
)
 
addEvent("colete",true)
 
addEventHandler("colete",root,
 
function()
local PlayerMoney = getPlayerMoney(source)
 if ( PlayerMoney >= 100) then
 
    takePlayerMoney(source,100)
   
    setPedArmor ( source, 100 )
     
     local name = getPlayerName(source)
 
        outputChatBox ( "#ffffff" .. name .. " #ff0000 Você comprou Colete", getRootElement(), 255, 0, 0, true )
 
     
    else
 
 
        outputChatBox("#ff0000 Dinheiro insuficiente", source, 255, 0, 0, true)
end
 
end
 
)
 
addEvent("pistol",true)
 
addEventHandler("pistol",root,
 
function()
local PlayerMoney = getPlayerMoney(source)
 if ( PlayerMoney >= 100) then
 
    takePlayerMoney(source,100)
   
    giveWeapon ( source ,  22,700 )
     
    setPedWeaponSlot(source, getSlotFromWeapon(22))
     local name = getPlayerName(source)
 
        outputChatBox ( "#ffffff" .. name .. " #ff0000 Você comprou Pistol", getRootElement(), 255, 0, 0, true )
 
     
    else
 
 
        outputChatBox("#ff0000 Dinheiro insuficiente", source, 255, 0, 0, true)
end
 
end
 
)
 
addEvent("shotgun",true)
 
addEventHandler("shotgun",root,
 
function()
local PlayerMoney = getPlayerMoney(source)
 if ( PlayerMoney >= 100) then
 
    takePlayerMoney(source,100)
   
    giveWeapon ( source ,  25,700 )
     
    setPedWeaponSlot(source, getSlotFromWeapon(25))
     local name = getPlayerName(source)
 
        outputChatBox ( "#ffffff" .. name .. " #ff0000 Você comprou Shotgun", getRootElement(), 255, 0, 0, true )
 
     
    else
 
 
        outputChatBox("#ff0000 Dinheiro insuficiente", source, 255, 0, 0, true)
end
 
end
 
)
 
addEvent("uzi",true)
 
addEventHandler("uzi",root,
 
function()
local PlayerMoney = getPlayerMoney(source)
 if ( PlayerMoney >= 100) then
 
    takePlayerMoney(source,100)
   
    giveWeapon ( source ,  28,700 )
     
    setPedWeaponSlot(source, getSlotFromWeapon(28))
     local name = getPlayerName(source)
 
        outputChatBox ( "#ffffff" .. name .. " #ff0000 Você comprou Uzi", getRootElement(), 255, 0, 0, true )
 
     
    else
 
 
        outputChatBox("#ff0000 Dinheiro insuficiente", source, 255, 0, 0, true)
end
 
end
 
)
 
addEvent("m4",true)
 
addEventHandler("m4",root,
 
function()
local PlayerMoney = getPlayerMoney(source)
 if ( PlayerMoney >= 100) then
 
    takePlayerMoney(source,100)
   
    giveWeapon ( source ,  31,700 )
     
    setPedWeaponSlot(source, getSlotFromWeapon(31))
     local name = getPlayerName(source)
 
        outputChatBox ( "#ffffff" .. name .. " #ff0000 Você comprou M4", getRootElement(), 255, 0, 0, true )
 
     
    else
 
 
        outputChatBox("#ff0000 Dinheiro insuficiente", source, 255, 0, 0, true)
end
 
end
 
)
 
addEvent("sniper",true)
 
addEventHandler("sniper",root,
 
function()
local PlayerMoney = getPlayerMoney(source)
 if ( PlayerMoney >= 100) then
 
    takePlayerMoney(source,100)
   
    giveWeapon ( source ,  34,700 )
     
    setPedWeaponSlot(source, getSlotFromWeapon(34))
     local name = getPlayerName(source)
 
        outputChatBox ( "#ffffff" .. name .. " #ff0000 Você comprou Sniper Rifle", getRootElement(), 255, 0, 0, true )
 
     
    else
 
 
        outputChatBox("#ff0000 Dinheiro insuficiente", source, 255, 0, 0, true)
end
 
end
 
)
 
addEvent("spistol",true)
 
addEventHandler("spistol",root,
 
function()
local PlayerMoney = getPlayerMoney(source)
 if ( PlayerMoney >= 100) then
 
    takePlayerMoney(source,100)
   
    giveWeapon ( source ,  23,700 )
     
    setPedWeaponSlot(source, getSlotFromWeapon(23))
     local name = getPlayerName(source)
 
        outputChatBox ( "#ffffff" .. name .. " #ff0000 Você comprou Silenced Pistol", getRootElement(), 255, 0, 0, true )
 
     
    else
 
 
        outputChatBox("#ff0000 Dinheiro insuficiente", source, 255, 0, 0, true)
end
 
end
 
)
 
addEvent("combat",true)
 
addEventHandler("combat",root,
 
function()
local PlayerMoney = getPlayerMoney(source)
 if ( PlayerMoney >= 100) then
 
    takePlayerMoney(source,100)
   
    giveWeapon ( source ,  27,700 )
     
    setPedWeaponSlot(source, getSlotFromWeapon(27))
     local name = getPlayerName(source)
 
        outputChatBox ( "#ffffff" .. name .. " #ff0000 Você comprou SPAZ-12 Combat Shotgun ", getRootElement(), 255, 0, 0, true )
 
     
    else
 
 
        outputChatBox("#ff0000 Dinheiro insuficiente", source, 255, 0, 0, true)
end
 
end
 
)
 
Link to comment
As I leave this ammunation that I created within an interior, For that the player needs to go inside the store of weapons to buy the vest for example.

you want to move player to inside the store ?

it's alredy in your script . .

Link to comment

Try This , / debugscript 3

addEvent("parachute",true) 
 
addEventHandler("parachute",root,
function()
 if ( getPlayerMoney(source) >= 100) then
    takePlayerMoney(source,100)
    giveWeapon ( source ,  46, 1)
    setPedWeaponSlot(source, getSlotFromWeapon(46))
     local name = getPlayerName(source)
        outputChatBox ( "#ffffff" .. name .. " #ff0000 Você comprou Parachute", getRootElement(), 255, 0, 0, true )
    else
    outputChatBox("#ff0000 Dinheiro insuficiente", source, 255, 0, 0, true)
end
end
 
)
 
addEvent("colete",true)
addEventHandler("colete",root,
function()
 if ( getPlayerMoney(source) >= 100) then
    takePlayerMoney(source,100)
    setPedArmor ( source, 100 )
     local name = getPlayerName(source)
     outputChatBox ( "#ffffff" .. name .. " #ff0000 Você comprou Colete", getRootElement(), 255, 0, 0, true )    
    else
        outputChatBox("#ff0000 Dinheiro insuficiente", source, 255, 0, 0, true)
end
 
end
 
)
 
addEvent("pistol",true)
 
addEventHandler("pistol",root,
 
function()
if ( getPlayerMoney(source) >= 100) then
    takePlayerMoney(source,100)
    giveWeapon ( source ,  22,700 )
     
    setPedWeaponSlot(source, getSlotFromWeapon(22))
     local name = getPlayerName(source)
 
        outputChatBox ( "#ffffff" .. name .. " #ff0000 Você comprou Pistol", getRootElement(), 255, 0, 0, true )
 
     
    else
 
 
        outputChatBox("#ff0000 Dinheiro insuficiente", source, 255, 0, 0, true)
end
 
end
 
)
 
addEvent("shotgun",true)
 
addEventHandler("shotgun",root,
 
function()
if ( getPlayerMoney(source) >= 100) then
 
    takePlayerMoney(source,100)
   
    giveWeapon ( source ,  25,700 )
     
    setPedWeaponSlot(source, getSlotFromWeapon(25))
     local name = getPlayerName(source)
 
        outputChatBox ( "#ffffff" .. name .. " #ff0000 Você comprou Shotgun", getRootElement(), 255, 0, 0, true )
 
     
    else
 
 
        outputChatBox("#ff0000 Dinheiro insuficiente", source, 255, 0, 0, true)
end
 
end
 
)
 
addEvent("uzi",true)
 
addEventHandler("uzi",root,
 
function()
if ( getPlayerMoney(source) >= 100) then
 
    takePlayerMoney(source,100)
   
    giveWeapon ( source ,  28,700 )
     
    setPedWeaponSlot(source, getSlotFromWeapon(28))
     local name = getPlayerName(source)
 
        outputChatBox ( "#ffffff" .. name .. " #ff0000 Você comprou Uzi", getRootElement(), 255, 0, 0, true )
 
     
    else
 
 
        outputChatBox("#ff0000 Dinheiro insuficiente", source, 255, 0, 0, true)
end
 
end
 
)
 
addEvent("m4",true)
 
addEventHandler("m4",root,
 
function()
if ( getPlayerMoney(source) >= 100) then
 
    takePlayerMoney(source,100)
   
    giveWeapon ( source ,  31,700 )
     
    setPedWeaponSlot(source, getSlotFromWeapon(31))
     local name = getPlayerName(source)
 
        outputChatBox ( "#ffffff" .. name .. " #ff0000 Você comprou M4", getRootElement(), 255, 0, 0, true )
 
     
    else
 
 
        outputChatBox("#ff0000 Dinheiro insuficiente", source, 255, 0, 0, true)
end
 
end
 
)
 
addEvent("sniper",true)
 
addEventHandler("sniper",root,
 
function()
if ( getPlayerMoney(source) >= 100) then
 
    takePlayerMoney(source,100)
   
    giveWeapon ( source ,  34,700 )
     
    setPedWeaponSlot(source, getSlotFromWeapon(34))
     local name = getPlayerName(source)
 
        outputChatBox ( "#ffffff" .. name .. " #ff0000 Você comprou Sniper Rifle", getRootElement(), 255, 0, 0, true )
 
     
    else
 
 
        outputChatBox("#ff0000 Dinheiro insuficiente", source, 255, 0, 0, true)
end
 
end
 
)
 
addEvent("spistol",true)
 
addEventHandler("spistol",root,
 
function()
if ( getPlayerMoney(source) >= 100) then
 
    takePlayerMoney(source,100)
   
    giveWeapon ( source ,  23,700 )
     
    setPedWeaponSlot(source, getSlotFromWeapon(23))
     local name = getPlayerName(source)
 
        outputChatBox ( "#ffffff" .. name .. " #ff0000 Você comprou Silenced Pistol", getRootElement(), 255, 0, 0, true )
 
     
    else
 
 
        outputChatBox("#ff0000 Dinheiro insuficiente", source, 255, 0, 0, true)
end
 
end
 
)
 
addEvent("combat",true)
 
addEventHandler("combat",root,
 
function()
if ( getPlayerMoney(source) >= 100) then
 
    takePlayerMoney(source,100)
   
    giveWeapon ( source ,  27,700 )
     
    setPedWeaponSlot(source, getSlotFromWeapon(27))
     local name = getPlayerName(source)
 
        outputChatBox ( "#ffffff" .. name .. " #ff0000 Você comprou SPAZ-12 Combat Shotgun ", getRootElement(), 255, 0, 0, true )
 
     
    else
 
 
        outputChatBox("#ff0000 Dinheiro insuficiente", source, 255, 0, 0, true)
end
 
end
 
)
 
addEvent("tec",true)
 
addEventHandler("tec",root,
 
function()
if ( getPlayerMoney(source) >= 100) then
 
    takePlayerMoney(source,100)
   
    giveWeapon ( source ,  32,700 )
     
    setPedWeaponSlot(source, getSlotFromWeapon(32))
     local name = getPlayerName(source)
 
        outputChatBox ( "#ffffff" .. name .. " #ff0000 Você comprou TEC-9", getRootElement(), 255, 0, 0, true )
 
     
    else
 
 
        outputChatBox("#ff0000 Dinheiro insuficiente", source, 255, 0, 0, true)
end
 
end
 
)
 
addEvent("ak",true)
 
addEventHandler("ak",root,
 
Link to comment

It was not, I am using this script in the part of the Client to create the marker of the GUI, you can place this marker within a store?

GUIEditor = { 
    tab = {},
    staticimage = {},
    tabpanel = {},
    button = {},
    window = {}
}
    function makeGui ( )
        showCursor ( true )
       
        GUIEditor.window[1] = guiCreateWindow(270, 100, 800, 600, "Ammunation", false)
        guiWindowSetSizable(GUIEditor.window[1], false)
       
       
        GUIEditor.staticimage[1] = guiCreateStaticImage(130, 40, 500, 500, ":ammunation/files/mira.png", false, GUIEditor.window[1])    
        GUIEditor.tabpanel[1] = guiCreateTabPanel(25, 20, 750, 565, false, GUIEditor.window[1])
        guiSetAlpha(GUIEditor.tabpanel[1], 0.90)
        guiSetAlpha(GUIEditor.staticimage[1], 0.99)
       
       
        GUIEditor.tab[1] = guiCreateTab("Armas", GUIEditor.tabpanel[1])
 
        GUIEditor.staticimage[15] = guiCreateStaticImage(50, 50, 100, 100, ":ammunation/files/8.png", false, GUIEditor.tab[1])
        GUIEditor.staticimage[16] = guiCreateStaticImage(190, 380, 100, 100, ":ammunation/files/2.png", false, GUIEditor.tab[1])
        GUIEditor.staticimage[17] = guiCreateStaticImage(330, 215, 100, 100, ":ammunation/files/11.png", false, GUIEditor.tab[1])
        GUIEditor.staticimage[18] = guiCreateStaticImage(470, 50, 100, 100, ":ammunation/files/5.png", false, GUIEditor.tab[1])
        GUIEditor.staticimage[19] = guiCreateStaticImage(610, 50, 100, 100, ":ammunation/files/6.png", false, GUIEditor.tab[1])
        GUIEditor.staticimage[20] = guiCreateStaticImage(50, 215, 100, 100, ":ammunation/files/9.png", false, GUIEditor.tab[1])
        GUIEditor.staticimage[21] = guiCreateStaticImage(50, 380, 100, 100, ":ammunation/files/10.png", false, GUIEditor.tab[1])
        GUIEditor.staticimage[22] = guiCreateStaticImage(190, 50, 100, 100, ":ammunation/files/4.png", false, GUIEditor.tab[1])
        GUIEditor.staticimage[24] = guiCreateStaticImage(190, 215, 100, 100, ":ammunation/files/1.png", false, GUIEditor.tab[1])
        GUIEditor.staticimage[25] = guiCreateStaticImage(330, 50, 100, 100, ":ammunation/files/12.png", false, GUIEditor.tab[1])
        GUIEditor.staticimage[26] = guiCreateStaticImage(330, 380, 100, 100, ":ammunation/files/13.png", false, GUIEditor.tab[1])
        GUIEditor.staticimage[27] = guiCreateStaticImage(470, 215, 100, 100, ":ammunation/files/7.png", false, GUIEditor.tab[1])
        GUIEditor.staticimage[23] = guiCreateStaticImage(610, 215, 100, 100, ":ammunation/files/3.png", false, GUIEditor.tab[1])
        b1 = guiCreateButton(50, 155, 100, 50, "Pistol", false, GUIEditor.tab[1])
        guiSetProperty(b1, "NormalTextColour", "FFFFFFFF")
        b2 = guiCreateButton(190, 155, 100, 50, "Shotgun", false, GUIEditor.tab[1])
        guiSetProperty(b2, "NormalTextColour", "FFFFFFFF")
        b3 = guiCreateButton(330, 155, 100, 50, "Uzi", false, GUIEditor.tab[1])
        guiSetProperty(b3, "NormalTextColour", "FFFFFFFF")
        b4 = guiCreateButton(470, 155, 100, 50, "M4", false, GUIEditor.tab[1])
        guiSetProperty(b4, "NormalTextColour", "FFFFFFFF")
        b5 = guiCreateButton(610, 155, 100, 50, "Sniper Rifle", false, GUIEditor.tab[1])
        guiSetProperty(b5, "NormalTextColour", "FFFFFFFF")
        b6 = guiCreateButton(50, 320, 100, 50, "Silenced Pistol", false, GUIEditor.tab[1])
        guiSetProperty(b6, "NormalTextColour", "FFFFFFFF")
        b7 = guiCreateButton(190, 320, 100, 50, "SPAZ-12 Combat", false, GUIEditor.tab[1])
        guiSetProperty(b7, "NormalTextColour", "FFFFFFFF")
        b8 = guiCreateButton(330, 320, 100, 50, "TEC-9", false, GUIEditor.tab[1])
        guiSetProperty(b8, "NormalTextColour", "FFFFFFFF")
        b9 = guiCreateButton(470, 320, 100, 50, "AK-47", false, GUIEditor.tab[1])
        guiSetProperty(b9, "NormalTextColour", "FFFFFFFF")
        b10 = guiCreateButton(610, 320, 100, 50, "Country Rifle", false, GUIEditor.tab[1])
        guiSetProperty(b10, "NormalTextColour", "FFFFFFFF")
        b11 = guiCreateButton(50, 480, 100, 50, "Desert Eagle", false, GUIEditor.tab[1])
        guiSetProperty(b11, "NormalTextColour", "FFFFFFFF")
        b12 = guiCreateButton(190, 480, 100, 50, "Sawn-Off", false, GUIEditor.tab[1])
        guiSetProperty(b12, "NormalTextColour", "FFFFFFFF")
        b13 = guiCreateButton(330, 480, 100, 50, "MP5", false, GUIEditor.tab[1])
        guiSetProperty(b13, "NormalTextColour", "FFFFFFFF")
 
 
        GUIEditor.button[15] = guiCreateButton(50, 15, 100, 35, "HandGuns", false, GUIEditor.tab[1])
        guiSetProperty(GUIEditor.button[15], "NormalTextColour", "FFFFFFFF")
        GUIEditor.button[16] = guiCreateButton(190, 15, 100, 35, "ShotGuns", false, GUIEditor.tab[1])
        guiSetProperty(GUIEditor.button[16], "NormalTextColour", "FFFFFFFF")
        GUIEditor.button[17] = guiCreateButton(330, 15, 100, 35, "Sub-Machine", false, GUIEditor.tab[1])
        guiSetProperty(GUIEditor.button[17], "NormalTextColour", "FFFFFFFF")
        GUIEditor.button[18] = guiCreateButton(470, 15, 100, 35, "Assault Rifles", false, GUIEditor.tab[1])
        guiSetProperty(GUIEditor.button[18], "NormalTextColour", "FFFFFFFF")
        GUIEditor.button[19] = guiCreateButton(610, 15, 100, 35, "Rifles", false, GUIEditor.tab[1])
        guiSetProperty(GUIEditor.button[19], "NormalTextColour", "FFFFFFFF")
        GUIEditor.button[20] = guiCreateButton(630, 475, 100, 50, "Sair", false, GUIEditor.tab[1])
        guiSetProperty(GUIEditor.button[20], "NormalTextColour", "FFFF0000")
   
        GUIEditor.tab[2] = guiCreateTab("Equipamentos", GUIEditor.tabpanel[1])
 
        GUIEditor.staticimage[13] = guiCreateStaticImage(50, 50, 100, 100, ":ammunation/files/colete.png", false, GUIEditor.tab[2])
        GUIEditor.staticimage[14] = guiCreateStaticImage(190, 45, 110, 110, ":ammunation/files/16.png", false, GUIEditor.tab[2])
        GUIEditor.button[7] = guiCreateButton(50, 10, 100, 35, "Colete", false, GUIEditor.tab[2])
        guiSetProperty(GUIEditor.button[7], "NormalTextColour", "FFFFFFFF")
        GUIEditor.button[8] = guiCreateButton(190, 10, 100, 35, "Paraquedas", false, GUIEditor.tab[2])
        guiSetProperty(GUIEditor.button[8], "NormalTextColour", "FFFFFFFF")
        GUIEditor.button[9] = guiCreateButton(50, 155, 100, 50, "Comprar", false, GUIEditor.tab[2])
        guiSetProperty(GUIEditor.button[9], "NormalTextColour", "FFFFFFFF")
        GUIEditor.button[10] = guiCreateButton(190, 155, 100, 50, "Comprar", false, GUIEditor.tab[2])
        guiSetProperty(GUIEditor.button[10], "NormalTextColour", "FFFFFFFF")
        GUIEditor.button[11] = guiCreateButton(630, 475, 100, 50, "Sair", false, GUIEditor.tab[2])
        guiSetProperty(GUIEditor.button[11], "NormalTextColour", "FFFF0000")    
    end
 
addEventHandler("onClientRender", root,
    function()
        dxDrawRectangle(466, 207, 0, 0, tocolor(255, 255, 255, 255), true)
        dxDrawText("", 488, 217, 488, 217, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, true, false, false)
        dxDrawRectangle(466, 207, 0, 0, tocolor(255, 255, 255, 255), true)
        dxDrawText("", 488, 217, 488, 217, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, true, false, false)
        dxDrawRectangle(466, 207, 0, 0, tocolor(255, 255, 255, 255), true)
        dxDrawText("", 488, 217, 488, 217, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, true, false, false)
        dxDrawRectangle(466, 207, 0, 0, tocolor(255, 255, 255, 255), true)
        dxDrawText("", 488, 217, 488, 217, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, true, false, false)
        dxDrawRectangle(466, 207, 0, 0, tocolor(255, 255, 255, 255), true)
        dxDrawText("", 488, 217, 488, 217, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, true, false, false)
        dxDrawRectangle(466, 207, 0, 0, tocolor(255, 255, 255, 255), true)
        dxDrawText("", 488, 217, 488, 217, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, true, false, false)
    end
)
 
addEventHandler ("onClientGUIClick", getRootElement(),
 
function(button, state, absoluteX, absoluteY)
 
if ( source ==  b1 ) then
 
triggerServerEvent("pistol",getLocalPlayer())
 
end
 end
 
)
 
addEventHandler ("onClientGUIClick", getRootElement(),
 
function(button, state, absoluteX, absoluteY)
 
if ( source ==  b2 ) then
 
triggerServerEvent("shotgun",getLocalPlayer())
 
end
 end
 
)
 
addEventHandler ("onClientGUIClick", getRootElement(),
 
function(button, state, absoluteX, absoluteY)
 
if ( source ==  b3 ) then
 
triggerServerEvent("uzi",getLocalPlayer())
 
end
 end
 
)
 
addEventHandler ("onClientGUIClick", getRootElement(),
 
function(button, state, absoluteX, absoluteY)
 
if ( source ==  b4 ) then
 
triggerServerEvent("m4",getLocalPlayer())
 
end
 end
 
)
 
addEventHandler ("onClientGUIClick", getRootElement(),
 
function(button, state, absoluteX, absoluteY)
 
if ( source ==  b5 ) then
 
triggerServerEvent("sniper",getLocalPlayer())
 
end
 end
 
)
 
addEventHandler ("onClientGUIClick", getRootElement(),
 
function(button, state, absoluteX, absoluteY)
 
if ( source ==  b6 ) then
 
triggerServerEvent("spistol",getLocalPlayer())
 
end
 end
 
)
 
addEventHandler ("onClientGUIClick", getRootElement(),
 
function(button, state, absoluteX, absoluteY)
 
if ( source ==  b7 ) then
 
triggerServerEvent("combat",getLocalPlayer())
 
end
 end
 
)
 
addEventHandler ("onClientGUIClick", getRootElement(),
 
function(button, state, absoluteX, absoluteY)
 
if ( source ==  b8 ) then
 
triggerServerEvent("tec",getLocalPlayer())
 
end
 end
 
)
 
addEventHandler ("onClientGUIClick", getRootElement(),
 
function(button, state, absoluteX, absoluteY)
 
if ( source ==  b9 ) then
 
triggerServerEvent("ak",getLocalPlayer())
 
end
 end
 
)
 
addEventHandler ("onClientGUIClick", getRootElement(),
 
function(button, state, absoluteX, absoluteY)
 
if ( source ==  b10 ) then
 
triggerServerEvent("country",getLocalPlayer())
 
end
 end
 
)
 
addEventHandler ("onClientGUIClick", getRootElement(),
 
function(button, state, absoluteX, absoluteY)
 
if ( source ==  b11 ) then
 
triggerServerEvent("eagle",getLocalPlayer())
 
end
 end
 
)
 
Link to comment

Your Code , is very Messy Forgive me if i forgot anything , or it didn't work becuase i dont know what is the inside marker and outside marker and the buy marker . .

there is 7 markers !

--ClientSide,

GUIEditor = { 
    tab = {},
    staticimage = {},
    tabpanel = {},
    button = {},
    window = {}
}
    function makeGui ( )
        showCursor ( true )
       
        GUIEditor.window[1] = guiCreateWindow(270, 100, 800, 600, "Ammunation", false)
        guiWindowSetSizable(GUIEditor.window[1], false)
       
       
        GUIEditor.staticimage[1] = guiCreateStaticImage(130, 40, 500, 500, ":ammunation/files/mira.png", false, GUIEditor.window[1])    
        GUIEditor.tabpanel[1] = guiCreateTabPanel(25, 20, 750, 565, false, GUIEditor.window[1])
        guiSetAlpha(GUIEditor.tabpanel[1], 0.90)
        guiSetAlpha(GUIEditor.staticimage[1], 0.99)
       
       
        GUIEditor.tab[1] = guiCreateTab("Armas", GUIEditor.tabpanel[1])
 
        GUIEditor.staticimage[15] = guiCreateStaticImage(50, 50, 100, 100, ":ammunation/files/8.png", false, GUIEditor.tab[1])
        GUIEditor.staticimage[16] = guiCreateStaticImage(190, 380, 100, 100, ":ammunation/files/2.png", false, GUIEditor.tab[1])
        GUIEditor.staticimage[17] = guiCreateStaticImage(330, 215, 100, 100, ":ammunation/files/11.png", false, GUIEditor.tab[1])
        GUIEditor.staticimage[18] = guiCreateStaticImage(470, 50, 100, 100, ":ammunation/files/5.png", false, GUIEditor.tab[1])
        GUIEditor.staticimage[19] = guiCreateStaticImage(610, 50, 100, 100, ":ammunation/files/6.png", false, GUIEditor.tab[1])
        GUIEditor.staticimage[20] = guiCreateStaticImage(50, 215, 100, 100, ":ammunation/files/9.png", false, GUIEditor.tab[1])
        GUIEditor.staticimage[21] = guiCreateStaticImage(50, 380, 100, 100, ":ammunation/files/10.png", false, GUIEditor.tab[1])
        GUIEditor.staticimage[22] = guiCreateStaticImage(190, 50, 100, 100, ":ammunation/files/4.png", false, GUIEditor.tab[1])
        GUIEditor.staticimage[24] = guiCreateStaticImage(190, 215, 100, 100, ":ammunation/files/1.png", false, GUIEditor.tab[1])
        GUIEditor.staticimage[25] = guiCreateStaticImage(330, 50, 100, 100, ":ammunation/files/12.png", false, GUIEditor.tab[1])
        GUIEditor.staticimage[26] = guiCreateStaticImage(330, 380, 100, 100, ":ammunation/files/13.png", false, GUIEditor.tab[1])
        GUIEditor.staticimage[27] = guiCreateStaticImage(470, 215, 100, 100, ":ammunation/files/7.png", false, GUIEditor.tab[1])
        GUIEditor.staticimage[23] = guiCreateStaticImage(610, 215, 100, 100, ":ammunation/files/3.png", false, GUIEditor.tab[1])
        b1 = guiCreateButton(50, 155, 100, 50, "Pistol", false, GUIEditor.tab[1])
        guiSetProperty(b1, "NormalTextColour", "FFFFFFFF")
        b2 = guiCreateButton(190, 155, 100, 50, "Shotgun", false, GUIEditor.tab[1])
        guiSetProperty(b2, "NormalTextColour", "FFFFFFFF")
        b3 = guiCreateButton(330, 155, 100, 50, "Uzi", false, GUIEditor.tab[1])
        guiSetProperty(b3, "NormalTextColour", "FFFFFFFF")
        b4 = guiCreateButton(470, 155, 100, 50, "M4", false, GUIEditor.tab[1])
        guiSetProperty(b4, "NormalTextColour", "FFFFFFFF")
        b5 = guiCreateButton(610, 155, 100, 50, "Sniper Rifle", false, GUIEditor.tab[1])
        guiSetProperty(b5, "NormalTextColour", "FFFFFFFF")
        b6 = guiCreateButton(50, 320, 100, 50, "Silenced Pistol", false, GUIEditor.tab[1])
        guiSetProperty(b6, "NormalTextColour", "FFFFFFFF")
        b7 = guiCreateButton(190, 320, 100, 50, "SPAZ-12 Combat", false, GUIEditor.tab[1])
        guiSetProperty(b7, "NormalTextColour", "FFFFFFFF")
        b8 = guiCreateButton(330, 320, 100, 50, "TEC-9", false, GUIEditor.tab[1])
        guiSetProperty(b8, "NormalTextColour", "FFFFFFFF")
        b9 = guiCreateButton(470, 320, 100, 50, "AK-47", false, GUIEditor.tab[1])
        guiSetProperty(b9, "NormalTextColour", "FFFFFFFF")
        b10 = guiCreateButton(610, 320, 100, 50, "Country Rifle", false, GUIEditor.tab[1])
        guiSetProperty(b10, "NormalTextColour", "FFFFFFFF")
        b11 = guiCreateButton(50, 480, 100, 50, "Desert Eagle", false, GUIEditor.tab[1])
        guiSetProperty(b11, "NormalTextColour", "FFFFFFFF")
        b12 = guiCreateButton(190, 480, 100, 50, "Sawn-Off", false, GUIEditor.tab[1])
        guiSetProperty(b12, "NormalTextColour", "FFFFFFFF")
        b13 = guiCreateButton(330, 480, 100, 50, "MP5", false, GUIEditor.tab[1])
        guiSetProperty(b13, "NormalTextColour", "FFFFFFFF")
 
 
        GUIEditor.button[15] = guiCreateButton(50, 15, 100, 35, "HandGuns", false, GUIEditor.tab[1])
        guiSetProperty(GUIEditor.button[15], "NormalTextColour", "FFFFFFFF")
        GUIEditor.button[16] = guiCreateButton(190, 15, 100, 35, "ShotGuns", false, GUIEditor.tab[1])
        guiSetProperty(GUIEditor.button[16], "NormalTextColour", "FFFFFFFF")
        GUIEditor.button[17] = guiCreateButton(330, 15, 100, 35, "Sub-Machine", false, GUIEditor.tab[1])
        guiSetProperty(GUIEditor.button[17], "NormalTextColour", "FFFFFFFF")
        GUIEditor.button[18] = guiCreateButton(470, 15, 100, 35, "Assault Rifles", false, GUIEditor.tab[1])
        guiSetProperty(GUIEditor.button[18], "NormalTextColour", "FFFFFFFF")
        GUIEditor.button[19] = guiCreateButton(610, 15, 100, 35, "Rifles", false, GUIEditor.tab[1])
        guiSetProperty(GUIEditor.button[19], "NormalTextColour", "FFFFFFFF")
        GUIEditor.button[20] = guiCreateButton(630, 475, 100, 50, "Sair", false, GUIEditor.tab[1])
        guiSetProperty(GUIEditor.button[20], "NormalTextColour", "FFFF0000")
   
        GUIEditor.tab[2] = guiCreateTab("Equipamentos", GUIEditor.tabpanel[1])
 
        GUIEditor.staticimage[13] = guiCreateStaticImage(50, 50, 100, 100, ":ammunation/files/colete.png", false, GUIEditor.tab[2])
        GUIEditor.staticimage[14] = guiCreateStaticImage(190, 45, 110, 110, ":ammunation/files/16.png", false, GUIEditor.tab[2])
        GUIEditor.button[7] = guiCreateButton(50, 10, 100, 35, "Colete", false, GUIEditor.tab[2])
        guiSetProperty(GUIEditor.button[7], "NormalTextColour", "FFFFFFFF")
        GUIEditor.button[8] = guiCreateButton(190, 10, 100, 35, "Paraquedas", false, GUIEditor.tab[2])
        guiSetProperty(GUIEditor.button[8], "NormalTextColour", "FFFFFFFF")
        GUIEditor.button[9] = guiCreateButton(50, 155, 100, 50, "Comprar", false, GUIEditor.tab[2])
        guiSetProperty(GUIEditor.button[9], "NormalTextColour", "FFFFFFFF")
        GUIEditor.button[10] = guiCreateButton(190, 155, 100, 50, "Comprar", false, GUIEditor.tab[2])
        guiSetProperty(GUIEditor.button[10], "NormalTextColour", "FFFFFFFF")
        GUIEditor.button[11] = guiCreateButton(630, 475, 100, 50, "Sair", false, GUIEditor.tab[2])
        guiSetProperty(GUIEditor.button[11], "NormalTextColour", "FFFF0000")
        guiSetVisible ( GUIEditor.window[1], false )    
    end
 
addEventHandler("onClientRender", root,
    function()
        dxDrawRectangle(466, 207, 0, 0, tocolor(255, 255, 255, 255), true)
        dxDrawText("", 488, 217, 488, 217, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, true, false, false)
        dxDrawRectangle(466, 207, 0, 0, tocolor(255, 255, 255, 255), true)
        dxDrawText("", 488, 217, 488, 217, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, true, false, false)
        dxDrawRectangle(466, 207, 0, 0, tocolor(255, 255, 255, 255), true)
        dxDrawText("", 488, 217, 488, 217, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, true, false, false)
        dxDrawRectangle(466, 207, 0, 0, tocolor(255, 255, 255, 255), true)
        dxDrawText("", 488, 217, 488, 217, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, true, false, false)
        dxDrawRectangle(466, 207, 0, 0, tocolor(255, 255, 255, 255), true)
        dxDrawText("", 488, 217, 488, 217, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, true, false, false)
        dxDrawRectangle(466, 207, 0, 0, tocolor(255, 255, 255, 255), true)
        dxDrawText("", 488, 217, 488, 217, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, true, false, false)
    end
)
 
addEventHandler ("onClientGUIClick", getRootElement(),
 
function(button, state, absoluteX, absoluteY)
 
if ( source ==  b1 ) then
 
triggerServerEvent("pistol",getLocalPlayer())
 
end
 end
 
)
 
addEventHandler ("onClientGUIClick", getRootElement(),
 
function(button, state, absoluteX, absoluteY)
 
if ( source ==  b2 ) then
 
triggerServerEvent("shotgun",getLocalPlayer())
 
end
 end
 
)
 
addEventHandler ("onClientGUIClick", getRootElement(),
 
function(button, state, absoluteX, absoluteY)
 
if ( source ==  b3 ) then
 
triggerServerEvent("uzi",getLocalPlayer())
 
end
 end
 
)
 
addEventHandler ("onClientGUIClick", getRootElement(),
 
function(button, state, absoluteX, absoluteY)
 
if ( source ==  b4 ) then
 
triggerServerEvent("m4",getLocalPlayer())
 
end
 end
 
)
 
addEventHandler ("onClientGUIClick", getRootElement(),
 
function(button, state, absoluteX, absoluteY)
 
if ( source ==  b5 ) then
 
triggerServerEvent("sniper",getLocalPlayer())
 
end
 end
 
)
 
addEventHandler ("onClientGUIClick", getRootElement(),
 
function(button, state, absoluteX, absoluteY)
 
if ( source ==  b6 ) then
 
triggerServerEvent("spistol",getLocalPlayer())
 
end
 end
 
)
 
addEventHandler ("onClientGUIClick", getRootElement(),
 
function(button, state, absoluteX, absoluteY)
 
if ( source ==  b7 ) then
 
triggerServerEvent("combat",getLocalPlayer())
 
end
 end
 
)
 
addEventHandler ("onClientGUIClick", getRootElement(),
 
function(button, state, absoluteX, absoluteY)
 
if ( source ==  b8 ) then
 
triggerServerEvent("tec",getLocalPlayer())
 
end
 end
 
)
 
addEventHandler ("onClientGUIClick", getRootElement(),
 
function(button, state, absoluteX, absoluteY)
 
if ( source ==  b9 ) then
 
triggerServerEvent("ak",getLocalPlayer())
 
end
 end
 
)
 
addEventHandler ("onClientGUIClick", getRootElement(),
 
function(button, state, absoluteX, absoluteY)
 
if ( source ==  b10 ) then
 
triggerServerEvent("country",getLocalPlayer())
 
end
 end
 
)
 
addEventHandler ("onClientGUIClick", getRootElement(),
 
function(button, state, absoluteX, absoluteY)
 
if ( source ==  b11 ) then
 
triggerServerEvent("eagle",getLocalPlayer())
 
end
 end
 
Link to comment

This marker in server was a test, which I am using same is the client, knows the resource of interiors of the mta, that is what I want to do.

This script of a marker1 up to the marker7 only I am using to test, if you recommend a script of marker that allows you to enter and exit within a interior of mta

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