Jump to content

[Solved]Help : GUI not showing


Mann56

Recommended Posts

Hey guys,

I have a little problem.

When i enter the script here and enter the marker i do not get the gui.

Please help -

CLIENT SIDE SCRIPT -

thePed = createPed (155,-1720.0400390625, 1356.6455078125, 7.1875, 121.70565795898 ) 
GUIEditor = { 
    button = {}, 
    window = {}, 
    label = {} 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        GUIEditor.window[1] = guiCreateWindow(308, 173, 399, 425, "Pizza Job", false) 
        guiWindowSetMovable(GUIEditor.window[1], false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
  
        GUIEditor.label[1] = guiCreateLabel(14, 31, 365, 63, "   Well Stacked Pizza Co.", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.label[1], "sa-header") 
        guiLabelSetColor(GUIEditor.label[1], 255, 255, 2) 
        GUIEditor.label[2] = guiCreateLabel(44, 111, 320, 124, "        Welcome to the Well Stacked Pizza Co.\n        You can employ now as a pizzaboy!\n        As a pizzaboy you have to deliver pizza's\n        throughout the town.\n        You will get money for that.\n\n        For help type /pizzahelp", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.label[2], "clear-normal") 
        GUIEditor.button[1] = guiCreateButton(96, 247, 215, 42, "Accept Job", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.button[1], "sa-header") 
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "C8FFFF00") 
        GUIEditor.button[2] = guiCreateButton(118, 307, 164, 36, "Leave Job", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.button[2], "sa-header") 
        guiSetProperty(GUIEditor.button[2], "NormalTextColour", "C8FD0802") 
        GUIEditor.button[3] = guiCreateButton(122, 368, 150, 32, "Close", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.button[3], "sa-header")    
        guiSetVisible ( GUIEditor.window[1], false)      
    end 
) 
pizzaguy = createMarker (-1721.0263671875, 1355.9541015625, 6.1805019378662, "cylinder", 1.25, 0,255,0,180 ) 
function MarkerHit(hitPlayer, matchingDimension) 
    function funct1 (theplayer , matchingDimension) 
     if isElementWithinMarker(thePlayer,pizzaguy) then 
     guiSetVisible ( GUIEditor.window[1], true) 
     else 
     outputChatBox("Error") 
     end 
     end 
end 
      
addEventHandler( "onClientMarkerHit", getRootElement(),MarkerHit) 

SERVER SIDE SCRIPT -

createBlip ( -1723.74, 1359.68, 6.18, 29, 2, 0, 0, 0, 255, 0, 200 ) 
function help ()  
     outputChatBox("Pizza : In the pizza job you as a pizzaboy have to deliver pizzas to locations and you get money by delivering the package.") 
     end 
addCommandHandler("pizzahelp",help) 
  
  
createMarker ( -1723.74, 1359.68, 6.18, "cylinder" , 1.25 , 0, 255, 0, 180 ) 

i have a problem there it doesn't make that gui visible.

Some help would be welcome. :D

Edited by Guest
Link to comment

Wait wath ?

You created a function within a function :D

Look:

Client.lua

thePed = createPed (155,-1720.0400390625, 1356.6455078125, 7.1875, 121.70565795898 ) 
GUIEditor = { 
    button = {}, 
    window = {}, 
    label = {} 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        GUIEditor.window[1] = guiCreateWindow(308, 173, 399, 425, "Pizza Job", false) 
        guiWindowSetMovable(GUIEditor.window[1], false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
        guiSetVisible(GUIEditor.window[1], false) --I seted as invisible * 
  
        GUIEditor.label[1] = guiCreateLabel(14, 31, 365, 63, "   Well Stacked Pizza Co.", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.label[1], "sa-header") 
        guiLabelSetColor(GUIEditor.label[1], 255, 255, 2) 
        GUIEditor.label[2] = guiCreateLabel(44, 111, 320, 124, "        Welcome to the Well Stacked Pizza Co.\n        You can employ now as a pizzaboy!\n        As a pizzaboy you have to deliver pizza's\n        throughout the town.\n        You will get money for that.\n\n        For help type /pizzahelp", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.label[2], "clear-normal") 
        GUIEditor.button[1] = guiCreateButton(96, 247, 215, 42, "Accept Job", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.button[1], "sa-header") 
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "C8FFFF00") 
        GUIEditor.button[2] = guiCreateButton(118, 307, 164, 36, "Leave Job", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.button[2], "sa-header") 
        guiSetProperty(GUIEditor.button[2], "NormalTextColour", "C8FD0802") 
        GUIEditor.button[3] = guiCreateButton(122, 368, 150, 32, "Close", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.button[3], "sa-header")   
        guiSetVisible ( GUIEditor.window[1], false)     
    end 
) 
pizzaguy = createMarker (-1721.0263671875, 1355.9541015625, 6.1805019378662, "cylinder", 1.25, 0,255,0,180 ) 
function MarkerHit(thePlayer, matchingDimension) 
    if isElementWithinMarker(thePlayer,pizzaguy) then 
     guiSetVisible ( GUIEditor.window[1], true) 
    else 
     outputChatBox("Error") 
    end 
end 
      
addEventHandler( "onClientMarkerHit", getRootElement(),MarkerHit) 

And for creating a ped use this :

ped = createPed ( ID , x, y, z, rot, true) 
pedCol = createColSphere ( x, y, z, radius) 
attachElements(pedCol, ped) 
createBlipAttachedTo(ped, BlipID) --Add an blip  

Edited by Guest
Link to comment
Not working

Server

function MarkerHit(hitPlayer) 
  triggerClientEvent (hitPlayer,"openWindow",getRootElement(),hitPlayer) 
end 
addEventHandler("onMarkerHit", pizzaguy, MarkerHit) 

Client

function Window() 
guiSetVisible(gun.window[1], true) 
showCursor(true) 
end 
addEvent("openWindow",true) 
addEventHandler("openWindow", getRootElement(), Window) 

Link to comment

Still not working.

I send u whole thing again with some changes

Server

createBlip ( -1723.74, 1359.68, 6.18, 29, 2, 0, 0, 0, 255, 0, 200 ) 
function help ()  
     outputChatBox("Pizza : In the pizza job you as a pizzaboy have to deliver pizzas to locations and you get money by delivering the package.") 
     end 
addCommandHandler("pizzahelp",help) 
  
  
createMarker ( -1723.74, 1359.68, 6.18, "cylinder" , 1.25 , 0, 255, 0, 180 ) 
local pizzaguy = createMarker (-1721.0263671875, 1355.9541015625, 6.1805019378662, "cylinder", 1.25, 0,255,0,180 ) 
function MarkerHit(hitPlayer) 
  triggerClientEvent (hitPlayer,"openWindow",getRootElement(),hitPlayer) 
end 
addEventHandler("onMarkerHit", pizzaguy, MarkerHit) 

Client

thePed = createPed (155,-1720.0400390625, 1356.6455078125, 7.1875, 121.70565795898 ) 
GUIEditor = { 
    button = {}, 
    window = {}, 
    label = {} 
} 
  
    function Window() 
        GUIEditor.window[1] = guiCreateWindow(308, 173, 399, 425, "Pizza Job", false) 
        guiWindowSetMovable(GUIEditor.window[1], false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
  
        GUIEditor.label[1] = guiCreateLabel(14, 31, 365, 63, "   Well Stacked Pizza Co.", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.label[1], "sa-header") 
        guiLabelSetColor(GUIEditor.label[1], 255, 255, 2) 
        GUIEditor.label[2] = guiCreateLabel(44, 111, 320, 124, "        Welcome to the Well Stacked Pizza Co.\n        You can employ now as a pizzaboy!\n        As a pizzaboy you have to deliver pizza's\n        throughout the town.\n        You will get money for that.\n\n        For help type /pizzahelp", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.label[2], "clear-normal") 
        GUIEditor.button[1] = guiCreateButton(96, 247, 215, 42, "Accept Job", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.button[1], "sa-header") 
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "C8FFFF00") 
        GUIEditor.button[2] = guiCreateButton(118, 307, 164, 36, "Leave Job", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.button[2], "sa-header") 
        guiSetProperty(GUIEditor.button[2], "NormalTextColour", "C8FD0802") 
        GUIEditor.button[3] = guiCreateButton(122, 368, 150, 32, "Close", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.button[3], "sa-header")    
        guiSetVisible(GUIEditor.window[1],true) 
        showCursor (true)        
    end 
  
  
addEvent ("openWindow",true) 
addEventHandler("openWindow",getRootElement(),Window) 

Link to comment
Still not working.

I send u whole thing again with some changes

Server

createBlip ( -1723.74, 1359.68, 6.18, 29, 2, 0, 0, 0, 255, 0, 200 ) 
function help ()  
     outputChatBox("Pizza : In the pizza job you as a pizzaboy have to deliver pizzas to locations and you get money by delivering the package.") 
     end 
addCommandHandler("pizzahelp",help) 
  
  
createMarker ( -1723.74, 1359.68, 6.18, "cylinder" , 1.25 , 0, 255, 0, 180 ) 
local pizzaguy = createMarker (-1721.0263671875, 1355.9541015625, 6.1805019378662, "cylinder", 1.25, 0,255,0,180 ) 
function MarkerHit(hitPlayer) 
  triggerClientEvent (hitPlayer,"openWindow",getRootElement(),hitPlayer) 
end 
addEventHandler("onMarkerHit", pizzaguy, MarkerHit) 

Client

thePed = createPed (155,-1720.0400390625, 1356.6455078125, 7.1875, 121.70565795898 ) 
GUIEditor = { 
    button = {}, 
    window = {}, 
    label = {} 
} 
  
    function Window() 
        GUIEditor.window[1] = guiCreateWindow(308, 173, 399, 425, "Pizza Job", false) 
        guiWindowSetMovable(GUIEditor.window[1], false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
  
        GUIEditor.label[1] = guiCreateLabel(14, 31, 365, 63, "   Well Stacked Pizza Co.", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.label[1], "sa-header") 
        guiLabelSetColor(GUIEditor.label[1], 255, 255, 2) 
        GUIEditor.label[2] = guiCreateLabel(44, 111, 320, 124, "        Welcome to the Well Stacked Pizza Co.\n        You can employ now as a pizzaboy!\n        As a pizzaboy you have to deliver pizza's\n        throughout the town.\n        You will get money for that.\n\n        For help type /pizzahelp", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.label[2], "clear-normal") 
        GUIEditor.button[1] = guiCreateButton(96, 247, 215, 42, "Accept Job", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.button[1], "sa-header") 
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "C8FFFF00") 
        GUIEditor.button[2] = guiCreateButton(118, 307, 164, 36, "Leave Job", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.button[2], "sa-header") 
        guiSetProperty(GUIEditor.button[2], "NormalTextColour", "C8FD0802") 
        GUIEditor.button[3] = guiCreateButton(122, 368, 150, 32, "Close", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.button[3], "sa-header")    
        guiSetVisible(GUIEditor.window[1],true) 
        showCursor (true)        
    end 
  
  
addEvent ("openWindow",true) 
addEventHandler("openWindow",getRootElement(),Window) 

Look this must work :

Client.lua

thePed = createPed (155,-1720.0400390625, 1356.6455078125, 7.1875, 121.70565795898 ) 
GUIEditor = { 
    button = {}, 
    window = {}, 
    label = {} 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        GUIEditor.window[1] = guiCreateWindow(308, 173, 399, 425, "Pizza Job", false) 
        guiWindowSetMovable(GUIEditor.window[1], false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
        guiSetVisible(GUIEditor.window[1], false) --I seted as invisible * 
  
        GUIEditor.label[1] = guiCreateLabel(14, 31, 365, 63, "   Well Stacked Pizza Co.", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.label[1], "sa-header") 
        guiLabelSetColor(GUIEditor.label[1], 255, 255, 2) 
        GUIEditor.label[2] = guiCreateLabel(44, 111, 320, 124, "        Welcome to the Well Stacked Pizza Co.\n        You can employ now as a pizzaboy!\n        As a pizzaboy you have to deliver pizza's\n        throughout the town.\n        You will get money for that.\n\n        For help type /pizzahelp", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.label[2], "clear-normal") 
        GUIEditor.button[1] = guiCreateButton(96, 247, 215, 42, "Accept Job", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.button[1], "sa-header") 
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "C8FFFF00") 
        GUIEditor.button[2] = guiCreateButton(118, 307, 164, 36, "Leave Job", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.button[2], "sa-header") 
        guiSetProperty(GUIEditor.button[2], "NormalTextColour", "C8FD0802") 
        GUIEditor.button[3] = guiCreateButton(122, 368, 150, 32, "Close", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.button[3], "sa-header")   
    end 
) 
  
function Window() 
guiSetVisible(gun.window[1], true) 
showCursor(true) 
end 
addEvent("openWindow",true) 
addEventHandler("openWindow", getRootElement(), Window) 

Server.lua

pizzaguy = createMarker (-1721.0263671875, 1355.9541015625, 6.1805019378662, "cylinder", 1.25, 0,255,0,180 ) 
  
function MarkerHit(hitPlayer) 
  triggerClientEvent (hitPlayer,"openWindow",getRootElement(),hitPlayer) 
end 
addEventHandler("onMarkerHit", pizzaguy, MarkerHit) 
  
createBlip ( -1723.74, 1359.68, 6.18, 29, 2, 0, 0, 0, 255, 0, 200 ) 
function help () 
     outputChatBox("Pizza : In the pizza job you as a pizzaboy have to deliver pizzas to locations and you get money by delivering the package.") 
     end 
addCommandHandler("pizzahelp",help) 

Link to comment

I also have this same problem can i get help please... my my script is for atm this is my first script i even dont know server and client what should i do please help me :

This is my Script :

GUIEditor = {

button = {},

window = {},

edit = {},

label = {}

}

addEventHandler("onClientResourceStart", resourceRoot,

function()

GUIEditor.window[1] = guiCreateWindow(438, 193, 457, 300, "WELCOME TO INDIAN REALLIFE BANK SYSTEM", false)

guiWindowSetSizable(GUIEditor.window[1], false)

GUIEditor.label[1] = guiCreateLabel(18, 27, 165, 16, "Deposit/Withdraw money :-", false, GUIEditor.window[1])

GUIEditor.label[2] = guiCreateLabel(21, 58, 100, 24, "Enter Amount :", false, GUIEditor.window[1])

GUIEditor.edit[1] = guiCreateEdit(111, 58, 140, 23, "", false, GUIEditor.window[1])

GUIEditor.button[1] = guiCreateButton(59, 108, 62, 33, "Deposit", false, GUIEditor.window[1])

GUIEditor.button[2] = guiCreateButton(148, 108, 61, 33, "Withdraw", false, GUIEditor.window[1])

GUIEditor.label[3] = guiCreateLabel(23, 158, 98, 17, "Transfer Money :-", false, GUIEditor.window[1])

GUIEditor.label[4] = guiCreateLabel(24, 195, 82, 16, "Player Name :", false, GUIEditor.window[1])

GUIEditor.label[5] = guiCreateLabel(45, 221, 61, 15, "Amount :", false, GUIEditor.window[1])

GUIEditor.label[6] = guiCreateLabel(51, 246, 55, 15, "Reason :", false, GUIEditor.window[1])

GUIEditor.edit[2] = guiCreateEdit(111, 191, 180, 21, "", false, GUIEditor.window[1])

GUIEditor.edit[3] = guiCreateEdit(116, 222, 175, 20, "", false, GUIEditor.window[1])

GUIEditor.edit[4] = guiCreateEdit(119, 251, 172, 32, "", false, GUIEditor.window[1])

GUIEditor.button[3] = guiCreateButton(310, 195, 130, 88, "TRANSFER", false, GUIEditor.window[1])

GUIEditor.label[7] = guiCreateLabel(300, 29, 139, 14, "..:: INFORMATION ::..", false, GUIEditor.window[1])

GUIEditor.label[8] = guiCreateLabel(300, 58, 111, 19, "Account Balance :-", false, GUIEditor.window[1])

GUIEditor.edit[5] = guiCreateEdit(1, 23, 85, 45, "", false, GUIEditor.label[8])

GUIEditor.edit[6] = guiCreateEdit(294, 83, 154, 27, "", false, GUIEditor.window[1])

guiSetProperty(GUIEditor.edit[6], "ReadOnly", "True")

end

)

atm1 = createMarker(-1981.25061035156, 144.93418884277, 26.6875,"cylinder",0.5,150,255,150,150)

addEventHandler("OnClientMarkerHit", atm1, GUIEditor.window[1])

atm={}

function spawnAutomat()

object1 = createObject ( 2942, 2228.47265625, -1718.3818359375, 13.195591926575, 0, 0, 270 )

object2 = createObject ( 2942, 1971.3970947266, -1967.5892333984, 13.193042755127, 0, 0, 272 )

object3 = createObject ( 2942, 1680.2379150391, -2335.6240234375, 13.189774513245, 0, 0, 180 )

object4 = createObject ( 2942, 1690.9001464844, 2237.4145507813, 13.182520866394, 0, 0, 0 )

object5 = createObject ( 2942, 2743.6411132813, -1827.0910644531, 11.480994224548, 0, 0, 0 )

object6 = createObject ( 2942, 2707.5959472656, -1699.9862060547, 11.486649513245, 0, 0, 202 )

object7 = createObject ( 2942, 2043.9069824219, -1411.2502441406, 16.80696105957, 0, 0, 268 )

object8 = createObject ( 2942, 1327.068359375, -1553.8465576172, 13.182555198669, 0, 0, 260 )

object9 = createObject ( 2942, 1076.3173828125, -1697.923828125, 13.189774513245, 0, 0, 0 )

object11 = createObject ( 2942, 1728.0220947266, -1942.9620361328, 13.214936256409, 0, 0, 0 )

object12 = createObject ( 2942, 1928.53515625, -1770.8642578125, 13.189774513245, 0, 0, 90 )

object13 = createObject ( 2942, 2202.8220214844, -1489.9569091797, 23.62727355957, 0, 0, 90 )

object14 = createObject ( 2942, 2353.3610839844, -1503.4688720703, 23.64289855957, 0, 0, 270 )

object15 = createObject ( 2942, 2559.2473144531, -1266.4305419922, 45.29496383667, 0, 0, 180 )

object16 = createObject ( 2942, 2685.5744628906, -1422.0463867188, 30.149002075195, 0, 0, 272 )

object17 = createObject ( 2942, 2857.8657226563, -1515.9211425781, 10.671099662781, 0, 0, 82 )

object18 = createObject ( 2942, 2773.8974609375, -2446.8566894531, 13.279954910278, 0, 0, 272 )

object20 = createObject ( 2942, 1492.3729248047, -1149.2877197266, 23.72102355957, 0, 0, 270 )

object21 = createObject ( 2942, 1678.6971435547, -1170.7097167969, 23.546043395996, 0, 0, 180 )

object22 = createObject ( 2942, 1961.8123779297, -1228.7836914063, 19.657657623291, 0, 0, 278 )

object23 = createObject ( 2942, 1672.9250488281, -1614.0903320313, 13.189774513245, 0, 0, 180 )

object24 = createObject ( 2942, 1556.6782226563, -1862.5854492188, 13.189774513245, 0, 0, 0 )

object25 = createObject ( 2942, 1147.091796875, -1833.4669189453, 13.237509727478, 0, 0, 0 )

object26 = createObject ( 2942, 1136.1779785156, -1562.5493164063, 13.194001197815, 0, 0, 0 )

object27 = createObject ( 2942, 1094.7409667969, -1431.4893798828, 22.413867950439, 0, 0, 90 )

object28 = createObject ( 2942, 1286.8798828125, -1311.8739013672, 13.191741943359, 0, 0, 272 )

object29 = createObject ( 2942, 1286.8798828125, -1311.8739013672, 13.191741943359, 0, 0, 272 )

object30 = createObject ( 2942, 1041.8751220703, -1473.2495117188, 13.189774513245, 0, 0, 92 )

object31 = createObject ( 2942, 834.30853271484, -1337.1392822266, 13.189774513245, 0, 0, 180 )

object32 = createObject ( 2942, 600.68127441406, -1750.0419921875, 12.978031158447, 0, 0, 167.99719238281 )

object33 = createObject ( 2942, 351.65625, -1490.02734375, 35.68196105957, 0, 0, 33.997192382813 )

object34 = createObject ( 2942, 2101.9929199219, -1650.3162841797, 13.093070030212, 0, 0, 276 )

object35 = createObject ( 2942, 1729.0706787109, -1682.5516357422, 13.195471763611, 0, 0, 0 )

object36 = createObject ( 2942, 1494.5341796875, -1765.2403564453, 18.438655853271, 0, 0, 270 )

object37 = createObject ( 2942, 1144.2629394531, -1532.3948974609, 22.39289855957, 0, 0, 204 )

object38 = createObject ( 2942, 1162.2124023438, -1778.7252197266, 13.259280204773, 0, 0, 90 )

object39 = createObject ( 2942, 1683.9486083984, -1963.6971435547, 13.760087013245, 0, 0, 90 )

object40 = createObject ( 2942, 1748.9478759766, -1863.6293945313, 13.217739105225, 0, 0, 180 )

object41 = createObject ( 2942, 1973.0268554688, -2176.2736816406, 13.183491706848, 0, 0, 180 )

object42 = createObject ( 2942, 360.64010620117, -1804.8472900391, 4.333348274231, 0, 0, 270 )

object43 = createObject ( 2942, 491.25128173828, -1332.0928955078, 15.628237724304, 0, 0, 106 )

object44 = createObject ( 2942, 1001.5576782227, -927.07891845703, 41.97102355957, 0, 0, 278 )

object45 = createObject ( 2942, 1854.5206298828, -1069.3031005859, 23.583419799805, 0, 0, 180 )

object46 = createObject ( 2942, 1567.8078613281, -1326.7420654297, 16.12727355957, 0, 0, 90 )

object47 = createObject ( 2942, 549.29681396484, -1341.2327880859, 13.657977104187, 0, 0, 195.5 )

object48 = createObject ( 2942, 1029.8607177734, -1342.1672363281, 13.369462013245, 0, 0, 272 )

object49 = createObject ( 2942, 1385.7268066406, -1164.326171875, 23.46321105957, 0, 0, 90 )

object50 = createObject ( 2942, 1789.3221435547, -1371.1958007813, 15.400712013245, 0, 0, 272 )

object51 = createObject ( 2942, 2050.3583984375, -1091.9260253906, 24.263748168945, 0, 0, 160 )

-- San Fierro

object52 = createObject ( 2942, -2457.0346679688, 783.22381591797, 34.81477355957, 0, 0, 269.25 )

object53 = createObject ( 2942, -2224.3918457031, 611.61071777344, 34.80696105957, 0, 0, 0 )

object54 = createObject ( 2942, -1965.1278076172, 561.80377197266, 34.831832885742, 0, 0, 180 )

object55 = createObject ( 2942, -1980.5900878906, 144.95135498047, 27.33039855957, 0, 0, 268 )

object56 = createObject ( 2942, -1871.8146972656, -145.98046875, 11.516337394714, 0, 0, 180 )

object57 = createObject ( 2942, -1704.3116455078, -73.481521606445, 3.2017202377319, 0, 0, 226 )

object58 = createObject ( 2942, -1546.4652099609, -445.13830566406, 5.6781568527222, 0, 0, 224 )

object59 = createObject ( 2942, -1828.7436523438, -3.1194763183594, 14.760087013245, 0, 0, 90 )

object60 = createObject ( 2942, -1709.4559326172, 409.10064697266, 6.7975869178772, 0, 0, 44 )

object61 = createObject ( 2942, -1806.369140625, 951.30993652344, 24.433525085449, 0, 0, 92 )

object62 = createObject ( 2942, -2441.5986328125, 1028.6790771484, 50.03352355957, 0, 0, 180 )

object63 = createObject ( 2942, -2765.3203125, 372.14266967773, 5.9826860427856, 0, 0, 90 )

object64 = createObject ( 2942, -2581.0515136719, 316.8850402832, 4.8225870132446, 0, 0, 268.25 )

object65 = createObject ( 2942, -2635.8972167969, 208.46903991699, 3.9243896007538, 0, 0, 180 )

object66 = createObject ( 2942, -1891.9760742188, 277.30923461914, 40.68977355957, 0, 0, 0 )

object67 = createObject ( 2942, -2657.4685058594, 1360.2062988281, 6.691029548645, 0, 0, 0 )

object68 = createObject ( 2942, -2863.7309570313, 1252.2008056641, 6.7444620132446, 0, 0, 48.5 )

object69 = createObject ( 2942, -2665.3439941406, -5.5053572654724, 5.7757120132446, 0, 0, 270 )

object70 = createObject ( 2942, -1717.6584472656, 1354.63671875, 6.8228788375854, 0, 0, 317.75 )

object71 = createObject ( 2942, -2102.4753417969, -48.804546356201, 34.96321105957, 0, 0, 90 )

object72 = createObject ( 2942, -1968.1737060547, 309.47451782227, 34.81477355957, 0, 0, 0 )

object73 = createObject ( 2942, -2020.6721191406, 1101.1203613281, 52.93196105957, 0, 0, 0 )

object74 = createObject ( 2942, -2454.8706054688, -141.12776184082, 25.708024978638, 0, 0, 270 )

object75 = createObject ( 2942, -2242.2453613281, -100.40567016602, 34.905410766602, 0, 0, 270 )

object76 = createObject (2942, -1394.9974365234, -342.56555175781, 5.6428995132446, 0, 0, 158 )

-- Los Santos

object77 = createObject (2942, 1017, 1300.9000244141, 10.5, 0, 0, 270.87548828125 )

object78 = createObject (2942, 2113.5, 945.5, 10.5, 0, 0, 0 )

end

addEventHandler ("onResourceStart", getResourceRootElement(getThisResource()), spawnAutomat )

Link to comment
Still not working.

I send u whole thing again with some changes

Server

createBlip ( -1723.74, 1359.68, 6.18, 29, 2, 0, 0, 0, 255, 0, 200 ) 
function help ()  
     outputChatBox("Pizza : In the pizza job you as a pizzaboy have to deliver pizzas to locations and you get money by delivering the package.") 
     end 
addCommandHandler("pizzahelp",help) 
  
  
createMarker ( -1723.74, 1359.68, 6.18, "cylinder" , 1.25 , 0, 255, 0, 180 ) 
local pizzaguy = createMarker (-1721.0263671875, 1355.9541015625, 6.1805019378662, "cylinder", 1.25, 0,255,0,180 ) 
function MarkerHit(hitPlayer) 
  triggerClientEvent (hitPlayer,"openWindow",getRootElement(),hitPlayer) 
end 
addEventHandler("onMarkerHit", pizzaguy, MarkerHit) 

Client

thePed = createPed (155,-1720.0400390625, 1356.6455078125, 7.1875, 121.70565795898 ) 
GUIEditor = { 
    button = {}, 
    window = {}, 
    label = {} 
} 
  
    function Window() 
        GUIEditor.window[1] = guiCreateWindow(308, 173, 399, 425, "Pizza Job", false) 
        guiWindowSetMovable(GUIEditor.window[1], false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
  
        GUIEditor.label[1] = guiCreateLabel(14, 31, 365, 63, "   Well Stacked Pizza Co.", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.label[1], "sa-header") 
        guiLabelSetColor(GUIEditor.label[1], 255, 255, 2) 
        GUIEditor.label[2] = guiCreateLabel(44, 111, 320, 124, "        Welcome to the Well Stacked Pizza Co.\n        You can employ now as a pizzaboy!\n        As a pizzaboy you have to deliver pizza's\n        throughout the town.\n        You will get money for that.\n\n        For help type /pizzahelp", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.label[2], "clear-normal") 
        GUIEditor.button[1] = guiCreateButton(96, 247, 215, 42, "Accept Job", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.button[1], "sa-header") 
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "C8FFFF00") 
        GUIEditor.button[2] = guiCreateButton(118, 307, 164, 36, "Leave Job", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.button[2], "sa-header") 
        guiSetProperty(GUIEditor.button[2], "NormalTextColour", "C8FD0802") 
        GUIEditor.button[3] = guiCreateButton(122, 368, 150, 32, "Close", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.button[3], "sa-header")    
        guiSetVisible(GUIEditor.window[1],true) 
        showCursor (true)        
    end 
  
  
addEvent ("openWindow",true) 
addEventHandler("openWindow",getRootElement(),Window) 

Look this must work :

Client.lua

thePed = createPed (155,-1720.0400390625, 1356.6455078125, 7.1875, 121.70565795898 ) 
GUIEditor = { 
    button = {}, 
    window = {}, 
    label = {} 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        GUIEditor.window[1] = guiCreateWindow(308, 173, 399, 425, "Pizza Job", false) 
        guiWindowSetMovable(GUIEditor.window[1], false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
        guiSetVisible(GUIEditor.window[1], false) --I seted as invisible * 
  
        GUIEditor.label[1] = guiCreateLabel(14, 31, 365, 63, "   Well Stacked Pizza Co.", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.label[1], "sa-header") 
        guiLabelSetColor(GUIEditor.label[1], 255, 255, 2) 
        GUIEditor.label[2] = guiCreateLabel(44, 111, 320, 124, "        Welcome to the Well Stacked Pizza Co.\n        You can employ now as a pizzaboy!\n        As a pizzaboy you have to deliver pizza's\n        throughout the town.\n        You will get money for that.\n\n        For help type /pizzahelp", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.label[2], "clear-normal") 
        GUIEditor.button[1] = guiCreateButton(96, 247, 215, 42, "Accept Job", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.button[1], "sa-header") 
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "C8FFFF00") 
        GUIEditor.button[2] = guiCreateButton(118, 307, 164, 36, "Leave Job", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.button[2], "sa-header") 
        guiSetProperty(GUIEditor.button[2], "NormalTextColour", "C8FD0802") 
        GUIEditor.button[3] = guiCreateButton(122, 368, 150, 32, "Close", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.button[3], "sa-header")   
    end 
) 
  
function Window() 
guiSetVisible(gun.window[1], true) 
showCursor(true) 
end 
addEvent("openWindow",true) 
addEventHandler("openWindow", getRootElement(), Window) 

Server.lua

pizzaguy = createMarker (-1721.0263671875, 1355.9541015625, 6.1805019378662, "cylinder", 1.25, 0,255,0,180 ) 
  
function MarkerHit(hitPlayer) 
  triggerClientEvent (hitPlayer,"openWindow",getRootElement(),hitPlayer) 
end 
addEventHandler("onMarkerHit", pizzaguy, MarkerHit) 
  
createBlip ( -1723.74, 1359.68, 6.18, 29, 2, 0, 0, 0, 255, 0, 200 ) 
function help () 
     outputChatBox("Pizza : In the pizza job you as a pizzaboy have to deliver pizzas to locations and you get money by delivering the package.") 
     end 
addCommandHandler("pizzahelp",help) 

Still not working :(

Link to comment

what about this ???

pizzaguy = createMarker (-1721.0263671875, 1355.9541015625, 6.1805019378662, "cylinder", 1.25, 0,255,0,180 ) 
createBlip ( -1723.74, 1359.68, 6.18, 29, 2, 0, 0, 0, 255, 0, 200 )  
  
function MarkerHit(hitPlayer) 
  if (getElementType(hitPlayer) == "player" ) and not isPedInVehicle(hitPlayer) then  
  triggerClientEvent (hitPlayer,"openWindow",getRootElement(),hitPlayer) 
end  
end 
addEventHandler("onMarkerHit", pizzaguy, MarkerHit) 
  
  
function help () 
     outputChatBox("Pizza : In the pizza job you as a pizzaboy have to deliver pizzas to locations and you get money by delivering the package.") 
     end 
addCommandHandler("pizzahelp",help) 

Link to comment
Hey guys,

I have a little problem.

When i enter the script here and enter the marker i do not get the gui.

Please help -

CLIENT SIDE SCRIPT -

thePed = createPed (155,-1720.0400390625, 1356.6455078125, 7.1875, 121.70565795898 ) 
GUIEditor = { 
    button = {}, 
    window = {}, 
    label = {} 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        GUIEditor.window[1] = guiCreateWindow(308, 173, 399, 425, "Pizza Job", false) 
        guiWindowSetMovable(GUIEditor.window[1], false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
  
        GUIEditor.label[1] = guiCreateLabel(14, 31, 365, 63, "   Well Stacked Pizza Co.", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.label[1], "sa-header") 
        guiLabelSetColor(GUIEditor.label[1], 255, 255, 2) 
        GUIEditor.label[2] = guiCreateLabel(44, 111, 320, 124, "        Welcome to the Well Stacked Pizza Co.\n        You can employ now as a pizzaboy!\n        As a pizzaboy you have to deliver pizza's\n        throughout the town.\n        You will get money for that.\n\n        For help type /pizzahelp", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.label[2], "clear-normal") 
        GUIEditor.button[1] = guiCreateButton(96, 247, 215, 42, "Accept Job", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.button[1], "sa-header") 
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "C8FFFF00") 
        GUIEditor.button[2] = guiCreateButton(118, 307, 164, 36, "Leave Job", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.button[2], "sa-header") 
        guiSetProperty(GUIEditor.button[2], "NormalTextColour", "C8FD0802") 
        GUIEditor.button[3] = guiCreateButton(122, 368, 150, 32, "Close", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.button[3], "sa-header")    
        guiSetVisible ( GUIEditor.window[1], false)      
    end 
) 
pizzaguy = createMarker (-1721.0263671875, 1355.9541015625, 6.1805019378662, "cylinder", 1.25, 0,255,0,180 ) 
function MarkerHit(hitPlayer, matchingDimension) 
    function funct1 (theplayer , matchingDimension) 
     if isElementWithinMarker(thePlayer,pizzaguy) then 
     guiSetVisible ( GUIEditor.window[1], true) 
     else 
     outputChatBox("Error") 
     end 
     end 
end 
      
addEventHandler( "onClientMarkerHit", getRootElement(),MarkerHit) 

SERVER SIDE SCRIPT -

createBlip ( -1723.74, 1359.68, 6.18, 29, 2, 0, 0, 0, 255, 0, 200 ) 
function help ()  
     outputChatBox("Pizza : In the pizza job you as a pizzaboy have to deliver pizzas to locations and you get money by delivering the package.") 
     end 
addCommandHandler("pizzahelp",help) 
  
  
createMarker ( -1723.74, 1359.68, 6.18, "cylinder" , 1.25 , 0, 255, 0, 180 ) 

i have a problem there it doesn't make that gui visible.

Some help would be welcome. :D

addEventHandler( "onClientMarkerHit", getRootElement(),MarkerHit) 

You should write the marker's name not "getRootElement()". So the change it with:

local marker = createMarker ( -1723.74, 1359.68, 6.18, "cylinder" , 1.25 , 0, 255, 0, 180 ) 
addEventHandler( "onClientMarkerHit", marker ,MarkerHit) -- Set a name for your marker and add the event handker like this.[ 

Link to comment

Server :

pizzaguy = createMarker (-1721.0263671875, 1355.9541015625, 6.1805019378662, "cylinder", 1.25, 0,255,0,180 ) 
createBlip ( -1723.74, 1359.68, 6.18, 29, 2, 0, 0, 0, 255, 0, 200 ) 
  
function MarkerHit(hitPlayer) 
  if (getElementType(hitPlayer) == "player" ) and not isPedInVehicle(hitPlayer) then 
  triggerClientEvent (hitPlayer,"openWindow",getRootElement(),hitPlayer) 
end 
end 
addEventHandler("onMarkerHit", pizzaguy, MarkerHit) 
  
  
function help () 
     outputChatBox("Pizza : In the pizza job you as a pizzaboy have to deliver pizzas to locations and you get money by delivering the package.") 
     end 
addCommandHandler("pizzahelp",help) 

Client :

GUIEditor = { 
    button = {}, 
    window = {}, 
    label = {} 
} 
  
    function Window() 
        GUIEditor.window[1] = guiCreateWindow(308, 173, 399, 425, "Pizza Job", false) 
        guiWindowSetMovable(GUIEditor.window[1], false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
  
        GUIEditor.label[1] = guiCreateLabel(14, 31, 365, 63, "   Well Stacked Pizza Co.", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.label[1], "sa-header") 
        guiLabelSetColor(GUIEditor.label[1], 255, 255, 2) 
        GUIEditor.label[2] = guiCreateLabel(44, 111, 320, 124, "        Welcome to the Well Stacked Pizza Co.\n        You can employ now as a pizzaboy!\n        As a pizzaboy you have to deliver pizza's\n        throughout the town.\n        You will get money for that.\n\n        For help type /pizzahelp", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.label[2], "clear-normal") 
        GUIEditor.button[1] = guiCreateButton(96, 247, 215, 42, "Accept Job", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.button[1], "sa-header") 
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "C8FFFF00") 
        GUIEditor.button[2] = guiCreateButton(118, 307, 164, 36, "Leave Job", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.button[2], "sa-header") 
        guiSetProperty(GUIEditor.button[2], "NormalTextColour", "C8FD0802") 
        GUIEditor.button[3] = guiCreateButton(122, 368, 150, 32, "Close", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.button[3], "sa-header")   
        guiSetVisible(GUIEditor.window[1],true) 
        showCursor (true)       
    end 
  
  
addEvent ("openWindow",true) 
addEventHandler("openWindow",getRootElement(),Window) 
  
  
thePed = createPed (155,-1720.0400390625, 1356.6455078125, 7.1875, 121.70565795898 ) 
GUIEditor = { 
    button = {}, 
    window = {}, 
    label = {} 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        GUIEditor.window[1] = guiCreateWindow(308, 173, 399, 425, "Pizza Job", false) 
        guiWindowSetMovable(GUIEditor.window[1], false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
        guiSetVisible(GUIEditor.window[1], false) --I seted as invisible * 
  
        GUIEditor.label[1] = guiCreateLabel(14, 31, 365, 63, "   Well Stacked Pizza Co.", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.label[1], "sa-header") 
        guiLabelSetColor(GUIEditor.label[1], 255, 255, 2) 
        GUIEditor.label[2] = guiCreateLabel(44, 111, 320, 124, "        Welcome to the Well Stacked Pizza Co.\n        You can employ now as a pizzaboy!\n        As a pizzaboy you have to deliver pizza's\n        throughout the town.\n        You will get money for that.\n\n        For help type /pizzahelp", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.label[2], "clear-normal") 
        GUIEditor.button[1] = guiCreateButton(96, 247, 215, 42, "Accept Job", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.button[1], "sa-header") 
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "C8FFFF00") 
        GUIEditor.button[2] = guiCreateButton(118, 307, 164, 36, "Leave Job", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.button[2], "sa-header") 
        guiSetProperty(GUIEditor.button[2], "NormalTextColour", "C8FD0802") 
        GUIEditor.button[3] = guiCreateButton(122, 368, 150, 32, "Close", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.button[3], "sa-header")   
    end 
) 
  
function Window() 
guiSetVisible(GUIEditor.window[1], true) 
showCursor(true) 
end 
addEvent("openWindow",true) 
addEventHandler("openWindow", getRootElement(), Window) 

Edited by Guest
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...