-
Posts
306 -
Joined
-
Last visited
Everything posted by Mann56
-
Thanks JR10!! Now I dont have to open the wiki again and again:-) :-) . Really a big big thanks
-
Hey guys ! I made a pizza job. When i click button1 it doesn't work any suggestions of the error? 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 startJobb(thePlayer) local team = getPlayerTeam(thePlayer) if team == "Pizza" then outputChatBox("You are already employed.",getRootElement(),255,255,0) else setPlayerTeam(thePlayer,"Pizza") outputChatBox("You are now employed as a Pizzaboy!",getRootElement(),255,255,0) end end addEvent("startTheJob",true) addEventHandler("startTheJob",getRootElement(),startJobb) 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 : 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") button1 = guiCreateButton(96, 247, 215, 42, "Accept Job", false, GUIEditor.window[1]) guiSetFont(button1, "sa-header") guiSetProperty(button1, "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") button3 = guiCreateButton(122, 368, 150, 32, "Close", false, GUIEditor.window[1]) guiSetFont(button3, "sa-header") addEventHandler("onClientGUIClick",button3,closeJob,false) addEventHandler("onClientGUIClick",button3,startJob,false) end ) function Window() guiSetVisible(GUIEditor.window[1], true) showCursor(true) end addEvent("openWindow",true) addEventHandler("openWindow", getRootElement(), Window) function closeJob(button,state) if button=="left" and state=="up" then guiSetVisible(GUIEditor.window[1],false) showCursor(false) end end function startJob(button) local button = button1 if source == button then triggerServerEvent("startTheJob",source) guiSetVisible(GUIEditor.Window[1],false) showCursir(false) end end
-
Did you start your map? Loaded resources need to be started using : start in console or else start it from your admin panel
-
Hey guys! I'm new to mapping and need id's for the objects in map editor. Finding objects is too tiresome and difficult. In wiki there are only some material ID's like grass etc. which I don't want. Some help would be welcome Moreover at some places world objects come in my way how to remove them? I mean I used the world object remover but it deletes whole object but I want to remove only part of the object in my way.please help
-
Mate, Lacosta isn't wrong. ATM script will be very hard for you. Try something small . Anyway if u wanna continue u need a SQL db this may help you:https://forum.multitheftauto.com/viewtopic.php?f=148&t=38203 Note : Mysql is recommended than SqlLite
-
Gui appears:D CLIENT: atmGUI_Window = {} atmGUI_Button = {} atmGUI_Edit = {} atmGUI_Label = {} addEventHandler("onClientResourceStart",resourceRoot, function () atmGUI_Window[1] = guiCreateWindow(404, 193, 582, 393, "Bank Of San Andreas", false) guiWindowSetSizable(atmGUI_Window[1], false) atmGUI_Label[1] = guiCreateLabel(20, 227, 122, 27, "Transfer money :", false, atmGUI_Window[1]) atmGUI_Label[2] = guiCreateLabel(10, 31, 200, 37, "Deposit/Withdraw money", false, atmGUI_Window[1]) atmGUI_Label[3] = guiCreateLabel(20, 78, 84, 27, "Deposit :", false, atmGUI_Window[1]) atmGUI_Label[4] = guiCreateLabel(20, 122, 78, 29, "Withdraw :", false, atmGUI_Window[1]) atmGUI_Edit[1] = guiCreateEdit(88, 78, 171, 21, "", false, atmGUI_Window[1]) atmGUI_Edit[2] = guiCreateEdit(90, 124, 169, 21, "", false, atmGUI_Window[1]) atmGUI_Button[1] = guiCreateButton(58, 174, 69, 34, "Deposit", false, atmGUI_Window[1]) atmGUI_Button[2] = guiCreateButton(145, 174, 68, 35, "Withdraw", false, atmGUI_Window[1]) atmGUI_Label[5] = guiCreateLabel(20, 264, 94, 24, "Player name :", false, atmGUI_Window[1]) atmGUI_Label[6] = guiCreateLabel(20, 298, 92, 22, "Amount :", false, atmGUI_Window[1]) atmGUI_Label[7] = guiCreateLabel(21, 330, 83, 27, "Reason :", false, atmGUI_Window[1]) atmGUI_Edit[3] = guiCreateEdit(107, 266, 183, 22, "", false, atmGUI_Window[1]) atmGUI_Edit[4] = guiCreateEdit(107, 266, 183, 22, "", false, atmGUI_Window[1]) atmGUI_Edit[5] = guiCreateEdit(107, 266, 183, 22, "", false, atmGUI_Window[1]) atmGUI_Edit[6] = guiCreateEdit(107, 293, 183, 22, "", false, atmGUI_Window[1]) atmGUI_Edit[7] = guiCreateEdit(108, 320, 182, 37, "", false, atmGUI_Window[1]) atmGUI_Button[3] = guiCreateButton(349, 277, 166, 61, "Transfer", false, atmGUI_Window[1]) atmGUI_Label[8] = guiCreateLabel(390, 31, 182, 25, "..:: Information ::..", false, atmGUI_Window[1]) atmGUI_Label[9] = guiCreateLabel(316, 66, 142, 27, "Available amount :", false, atmGUI_Window[1]) atmGUI_Edit[8] = guiCreateEdit(316, 94, 142, 30, "", false, atmGUI_Window[1]) guiSetProperty(atmGUI_Edit[8], "ReadOnly", "True") guiSetVisible(atmGUI_Window[1],false) end ) marker1 = createMarker(-1981.25061035156, 144.93418884277, 26.6875,"cylinder",0.5,150,255,150,150) marker2 = createMarker(-1968.1596679688, 308.81167602539, 34.171875, "cylinder",0.5,150,255,150,150) marker3 = createMarker(-2101.8071289063, -48.789329528809, 34.3203125, "cylinder",0.5,150,255,150,150) marker4 = createMarker(-2764.6552734375, 372.16513061523, 5.3359375, "cylinder",0.5,150,255,150,150) function MarkerHit(thePlayer,matchingDimension) guiSetVisible(atmGUI_Window[1],true) end addEventHandler("onClientMarkerHit", getRootElement(), MarkerHit) SERVER : rootElement = getRootElement() function spawnatm() 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", rootElement, spawnatm ) Meta (incase anything missing) "syedosman" name="bank" version="2.0" type="script" /> Enjoy
-
Thanks:> This MUST work. Try it. atmGUI_Window = {} atmGUI_Button = {} atmGUI_Edit = {} atmGUI_Label = {} addEventHandler("onClientResourceStart",resourceRoot, function createatmGUI() atmGUI_Window[1] = guiCreateWindow(404, 193, 582, 393, "Bank Of San Andreas", false) guiWindowSetSizable(atmGUI_Window[1], false) table.insert(allGuis,atmGUI_Window[1]) atmGUI_Label[1] = guiCreateLabel(20, 227, 122, 27, "Transfer money :", false, atmGUI_Window[1]) atmGUI_Label[2] = guiCreateLabel(10, 31, 200, 37, "Deposit/Withdraw money", false, atmGUI_Window[1]) atmGUI_Label[3] = guiCreateLabel(20, 78, 84, 27, "Deposit :", false, atmGUI_Window[1]) atmGUI_Label[4] = guiCreateLabel(20, 122, 78, 29, "Withdraw :", false, atmGUI_Window[1]) atmGUI_Edit[1] = guiCreateEdit(88, 78, 171, 21, "", false, atmGUI_Window[1]) atmGUI_Edit[2] = guiCreateEdit(90, 124, 169, 21, "", false, atmGUI_Window[1]) atmGUI_Button[1] = guiCreateButton(58, 174, 69, 34, "Deposit", false, atmGUI_Window[1]) atmGUI_Button[2] = guiCreateButton(145, 174, 68, 35, "Withdraw", false, atmGUI_Window[1]) atmGUI_Label[5] = guiCreateLabel(20, 264, 94, 24, "Player name :", false, atmGUI_Window[1]) atmGUI_Label[6] = guiCreateLabel(20, 298, 92, 22, "Amount :", false, atmGUI_Window[1]) atmGUI_Label[7] = guiCreateLabel(21, 330, 83, 27, "Reason :", false, atmGUI_Window[1]) atmGUI_Edit[3] = guiCreateEdit(107, 266, 183, 22, "", false, atmGUI_Window[1]) atmGUI_Edit[4] = guiCreateEdit(107, 266, 183, 22, "", false, atmGUI_Window[1]) atmGUI_Edit[5] = guiCreateEdit(107, 266, 183, 22, "", false, atmGUI_Window[1]) atmGUI_Edit[6] = guiCreateEdit(107, 293, 183, 22, "", false, atmGUI_Window[1]) atmGUI_Edit[7] = guiCreateEdit(108, 320, 182, 37, "", false, atmGUI_Window[1]) atmGUI_Button[3] = guiCreateButton(349, 277, 166, 61, "Transfer", false, atmGUI_Window[1]) atmGUI_Label[8] = guiCreateLabel(390, 31, 182, 25, "..:: Information ::..", false, atmGUI_Window[1]) atmGUI_Label[9] = guiCreateLabel(316, 66, 142, 27, "Available amount :", false, atmGUI_Window[1]) atmGUI_Edit[8] = guiCreateEdit(316, 94, 142, 30, "", false, atmGUI_Window[1]) guiSetProperty(atmGUI_Edit[8], "ReadOnly", "True") guiSetVisible(atmGUI_Window[1],false) end ) marker1 = createMarker(-1981.25061035156, 144.93418884277, 26.6875,"cylinder",0.5,150,255,150,150) marker2 = createMarker(-1968.1596679688, 308.81167602539, 34.171875, "cylinder",0.5,150,255,150,150) marker3 = createMarker(-2101.8071289063, -48.789329528809, 34.3203125, "cylinder",0.5,150,255,150,150) marker4 = createMarker(-2764.6552734375, 372.16513061523, 5.3359375, "cylinder",0.5,150,255,150,150) function MarkerHit(thePlayer,matchingDimension) guiSetVisible(atmGUI_Window[1],true) end addEventHandler("onClientMarkerHit", getRootElement(), MarkerHit)
-
Well i caught the problem upto certain extent but still have a little problem in that thing (dunno what) here's the code i edited: Server : no edits rootElement = getRootElement() function spawnatm() 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", rootElement, spawnatm ) Client: (minor edits) atmGUI_Window = {} atmGUI_Button = {} atmGUI_Edit = {} atmGUI_Label = {} function createatmGUI() atmGUI_Window[1] = guiCreateWindow(404, 193, 582, 393, "Bank Of San Andreas", false) guiWindowSetSizable(atmGUI_Window[1], false) table.insert(allGuis,atmGUI_Window[1]) atmGUI_Label[1] = guiCreateLabel(20, 227, 122, 27, "Transfer money :", false, atmGUI_Window[1]) atmGUI_Label[2] = guiCreateLabel(10, 31, 200, 37, "Deposit/Withdraw money", false, atmGUI_Window[1]) atmGUI_Label[3] = guiCreateLabel(20, 78, 84, 27, "Deposit :", false, atmGUI_Window[1]) atmGUI_Label[4] = guiCreateLabel(20, 122, 78, 29, "Withdraw :", false, atmGUI_Window[1]) atmGUI_Edit[1] = guiCreateEdit(88, 78, 171, 21, "", false, atmGUI_Window[1]) atmGUI_Edit[2] = guiCreateEdit(90, 124, 169, 21, "", false, atmGUI_Window[1]) atmGUI_Button[1] = guiCreateButton(58, 174, 69, 34, "Deposit", false, atmGUI_Window[1]) atmGUI_Button[2] = guiCreateButton(145, 174, 68, 35, "Withdraw", false, atmGUI_Window[1]) atmGUI_Label[5] = guiCreateLabel(20, 264, 94, 24, "Player name :", false, atmGUI_Window[1]) atmGUI_Label[6] = guiCreateLabel(20, 298, 92, 22, "Amount :", false, atmGUI_Window[1]) atmGUI_Label[7] = guiCreateLabel(21, 330, 83, 27, "Reason :", false, atmGUI_Window[1]) atmGUI_Edit[3] = guiCreateEdit(107, 266, 183, 22, "", false, atmGUI_Window[1]) atmGUI_Edit[4] = guiCreateEdit(107, 266, 183, 22, "", false, atmGUI_Window[1]) atmGUI_Edit[5] = guiCreateEdit(107, 266, 183, 22, "", false, atmGUI_Window[1]) atmGUI_Edit[6] = guiCreateEdit(107, 293, 183, 22, "", false, atmGUI_Window[1]) atmGUI_Edit[7] = guiCreateEdit(108, 320, 182, 37, "", false, atmGUI_Window[1]) atmGUI_Button[3] = guiCreateButton(349, 277, 166, 61, "Transfer", false, atmGUI_Window[1]) atmGUI_Label[8] = guiCreateLabel(390, 31, 182, 25, "..:: Information ::..", false, atmGUI_Window[1]) atmGUI_Label[9] = guiCreateLabel(316, 66, 142, 27, "Available amount :", false, atmGUI_Window[1]) atmGUI_Edit[8] = guiCreateEdit(316, 94, 142, 30, "", false, atmGUI_Window[1]) guiSetProperty(atmGUI_Edit[8], "ReadOnly", "True") guiSetVisible(atmGUI_Window[1],false) end marker1 = createMarker(-1981.25061035156, 144.93418884277, 26.6875,"cylinder",0.5,150,255,150,150) marker2 = createMarker(-1968.1596679688, 308.81167602539, 34.171875, "cylinder",0.5,150,255,150,150) marker3 = createMarker(-2101.8071289063, -48.789329528809, 34.3203125, "cylinder",0.5,150,255,150,150) marker4 = createMarker(-2764.6552734375, 372.16513061523, 5.3359375, "cylinder",0.5,150,255,150,150) function MarkerHit(thePlayer,matchingDimension) guiSetVisible(atmGUI_Window[1],true) end addEventHandler("onClientMarkerHit", getRootElement(), MarkerHit) It was all i could do syedosman .
-
Well the problem is now solved Special thanks to TAPL !!! Also thanks to mihayy, enkanet , et-win ,la-costa
-
Oh sorry bout that it was not on my code I'll remove it. Got that from mihayy's post anyways there is an error. My debug script 3 says that I don't have an event "openWindow" client side but I have it? It doesn't let the server trigger it.
-
Superb ! =D>
-
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)
-
Still an error in debugscript: Server triggered client side event openWindow but event is not added clientside.
-
Add this to client maybe you haven't added an event to call the function of creating GUI addEventHandler("onClientResourceStart",rootElement,createatmGUI) Try it . You can add me on Skype mann.mta. I am from India too
-
Instead of addEventHandler("onClientMarkerHit",getRootElement(),MarkerHit) Do addEventHandler("onClientMarkerHit",marker1,MarkerHit)
-
Thank you guys for your help!
-
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
-
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)
-
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.
-
OK I'll add you on Skype. EDIT : Added you my name is mann.mta
-
OK thanks for the help. I didn't notice that it auto-saves .
-
I used the legal compiled version which was available for download here itself. 100% legal. But no source code.
