Jump to content

[*Solved] Help for making atm & bank system


syedosman

Recommended Posts

you did not trigger function createatmGUI() when entering on marker.

So there is no gui created and no GUI element called atm_Window[1]

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) 

Link to comment

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 :D

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