Ja[B]er[X]Pro Posted February 3, 2016 Share Posted February 3, 2016 السلام عليكم ورحمة الله وبركاته ابي فنكشنات مود منجم لكن ما ابي يعطي فلوس ابيه يعطي شيئ اخر غير الفلوس مثلاً حديد Link to comment
shwaeki Posted February 3, 2016 Share Posted February 3, 2016 setElementData getElementData Link to comment
Ja[B]er[X]Pro Posted February 3, 2016 Author Share Posted February 3, 2016 setElementData getElementData كيف احفظهم ان حد دخل وخرج او مات Link to comment
Me[Z]oO Posted February 3, 2016 Share Posted February 3, 2016 setAccountData getAccountData Link to comment
shwaeki Posted February 3, 2016 Share Posted February 3, 2016 setElementData getElementData كيف احفظهم ان حد دخل وخرج او مات اذا مات بتمهم محفوظين و اذا طلع و خرج استخدم setAccountData getAccountData او executeSQLQuery Link to comment
Ja[B]er[X]Pro Posted February 3, 2016 Author Share Posted February 3, 2016 كيف احدد قيمة لداتا الحديد مثل يجيه 2 حديد Link to comment
Ja[B]er[X]Pro Posted February 3, 2016 Author Share Posted February 3, 2016 محاولتي local r = math.random(1,1000) setElementData(source,"Iron",r) Link to comment
Abdul KariM Posted February 3, 2016 Share Posted February 3, 2016 (edited) محاولتي local r = math.random(1,1000) setElementData(source,"Iron",r) local r = math.random(1,1000) setElementData( source, "Iron", ( getElementData ( source, "Iron" ) or 0 ) + r ) Edited February 3, 2016 by Guest Link to comment
Jupi Posted February 3, 2016 Share Posted February 3, 2016 محاولتي local r = math.random(1,1000) setElementData(source,"Iron",r) كودك ما فيه غلط بس تأكد من source Link to comment
Ja[B]er[X]Pro Posted February 3, 2016 Author Share Posted February 3, 2016 محاولتي local r = math.random(1,1000) setElementData(source,"Iron",r) local r = math.random(1,1000) setElementData( source, "Iron", ( getElementData ( source, "Iron" ) or 0 ) + r ) شكراًً لك هل هذا صحيح بالكلام بالشات؟؟ local r = math.random(1,600) setElementData( source, "Iron", ( getElementData ( source, "Iron" ) or 0 ) + r ) exports["guimessages"]:outputServer(root,"#FF0000[JopSystem]Miner Jop System : #0080FF You Get #FFFF00"..r.."$ #0080FF From Your Minnings !!",0,255,128) Link to comment
HassoN Posted February 3, 2016 Share Posted February 3, 2016 شكراًً لك هل هذا صحيح بالكلام بالشات؟؟ local r = math.random(1,600) setElementData( source, "Iron", ( getElementData ( source, "Iron" ) or 0 ) + r ) exports["guimessages"]:outputServer(root,"#FF0000[JopSystem]Miner Jop System : #0080FF You Get #FFFF00"..r.."$ #0080FF From Your Minnings !!",0,255,128) .. يب صحيح Link to comment
Ja[B]er[X]Pro Posted February 3, 2016 Author Share Posted February 3, 2016 هناك بق بالوظيفة وهي ان شخص ذهب للحجر وبقي يضغط تاب يصير ياخد فلوس ويخرب الشاشة local minerMarkers = { {758.51599121094,753.36242675781,-4.0033869743347}, {740.45263671875,951.43524169922,-7.4548559188843}, {719.60821533203,970.32391357422,-7.4544372558594}, {627.25408935547,1008.5667114258,5.8102149963379}, {517.28771972656,1000.5893554688,-9.9594945907593}, {615.06231689453,774.80004882813,-32.110679626465}, {706.62518310547,792.21044921875,-30.262800216675}, {530.48461914063,916.84991455078,-42.655982971191}, {464.3349609375,865.015625,-27.464292526245}, {477.39825439453,807.1201171875,-18.829044342041}, {495.00930786133,778.30975341797,-21.634286880493}, {664.21527099609,719.94189453125,-3.996431350708}, {764.72650146484,827.23968505859,-7.4562559127808}, {740.41015625,951.22607421875,-7.4522466659546}, {687.07775878906,988.03552246094,-12.809737205505}, {696.51965332031,1005.3439941406,5.8082227706909}, {609.52349853516,985.73626708984,-7.4645547866821}, {534.44323730469,774.56799316406,-20.002136230469}, {510.88034057617,819.73706054688,-23.856391906738}, {491.29666137695,849.36956787109,-29.565511703491}, {537.17266845703,969.67395019531,-21.359622955322}, {498.93463134766,928.39727783203,-29.017789840698}, {483.15072631836,906.6708984375,-30.92096328735} } Taxi1 = createMarker(602.177734375,868.09375,-42.9609375,"cylinder",2,0,0,0,0) skin1 = createPed(27,602.177734375,868.09375,-42.9609375,90) blip = createBlip(602.177734375,868.09375,-42.9609375,56) setBlipVisibleDistance(blip,400) setElementFrozen(skin1,true) addEventHandler("onClientPedDamage",root, function () if source == skin1 then cancelEvent() end end) local x,y = guiGetScreenSize() addEventHandler("onClientMarkerHit",root, function (hit) if source == Taxi1 then if ( getElementData( hit, 'Occupation' ) ~= "Miner-Jop" ) and ( getTeamName ( getPlayerTeam ( hit ) ) == "No Team" ) and not isPedInVehicle(hit) then if localPlayer == hit then guiSetVisible(GUIEditor.window[1],true) showCursor(true) end end end end) GUIEditor = { gridlist = {}, window = {}, button = {} } local x = x - 332 local y = y - 333 GUIEditor.window[1] = guiCreateWindow(x/2,y/2,332,333, "[JopSystem]Iron Miner Jop", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetVisible(GUIEditor.window[1],false) GUIEditor.button[1] = guiCreateButton(9, 272, 94, 41, "Take Job", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") GUIEditor.button[2] = guiCreateButton(233, 272, 89, 41, "Close", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA") Memo1 = guiCreateMemo(13, 30, 318, 70, "الذهاب الي الصخور وقم بالضغط علي زر تاب وسيتم \nتكسيرها والحصول على النقود\n \nGo To The Rocks, And Press Tab to\nStart Breaking it and Get Money.", false, GUIEditor.window[1]) guiMemoSetReadOnly(Memo1, true) GUIEditor.gridlist[1] = guiCreateGridList(12, 120, 310, 140, false, GUIEditor.window[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "#", 0.3) guiGridListAddColumn(GUIEditor.gridlist[1], "Skin Number", 0.3) guiGridListAddColumn(GUIEditor.gridlist[1], "Skin Name", 0.3) for i = 1, 3 do guiGridListAddRow(GUIEditor.gridlist[1]) end guiGridListSetItemText(GUIEditor.gridlist[1], 0, 1, "1", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 0, 2, "27", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 0, 3, "Miner 1", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 1, 1, "2", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 1, 2, "260", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 1, 3, "Miner 2", false, false) addEventHandler("onClientGUIClick",root, function () if source == GUIEditor.button[1] then local skin = guiGridListGetItemText( GUIEditor.gridlist[1],guiGridListGetSelectedItem(GUIEditor.gridlist[1]),2) if skin ~= "" then triggerServerEvent("TakeJobFashier",localPlayer,skin) guiSetVisible(GUIEditor.window[1],false) showCursor(false) end elseif source == GUIEditor.button[2] then guiSetVisible(GUIEditor.window[1],false) showCursor(false) end end) addEventHandler("onClientRender", getRootElement(), function() local x, y, z = getElementPosition(skin1) local x2, y2, z2 = getElementPosition(localPlayer) if(isLineOfSightClear(x, y, z, x2, y2, z2, true, true, false, true)) then local sx, sy = getScreenFromWorldPosition(x, y, z+1.3) if(sx) and (sy) then local distance = getDistanceBetweenPoints3D(x, y, z, x2, y2, z2) if(distance < 30) then dxDrawText("Miner Job", sx+2, sy+2, sx, sy, tocolor(0,0,0), 2-(distance/20), "arial", "center", "center") dxDrawText("Miner Job", sx, sy, sx, sy, tocolor(255,255,0), 2-(distance/20), "arial", "center", "center") end end end end) addEvent("createMinerMarkers",true) addEventHandler("createMinerMarkers",root, function () local num = math.random (#minerMarkers) local x = minerMarkers [num][1] local y = minerMarkers [num][2] local z = minerMarkers [num][3] minerMark = createMarker(x,y,z,"cylinder",2.0,0,0,0,0) minerMarkk = createMarker(x,y,z+2.0,"arrow",1.0,255,0,0,255) minerObj = createObject(3931,x,y,z) minerBlip = createBlip(x,y,z,41) end ) local x,y = guiGetScreenSize() local x = x - 355 local y = y - -356 window = guiCreateWindow(x/2, y/2, 403, 82, "[JopSystem]Iron Miner", false) guiWindowSetSizable(window, false) guiSetVisible(window,false) progressbar = guiCreateProgressBar(14, 31, 372, 36, false, window) label = guiCreateLabel(172, 10, 329, 15, "0%", false, progressbar) guiLabelSetColor(label, 1, 0, 0) function startJob() setElementFrozen(localPlayer,true) setPedAnimation(localPlayer,"BSKTBALL","BBALL_react_miss") setTimer(setPedAnimation,10000,1,localPlayer,localPlayer) setTimer(setElementFrozen,10000,1,localPlayer,false) showCursor(true) guiSetVisible(window,true) local lol = guiProgressBarGetProgress(progressbar) setTimer( guiProgressBarSetProgress, 1000, 1,progressbar,lol+10 ) setTimer( guiSetText, 1000, 1,label,"10%") setTimer( guiProgressBarSetProgress, 2000, 1,progressbar,lol+20 ) setTimer( guiSetText, 2000, 1,label,"20%") setTimer( guiProgressBarSetProgress, 3000, 1,progressbar,lol+30 ) setTimer( guiSetText, 3000, 1,label,"30%") setTimer( guiProgressBarSetProgress, 4000, 1,progressbar,lol+40 ) setTimer( guiSetText, 4000, 1,label,"40%") setTimer( guiProgressBarSetProgress, 5000, 1,progressbar,lol+50 ) setTimer( guiSetText, 5000, 1,label,"50%") setTimer( guiProgressBarSetProgress, 6000, 1,progressbar,lol+60 ) setTimer( guiSetText, 6000, 1,label,"60%") setTimer( guiProgressBarSetProgress, 7000, 1,progressbar,lol+70 ) setTimer( guiSetText, 7000, 1,label,"70%") setTimer( guiProgressBarSetProgress, 8000, 1,progressbar,lol+80 ) setTimer( guiSetText, 8000, 1,label,"80%") setTimer( guiProgressBarSetProgress, 9000, 1,progressbar,lol+90 ) setTimer( guiSetText, 9000, 1,label,"90%") setTimer( guiProgressBarSetProgress, 10000, 1,progressbar,lol+100 ) setTimer( guiSetText, 10000, 1,label,"100%") timer = setTimer(function () guiSetVisible(window, false) showCursor(false) guiProgressBarSetProgress(progressbar, 0) unbindKey("tab","down",startN9) local num = math.random (#minerMarkers) local x = minerMarkers [num][1] local y = minerMarkers [num][2] local z = minerMarkers [num][3] setElementPosition(minerMark,x,y,z) setElementPosition(minerMarkk,x,y,z+2.0) setElementPosition(minerBlip,x,y,z) setElementPosition(minerObj,x,y,z) triggerServerEvent("giveW",localPlayer) end, 10000,1) end addEventHandler("onClientMarkerHit",root, function (hitting) if source == minerMark then if ( getElementData( hitting, 'Occupation' ) == "Miner-Jop" ) and ( getTeamName ( getPlayerTeam ( hitting ) ) == "No Team" ) and not isPedInVehicle(hitting) then bindKey("tab","down",startJob) end end end ) addEventHandler("onClientMarkerLeave",root, function () unbindKey("tab","down",startJob) end ) fileDelete('jobClient.lua') addEventHandler("onClientResourceStart", resourceRoot, function() window22 = guiCreateWindow(451, 305, 264, 131, "[JopSystem]Iron Jop : Warring !!", false) guiWindowSetSizable(window22, false) guiSetAlpha(window22 , 1.00) guiSetProperty(window22, "CaptionColour", "FFFE0000") guiSetVisible (window22, false) label22 = guiCreateLabel(20, 23, 241, 31, "Are You Sure Want To Get Out Of The Job", false, window22) guiSetFont(label22, "default-bold-small") guiLabelSetColor(label22, 254, 0, 255) button11 = guiCreateButton(10, 64, 110, 54, "Yes", false, window22) button22 = guiCreateButton(143, 64, 110, 54, "No", false, window22) end ) addEventHandler("onClientMarkerHit",root, function ( hitElement ) if ( source == Taxi1 ) then if ( hitElement == localPlayer ) then if ( getPlayerTeam ( localPlayer ) ) then if ( getElementData( localPlayer, 'Occupation' ) == "Miner-Jop" ) and ( getTeamName ( getPlayerTeam ( localPlayer ) ) == "No Team" ) and not isPedInVehicle(localPlayer) then guiSetVisible (window22, true) showCursor(true) end end end end end ) addEventHandler( "onClientGUIClick", root, function() if source == button11 then triggerServerEvent('remveMiner', localPlayer) guiSetVisible (window22, false) showCursor (false) destroyElement ( minerMark ) destroyElement ( minerMarkk ) destroyElement ( minerBlip ) destroyElement ( minerObj ) elseif source == button22 then guiSetVisible (window22, false) showCursor (false) end end ) Link to comment
HassoN Posted February 3, 2016 Share Posted February 3, 2016 هناك بق بالوظيفة وهي ان شخص ذهب للحجر وبقي يضغط تاب يصير ياخد فلوس ويخرب الشاشة local minerMarkers = { {758.51599121094,753.36242675781,-4.0033869743347}, {740.45263671875,951.43524169922,-7.4548559188843}, {719.60821533203,970.32391357422,-7.4544372558594}, {627.25408935547,1008.5667114258,5.8102149963379}, {517.28771972656,1000.5893554688,-9.9594945907593}, {615.06231689453,774.80004882813,-32.110679626465}, {706.62518310547,792.21044921875,-30.262800216675}, {530.48461914063,916.84991455078,-42.655982971191}, {464.3349609375,865.015625,-27.464292526245}, {477.39825439453,807.1201171875,-18.829044342041}, {495.00930786133,778.30975341797,-21.634286880493}, {664.21527099609,719.94189453125,-3.996431350708}, {764.72650146484,827.23968505859,-7.4562559127808}, {740.41015625,951.22607421875,-7.4522466659546}, {687.07775878906,988.03552246094,-12.809737205505}, {696.51965332031,1005.3439941406,5.8082227706909}, {609.52349853516,985.73626708984,-7.4645547866821}, {534.44323730469,774.56799316406,-20.002136230469}, {510.88034057617,819.73706054688,-23.856391906738}, {491.29666137695,849.36956787109,-29.565511703491}, {537.17266845703,969.67395019531,-21.359622955322}, {498.93463134766,928.39727783203,-29.017789840698}, {483.15072631836,906.6708984375,-30.92096328735} } Taxi1 = createMarker(602.177734375,868.09375,-42.9609375,"cylinder",2,0,0,0,0) skin1 = createPed(27,602.177734375,868.09375,-42.9609375,90) blip = createBlip(602.177734375,868.09375,-42.9609375,56) setBlipVisibleDistance(blip,400) setElementFrozen(skin1,true) addEventHandler("onClientPedDamage",root, function () if source == skin1 then cancelEvent() end end) local x,y = guiGetScreenSize() addEventHandler("onClientMarkerHit",root, function (hit) if source == Taxi1 then if ( getElementData( hit, 'Occupation' ) ~= "Miner-Jop" ) and ( getTeamName ( getPlayerTeam ( hit ) ) == "No Team" ) and not isPedInVehicle(hit) then if localPlayer == hit then guiSetVisible(GUIEditor.window[1],true) showCursor(true) end end end end) GUIEditor = { gridlist = {}, window = {}, button = {} } local x = x - 332 local y = y - 333 GUIEditor.window[1] = guiCreateWindow(x/2,y/2,332,333, "[JopSystem]Iron Miner Jop", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetVisible(GUIEditor.window[1],false) GUIEditor.button[1] = guiCreateButton(9, 272, 94, 41, "Take Job", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") GUIEditor.button[2] = guiCreateButton(233, 272, 89, 41, "Close", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA") Memo1 = guiCreateMemo(13, 30, 318, 70, "الذهاب الي الصخور وقم بالضغط علي زر تاب وسيتم \nتكسيرها والحصول على النقود\n \nGo To The Rocks, And Press Tab to\nStart Breaking it and Get Money.", false, GUIEditor.window[1]) guiMemoSetReadOnly(Memo1, true) GUIEditor.gridlist[1] = guiCreateGridList(12, 120, 310, 140, false, GUIEditor.window[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "#", 0.3) guiGridListAddColumn(GUIEditor.gridlist[1], "Skin Number", 0.3) guiGridListAddColumn(GUIEditor.gridlist[1], "Skin Name", 0.3) for i = 1, 3 do guiGridListAddRow(GUIEditor.gridlist[1]) end guiGridListSetItemText(GUIEditor.gridlist[1], 0, 1, "1", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 0, 2, "27", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 0, 3, "Miner 1", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 1, 1, "2", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 1, 2, "260", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 1, 3, "Miner 2", false, false) addEventHandler("onClientGUIClick",root, function () if source == GUIEditor.button[1] then local skin = guiGridListGetItemText( GUIEditor.gridlist[1],guiGridListGetSelectedItem(GUIEditor.gridlist[1]),2) if skin ~= "" then triggerServerEvent("TakeJobFashier",localPlayer,skin) guiSetVisible(GUIEditor.window[1],false) showCursor(false) end elseif source == GUIEditor.button[2] then guiSetVisible(GUIEditor.window[1],false) showCursor(false) end end) addEventHandler("onClientRender", getRootElement(), function() local x, y, z = getElementPosition(skin1) local x2, y2, z2 = getElementPosition(localPlayer) if(isLineOfSightClear(x, y, z, x2, y2, z2, true, true, false, true)) then local sx, sy = getScreenFromWorldPosition(x, y, z+1.3) if(sx) and (sy) then local distance = getDistanceBetweenPoints3D(x, y, z, x2, y2, z2) if(distance < 30) then dxDrawText("Miner Job", sx+2, sy+2, sx, sy, tocolor(0,0,0), 2-(distance/20), "arial", "center", "center") dxDrawText("Miner Job", sx, sy, sx, sy, tocolor(255,255,0), 2-(distance/20), "arial", "center", "center") end end end end) addEvent("createMinerMarkers",true) addEventHandler("createMinerMarkers",root, function () local num = math.random (#minerMarkers) local x = minerMarkers [num][1] local y = minerMarkers [num][2] local z = minerMarkers [num][3] minerMark = createMarker(x,y,z,"cylinder",2.0,0,0,0,0) minerMarkk = createMarker(x,y,z+2.0,"arrow",1.0,255,0,0,255) minerObj = createObject(3931,x,y,z) minerBlip = createBlip(x,y,z,41) end ) local x,y = guiGetScreenSize() local x = x - 355 local y = y - -356 window = guiCreateWindow(x/2, y/2, 403, 82, "[JopSystem]Iron Miner", false) guiWindowSetSizable(window, false) guiSetVisible(window,false) progressbar = guiCreateProgressBar(14, 31, 372, 36, false, window) label = guiCreateLabel(172, 10, 329, 15, "0%", false, progressbar) guiLabelSetColor(label, 1, 0, 0) function startJob() setElementFrozen(localPlayer,true) setPedAnimation(localPlayer,"BSKTBALL","BBALL_react_miss") setTimer(setPedAnimation,10000,1,localPlayer,localPlayer) setTimer(setElementFrozen,10000,1,localPlayer,false) showCursor(true) guiSetVisible(window,true) local lol = guiProgressBarGetProgress(progressbar) setTimer( guiProgressBarSetProgress, 1000, 1,progressbar,lol+10 ) setTimer( guiSetText, 1000, 1,label,"10%") setTimer( guiProgressBarSetProgress, 2000, 1,progressbar,lol+20 ) setTimer( guiSetText, 2000, 1,label,"20%") setTimer( guiProgressBarSetProgress, 3000, 1,progressbar,lol+30 ) setTimer( guiSetText, 3000, 1,label,"30%") setTimer( guiProgressBarSetProgress, 4000, 1,progressbar,lol+40 ) setTimer( guiSetText, 4000, 1,label,"40%") setTimer( guiProgressBarSetProgress, 5000, 1,progressbar,lol+50 ) setTimer( guiSetText, 5000, 1,label,"50%") setTimer( guiProgressBarSetProgress, 6000, 1,progressbar,lol+60 ) setTimer( guiSetText, 6000, 1,label,"60%") setTimer( guiProgressBarSetProgress, 7000, 1,progressbar,lol+70 ) setTimer( guiSetText, 7000, 1,label,"70%") setTimer( guiProgressBarSetProgress, 8000, 1,progressbar,lol+80 ) setTimer( guiSetText, 8000, 1,label,"80%") setTimer( guiProgressBarSetProgress, 9000, 1,progressbar,lol+90 ) setTimer( guiSetText, 9000, 1,label,"90%") setTimer( guiProgressBarSetProgress, 10000, 1,progressbar,lol+100 ) setTimer( guiSetText, 10000, 1,label,"100%") timer = setTimer(function () guiSetVisible(window, false) showCursor(false) guiProgressBarSetProgress(progressbar, 0) unbindKey("tab","down",startN9) local num = math.random (#minerMarkers) local x = minerMarkers [num][1] local y = minerMarkers [num][2] local z = minerMarkers [num][3] setElementPosition(minerMark,x,y,z) setElementPosition(minerMarkk,x,y,z+2.0) setElementPosition(minerBlip,x,y,z) setElementPosition(minerObj,x,y,z) triggerServerEvent("giveW",localPlayer) end, 10000,1) end addEventHandler("onClientMarkerHit",root, function (hitting) if source == minerMark then if ( getElementData( hitting, 'Occupation' ) == "Miner-Jop" ) and ( getTeamName ( getPlayerTeam ( hitting ) ) == "No Team" ) and not isPedInVehicle(hitting) then bindKey("tab","down",startJob) end end end ) addEventHandler("onClientMarkerLeave",root, function () unbindKey("tab","down",startJob) end ) fileDelete('jobClient.lua') addEventHandler("onClientResourceStart", resourceRoot, function() window22 = guiCreateWindow(451, 305, 264, 131, "[JopSystem]Iron Jop : Warring !!", false) guiWindowSetSizable(window22, false) guiSetAlpha(window22 , 1.00) guiSetProperty(window22, "CaptionColour", "FFFE0000") guiSetVisible (window22, false) label22 = guiCreateLabel(20, 23, 241, 31, "Are You Sure Want To Get Out Of The Job", false, window22) guiSetFont(label22, "default-bold-small") guiLabelSetColor(label22, 254, 0, 255) button11 = guiCreateButton(10, 64, 110, 54, "Yes", false, window22) button22 = guiCreateButton(143, 64, 110, 54, "No", false, window22) end ) addEventHandler("onClientMarkerHit",root, function ( hitElement ) if ( source == Taxi1 ) then if ( hitElement == localPlayer ) then if ( getPlayerTeam ( localPlayer ) ) then if ( getElementData( localPlayer, 'Occupation' ) == "Miner-Jop" ) and ( getTeamName ( getPlayerTeam ( localPlayer ) ) == "No Team" ) and not isPedInVehicle(localPlayer) then guiSetVisible (window22, true) showCursor(true) end end end end end ) addEventHandler( "onClientGUIClick", root, function() if source == button11 then triggerServerEvent('remveMiner', localPlayer) guiSetVisible (window22, false) showCursor (false) destroyElement ( minerMark ) destroyElement ( minerMarkk ) destroyElement ( minerBlip ) destroyElement ( minerObj ) elseif source == button22 then guiSetVisible (window22, false) showCursor (false) end Link to comment
Ja[B]er[X]Pro Posted February 3, 2016 Author Share Posted February 3, 2016 هناك بق بالوظيفة وهي ان شخص ذهب للحجر وبقي يضغط تاب يصير ياخد فلوس ويخرب الشاشة local minerMarkers = { {758.51599121094,753.36242675781,-4.0033869743347}, {740.45263671875,951.43524169922,-7.4548559188843}, {719.60821533203,970.32391357422,-7.4544372558594}, {627.25408935547,1008.5667114258,5.8102149963379}, {517.28771972656,1000.5893554688,-9.9594945907593}, {615.06231689453,774.80004882813,-32.110679626465}, {706.62518310547,792.21044921875,-30.262800216675}, {530.48461914063,916.84991455078,-42.655982971191}, {464.3349609375,865.015625,-27.464292526245}, {477.39825439453,807.1201171875,-18.829044342041}, {495.00930786133,778.30975341797,-21.634286880493}, {664.21527099609,719.94189453125,-3.996431350708}, {764.72650146484,827.23968505859,-7.4562559127808}, {740.41015625,951.22607421875,-7.4522466659546}, {687.07775878906,988.03552246094,-12.809737205505}, {696.51965332031,1005.3439941406,5.8082227706909}, {609.52349853516,985.73626708984,-7.4645547866821}, {534.44323730469,774.56799316406,-20.002136230469}, {510.88034057617,819.73706054688,-23.856391906738}, {491.29666137695,849.36956787109,-29.565511703491}, {537.17266845703,969.67395019531,-21.359622955322}, {498.93463134766,928.39727783203,-29.017789840698}, {483.15072631836,906.6708984375,-30.92096328735} } Taxi1 = createMarker(602.177734375,868.09375,-42.9609375,"cylinder",2,0,0,0,0) skin1 = createPed(27,602.177734375,868.09375,-42.9609375,90) blip = createBlip(602.177734375,868.09375,-42.9609375,56) setBlipVisibleDistance(blip,400) setElementFrozen(skin1,true) addEventHandler("onClientPedDamage",root, function () if source == skin1 then cancelEvent() end end) local x,y = guiGetScreenSize() addEventHandler("onClientMarkerHit",root, function (hit) if source == Taxi1 then if ( getElementData( hit, 'Occupation' ) ~= "Miner-Jop" ) and ( getTeamName ( getPlayerTeam ( hit ) ) == "No Team" ) and not isPedInVehicle(hit) then if localPlayer == hit then guiSetVisible(GUIEditor.window[1],true) showCursor(true) end end end end) GUIEditor = { gridlist = {}, window = {}, button = {} } local x = x - 332 local y = y - 333 GUIEditor.window[1] = guiCreateWindow(x/2,y/2,332,333, "[JopSystem]Iron Miner Jop", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetVisible(GUIEditor.window[1],false) GUIEditor.button[1] = guiCreateButton(9, 272, 94, 41, "Take Job", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") GUIEditor.button[2] = guiCreateButton(233, 272, 89, 41, "Close", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA") Memo1 = guiCreateMemo(13, 30, 318, 70, "الذهاب الي الصخور وقم بالضغط علي زر تاب وسيتم \nتكسيرها والحصول على النقود\n \nGo To The Rocks, And Press Tab to\nStart Breaking it and Get Money.", false, GUIEditor.window[1]) guiMemoSetReadOnly(Memo1, true) GUIEditor.gridlist[1] = guiCreateGridList(12, 120, 310, 140, false, GUIEditor.window[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "#", 0.3) guiGridListAddColumn(GUIEditor.gridlist[1], "Skin Number", 0.3) guiGridListAddColumn(GUIEditor.gridlist[1], "Skin Name", 0.3) for i = 1, 3 do guiGridListAddRow(GUIEditor.gridlist[1]) end guiGridListSetItemText(GUIEditor.gridlist[1], 0, 1, "1", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 0, 2, "27", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 0, 3, "Miner 1", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 1, 1, "2", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 1, 2, "260", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 1, 3, "Miner 2", false, false) addEventHandler("onClientGUIClick",root, function () if source == GUIEditor.button[1] then local skin = guiGridListGetItemText( GUIEditor.gridlist[1],guiGridListGetSelectedItem(GUIEditor.gridlist[1]),2) if skin ~= "" then triggerServerEvent("TakeJobFashier",localPlayer,skin) guiSetVisible(GUIEditor.window[1],false) showCursor(false) end elseif source == GUIEditor.button[2] then guiSetVisible(GUIEditor.window[1],false) showCursor(false) end end) addEventHandler("onClientRender", getRootElement(), function() local x, y, z = getElementPosition(skin1) local x2, y2, z2 = getElementPosition(localPlayer) if(isLineOfSightClear(x, y, z, x2, y2, z2, true, true, false, true)) then local sx, sy = getScreenFromWorldPosition(x, y, z+1.3) if(sx) and (sy) then local distance = getDistanceBetweenPoints3D(x, y, z, x2, y2, z2) if(distance < 30) then dxDrawText("Miner Job", sx+2, sy+2, sx, sy, tocolor(0,0,0), 2-(distance/20), "arial", "center", "center") dxDrawText("Miner Job", sx, sy, sx, sy, tocolor(255,255,0), 2-(distance/20), "arial", "center", "center") end end end end) addEvent("createMinerMarkers",true) addEventHandler("createMinerMarkers",root, function () local num = math.random (#minerMarkers) local x = minerMarkers [num][1] local y = minerMarkers [num][2] local z = minerMarkers [num][3] minerMark = createMarker(x,y,z,"cylinder",2.0,0,0,0,0) minerMarkk = createMarker(x,y,z+2.0,"arrow",1.0,255,0,0,255) minerObj = createObject(3931,x,y,z) minerBlip = createBlip(x,y,z,41) end ) local x,y = guiGetScreenSize() local x = x - 355 local y = y - -356 window = guiCreateWindow(x/2, y/2, 403, 82, "[JopSystem]Iron Miner", false) guiWindowSetSizable(window, false) guiSetVisible(window,false) progressbar = guiCreateProgressBar(14, 31, 372, 36, false, window) label = guiCreateLabel(172, 10, 329, 15, "0%", false, progressbar) guiLabelSetColor(label, 1, 0, 0) function startJob() setElementFrozen(localPlayer,true) setPedAnimation(localPlayer,"BSKTBALL","BBALL_react_miss") setTimer(setPedAnimation,10000,1,localPlayer,localPlayer) setTimer(setElementFrozen,10000,1,localPlayer,false) showCursor(true) guiSetVisible(window,true) local lol = guiProgressBarGetProgress(progressbar) setTimer( guiProgressBarSetProgress, 1000, 1,progressbar,lol+10 ) setTimer( guiSetText, 1000, 1,label,"10%") setTimer( guiProgressBarSetProgress, 2000, 1,progressbar,lol+20 ) setTimer( guiSetText, 2000, 1,label,"20%") setTimer( guiProgressBarSetProgress, 3000, 1,progressbar,lol+30 ) setTimer( guiSetText, 3000, 1,label,"30%") setTimer( guiProgressBarSetProgress, 4000, 1,progressbar,lol+40 ) setTimer( guiSetText, 4000, 1,label,"40%") setTimer( guiProgressBarSetProgress, 5000, 1,progressbar,lol+50 ) setTimer( guiSetText, 5000, 1,label,"50%") setTimer( guiProgressBarSetProgress, 6000, 1,progressbar,lol+60 ) setTimer( guiSetText, 6000, 1,label,"60%") setTimer( guiProgressBarSetProgress, 7000, 1,progressbar,lol+70 ) setTimer( guiSetText, 7000, 1,label,"70%") setTimer( guiProgressBarSetProgress, 8000, 1,progressbar,lol+80 ) setTimer( guiSetText, 8000, 1,label,"80%") setTimer( guiProgressBarSetProgress, 9000, 1,progressbar,lol+90 ) setTimer( guiSetText, 9000, 1,label,"90%") setTimer( guiProgressBarSetProgress, 10000, 1,progressbar,lol+100 ) setTimer( guiSetText, 10000, 1,label,"100%") timer = setTimer(function () guiSetVisible(window, false) showCursor(false) guiProgressBarSetProgress(progressbar, 0) unbindKey("tab","down",startN9) local num = math.random (#minerMarkers) local x = minerMarkers [num][1] local y = minerMarkers [num][2] local z = minerMarkers [num][3] setElementPosition(minerMark,x,y,z) setElementPosition(minerMarkk,x,y,z+2.0) setElementPosition(minerBlip,x,y,z) setElementPosition(minerObj,x,y,z) triggerServerEvent("giveW",localPlayer) end, 10000,1) end addEventHandler("onClientMarkerHit",root, function (hitting) if source == minerMark then if ( getElementData( hitting, 'Occupation' ) == "Miner-Jop" ) and ( getTeamName ( getPlayerTeam ( hitting ) ) == "No Team" ) and not isPedInVehicle(hitting) then bindKey("tab","down",startJob) end end end ) addEventHandler("onClientMarkerLeave",root, function () unbindKey("tab","down",startJob) end ) fileDelete('jobClient.lua') addEventHandler("onClientResourceStart", resourceRoot, function() window22 = guiCreateWindow(451, 305, 264, 131, "[JopSystem]Iron Jop : Warring !!", false) guiWindowSetSizable(window22, false) guiSetAlpha(window22 , 1.00) guiSetProperty(window22, "CaptionColour", "FFFE0000") guiSetVisible (window22, false) label22 = guiCreateLabel(20, 23, 241, 31, "Are You Sure Want To Get Out Of The Job", false, window22) guiSetFont(label22, "default-bold-small") guiLabelSetColor(label22, 254, 0, 255) button11 = guiCreateButton(10, 64, 110, 54, "Yes", false, window22) button22 = guiCreateButton(143, 64, 110, 54, "No", false, window22) end ) addEventHandler("onClientMarkerHit",root, function ( hitElement ) if ( source == Taxi1 ) then if ( hitElement == localPlayer ) then if ( getPlayerTeam ( localPlayer ) ) then if ( getElementData( localPlayer, 'Occupation' ) == "Miner-Jop" ) and ( getTeamName ( getPlayerTeam ( localPlayer ) ) == "No Team" ) and not isPedInVehicle(localPlayer) then guiSetVisible (window22, true) showCursor(true) end end end end end ) addEventHandler( "onClientGUIClick", root, function() if source == button11 then triggerServerEvent('remveMiner', localPlayer) guiSetVisible (window22, false) showCursor (false) destroyElement ( minerMark ) destroyElement ( minerMarkk ) destroyElement ( minerBlip ) destroyElement ( minerObj ) elseif source == button22 then Link to comment
Ja[B]er[X]Pro Posted February 3, 2016 Author Share Posted February 3, 2016 ما هو الخطأ هنا بكود معرفة عدد الحديد addCommandHandler("myiron", function() miron = getElementData(localPlayer"Iron") outputChatBox("Your iron is"..miron.." in server") end) Link to comment
HassoN Posted February 3, 2016 Share Posted February 3, 2016 هناك بق بالوظيفة وهي ان شخص ذهب للحجر وبقي يضغط تاب يصير ياخد فلوس ويخرب الشاشة local minerMarkers = { {758.51599121094,753.36242675781,-4.0033869743347}, {740.45263671875,951.43524169922,-7.4548559188843}, {719.60821533203,970.32391357422,-7.4544372558594}, {627.25408935547,1008.5667114258,5.8102149963379}, {517.28771972656,1000.5893554688,-9.9594945907593}, {615.06231689453,774.80004882813,-32.110679626465}, {706.62518310547,792.21044921875,-30.262800216675}, {530.48461914063,916.84991455078,-42.655982971191}, {464.3349609375,865.015625,-27.464292526245}, {477.39825439453,807.1201171875,-18.829044342041}, {495.00930786133,778.30975341797,-21.634286880493}, {664.21527099609,719.94189453125,-3.996431350708}, {764.72650146484,827.23968505859,-7.4562559127808}, {740.41015625,951.22607421875,-7.4522466659546}, {687.07775878906,988.03552246094,-12.809737205505}, {696.51965332031,1005.3439941406,5.8082227706909}, {609.52349853516,985.73626708984,-7.4645547866821}, {534.44323730469,774.56799316406,-20.002136230469}, {510.88034057617,819.73706054688,-23.856391906738}, {491.29666137695,849.36956787109,-29.565511703491}, {537.17266845703,969.67395019531,-21.359622955322}, {498.93463134766,928.39727783203,-29.017789840698}, {483.15072631836,906.6708984375,-30.92096328735} } Taxi1 = createMarker(602.177734375,868.09375,-42.9609375,"cylinder",2,0,0,0,0) skin1 = createPed(27,602.177734375,868.09375,-42.9609375,90) blip = createBlip(602.177734375,868.09375,-42.9609375,56) setBlipVisibleDistance(blip,400) setElementFrozen(skin1,true) addEventHandler("onClientPedDamage",root, function () if source == skin1 then cancelEvent() end end) local x,y = guiGetScreenSize() addEventHandler("onClientMarkerHit",root, function (hit) if source == Taxi1 then if ( getElementData( hit, 'Occupation' ) ~= "Miner-Jop" ) and ( getTeamName ( getPlayerTeam ( hit ) ) == "No Team" ) and not isPedInVehicle(hit) then if localPlayer == hit then guiSetVisible(GUIEditor.window[1],true) showCursor(true) end end end end) GUIEditor = { gridlist = {}, window = {}, button = {} } local x = x - 332 local y = y - 333 GUIEditor.window[1] = guiCreateWindow(x/2,y/2,332,333, "[JopSystem]Iron Miner Jop", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetVisible(GUIEditor.window[1],false) GUIEditor.button[1] = guiCreateButton(9, 272, 94, 41, "Take Job", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") GUIEditor.button[2] = guiCreateButton(233, 272, 89, 41, "Close", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA") Memo1 = guiCreateMemo(13, 30, 318, 70, "الذهاب الي الصخور وقم بالضغط علي زر تاب وسيتم \nتكسيرها والحصول على النقود\n \nGo To The Rocks, And Press Tab to\nStart Breaking it and Get Money.", false, GUIEditor.window[1]) guiMemoSetReadOnly(Memo1, true) GUIEditor.gridlist[1] = guiCreateGridList(12, 120, 310, 140, false, GUIEditor.window[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "#", 0.3) guiGridListAddColumn(GUIEditor.gridlist[1], "Skin Number", 0.3) guiGridListAddColumn(GUIEditor.gridlist[1], "Skin Name", 0.3) for i = 1, 3 do guiGridListAddRow(GUIEditor.gridlist[1]) end guiGridListSetItemText(GUIEditor.gridlist[1], 0, 1, "1", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 0, 2, "27", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 0, 3, "Miner 1", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 1, 1, "2", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 1, 2, "260", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 1, 3, "Miner 2", false, false) addEventHandler("onClientGUIClick",root, function () if source == GUIEditor.button[1] then local skin = guiGridListGetItemText( GUIEditor.gridlist[1],guiGridListGetSelectedItem(GUIEditor.gridlist[1]),2) if skin ~= "" then triggerServerEvent("TakeJobFashier",localPlayer,skin) guiSetVisible(GUIEditor.window[1],false) showCursor(false) end elseif source == GUIEditor.button[2] then guiSetVisible(GUIEditor.window[1],false) showCursor(false) end end) addEventHandler("onClientRender", getRootElement(), function() local x, y, z = getElementPosition(skin1) local x2, y2, z2 = getElementPosition(localPlayer) if(isLineOfSightClear(x, y, z, x2, y2, z2, true, true, false, true)) then local sx, sy = getScreenFromWorldPosition(x, y, z+1.3) if(sx) and (sy) then local distance = getDistanceBetweenPoints3D(x, y, z, x2, y2, z2) if(distance < 30) then dxDrawText("Miner Job", sx+2, sy+2, sx, sy, tocolor(0,0,0), 2-(distance/20), "arial", "center", "center") dxDrawText("Miner Job", sx, sy, sx, sy, tocolor(255,255,0), 2-(distance/20), "arial", "center", "center") end end end end) addEvent("createMinerMarkers",true) addEventHandler("createMinerMarkers",root, function () local num = math.random (#minerMarkers) local x = minerMarkers [num][1] local y = minerMarkers [num][2] local z = minerMarkers [num][3] minerMark = createMarker(x,y,z,"cylinder",2.0,0,0,0,0) minerMarkk = createMarker(x,y,z+2.0,"arrow",1.0,255,0,0,255) minerObj = createObject(3931,x,y,z) minerBlip = createBlip(x,y,z,41) end ) local x,y = guiGetScreenSize() local x = x - 355 local y = y - -356 window = guiCreateWindow(x/2, y/2, 403, 82, "[JopSystem]Iron Miner", false) guiWindowSetSizable(window, false) guiSetVisible(window,false) progressbar = guiCreateProgressBar(14, 31, 372, 36, false, window) label = guiCreateLabel(172, 10, 329, 15, "0%", false, progressbar) guiLabelSetColor(label, 1, 0, 0) function startJob() setElementFrozen(localPlayer,true) setPedAnimation(localPlayer,"BSKTBALL","BBALL_react_miss") setTimer(setPedAnimation,10000,1,localPlayer,localPlayer) setTimer(setElementFrozen,10000,1,localPlayer,false) showCursor(true) guiSetVisible(window,true) local lol = guiProgressBarGetProgress(progressbar) setTimer( guiProgressBarSetProgress, 1000, 1,progressbar,lol+10 ) setTimer( guiSetText, 1000, 1,label,"10%") setTimer( guiProgressBarSetProgress, 2000, 1,progressbar,lol+20 ) setTimer( guiSetText, 2000, 1,label,"20%") setTimer( guiProgressBarSetProgress, 3000, 1,progressbar,lol+30 ) setTimer( guiSetText, 3000, 1,label,"30%") setTimer( guiProgressBarSetProgress, 4000, 1,progressbar,lol+40 ) setTimer( guiSetText, 4000, 1,label,"40%") setTimer( guiProgressBarSetProgress, 5000, 1,progressbar,lol+50 ) setTimer( guiSetText, 5000, 1,label,"50%") setTimer( guiProgressBarSetProgress, 6000, 1,progressbar,lol+60 ) setTimer( guiSetText, 6000, 1,label,"60%") setTimer( guiProgressBarSetProgress, 7000, 1,progressbar,lol+70 ) setTimer( guiSetText, 7000, 1,label,"70%") setTimer( guiProgressBarSetProgress, 8000, 1,progressbar,lol+80 ) setTimer( guiSetText, 8000, 1,label,"80%") setTimer( guiProgressBarSetProgress, 9000, 1,progressbar,lol+90 ) setTimer( guiSetText, 9000, 1,label,"90%") setTimer( guiProgressBarSetProgress, 10000, 1,progressbar,lol+100 ) setTimer( guiSetText, 10000, 1,label,"100%") timer = setTimer(function () guiSetVisible(window, false) showCursor(false) guiProgressBarSetProgress(progressbar, 0) unbindKey("tab","down",startN9) local num = math.random (#minerMarkers) local x = minerMarkers [num][1] local y = minerMarkers [num][2] local z = minerMarkers [num][3] setElementPosition(minerMark,x,y,z) setElementPosition(minerMarkk,x,y,z+2.0) setElementPosition(minerBlip,x,y,z) setElementPosition(minerObj,x,y,z) triggerServerEvent("giveW",localPlayer) end, 10000,1) end addEventHandler("onClientMarkerHit",root, function (hitting) if source == minerMark then if ( getElementData( hitting, 'Occupation' ) == "Miner-Jop" ) and ( getTeamName ( getPlayerTeam ( hitting ) ) == "No Team" ) and not isPedInVehicle(hitting) then bindKey("tab","down",startJob) end end end ) addEventHandler("onClientMarkerLeave",root, function () unbindKey("tab","down",startJob) end ) fileDelete('jobClient.lua') addEventHandler("onClientResourceStart", resourceRoot, function() window22 = guiCreateWindow(451, 305, 264, 131, "[JopSystem]Iron Jop : Warring !!", false) guiWindowSetSizable(window22, false) guiSetAlpha(window22 , 1.00) guiSetProperty(window22, "CaptionColour", "FFFE0000") guiSetVisible (window22, false) label22 = guiCreateLabel(20, 23, 241, 31, "Are You Sure Want To Get Out Of The Job", false, window22) guiSetFont(label22, "default-bold-small") guiLabelSetColor(label22, 254, 0, 255) button11 = guiCreateButton(10, 64, 110, 54, "Yes", false, window22) button22 = guiCreateButton(143, 64, 110, 54, "No", false, window22) end ) addEventHandler("onClientMarkerHit",root, function ( hitElement ) if ( source == Taxi1 ) then if ( hitElement == localPlayer ) then if ( getPlayerTeam ( localPlayer ) ) then if ( getElementData( localPlayer, 'Occupation' ) == "Miner-Jop" ) and ( getTeamName ( getPlayerTeam ( localPlayer ) ) == "No Team" ) and not isPedInVehicle(localPlayer) then guiSetVisible (window22, true) showCursor(true) end end end end end ) addEventHandler( "onClientGUIClick", root, function() if source == button11 then triggerServerEvent('remveMiner', localPlayer) guiSetVisible (window22, false) showCursor (false) destroyElement ( minerMark ) destroyElement ( minerMarkk ) destroyElement ( minerBlip ) Link to comment
Ja[B]er[X]Pro Posted February 3, 2016 Author Share Posted February 3, 2016 ضض والله ما شفتها شكراً + وش الخطأ بالكود الاخر؟ Link to comment
HassoN Posted February 3, 2016 Share Posted February 3, 2016 ضض والله ما شفتها شكراً+ وش الخطأ بالكود الاخر؟ أي كود؟ Link to comment
Ja[B]er[X]Pro Posted February 3, 2016 Author Share Posted February 3, 2016 addCommandHandler("myiron", function() miron = getElementData(localPlayer"Iron") outputChatBox("Your iron is"..miron.." in server") end) Link to comment
HassoN Posted February 3, 2016 Share Posted February 3, 2016 addCommandHandler("myiron", function() miron = getElementData(localPlayer"Iron") outputChatBox("Your iron is"..miron.." in server") end) addCommandHandler("myiron", function() miron = getElementData(localPlayer,"Iron") outputChatBox("Your iron is"..miron.." in server") end) Link to comment
Ja[B]er[X]Pro Posted February 4, 2016 Author Share Posted February 4, 2016 addCommandHandler("myiron", function() miron = getElementData(localPlayer"Iron") outputChatBox("Your iron is"..miron.." in server") end) addCommandHandler("myiron", function() miron = getElementData(localPlayer,"Iron") outputChatBox("Your iron is"..miron.." in server") end) شكراً ولكن وش التغيير الذي سويته + طلب انا ما عرفت اسويه يحفظ الداتا ان خرج ودخل كيف اسويها؟ Link to comment
HassoN Posted February 4, 2016 Share Posted February 4, 2016 شكراً ولكن وش التغيير الذي سويته + طلب انا ما عرفت اسويه يحفظ الداتا ان خرج ودخل كيف اسويها؟ وبس localPlayer ضفت , بعد <= أما بالنسبة للحفظ ، استعمل function playerLoginSavingData (thePreviousAccount, theCurrentAccount, autoLogin) -- فنكشن if (isGuestAccount (getPlayerAccount(source))) then return end -- تتأكد ان الاعب مسجل دخوله local T1 = getAccountData (theCurrentAccount, "DATA") -- DATA يجيب الاكاونت داتا الي على الاعب مثلا اسمها setElementData(source,"DATA", T1 ) -- يحط عليه الالمنت داتا end -- اكيد تعرف ذي حقت وش ض1 addEventHandler("onPlayerLogin", getRootElement(), playerLoginSavingData) -- ايفنت لما يدخل الاعب function quitPlayerSavingData ( quitType ) -- فنكشن if (isGuestAccount (getPlayerAccount(source))) then return end -- تتأكد ان الاعب كان مسجل دخوله قبل مايطلع local T1 = getElementData (source, "DATA") -- تجيب الالمنت داتا الي عليه setAccountData(getPlayerAccount(source),"DATA", T1) end -- أند addEventHandler ( "onPlayerQuit", getRootElement(), quitPlayerSavingData ) -- ايفنت لما يطلع الاعب كذا لما يطلع الاعب من السيرفر يجيب الالمنت داتا الي عليه ويحطها اكاونت داتا ، ثم لما يدخل يجيب الاكاونت داتا حقه ويحطها المنت داتا مرة ثانية وخلصنا Link to comment
Ja[B]er[X]Pro Posted February 4, 2016 Author Share Posted February 4, 2016 شكراً ولكن وش التغيير الذي سويته + طلب انا ما عرفت اسويه يحفظ الداتا ان خرج ودخل كيف اسويها؟ وبس localPlayer ضفت , بعد <= أما بالنسبة للحفظ ، استعمل function playerLoginSavingData (thePreviousAccount, theCurrentAccount, autoLogin) -- فنكشن if (isGuestAccount (getPlayerAccount(source))) then return end -- تتأكد ان الاعب مسجل دخوله local T1 = getAccountData (theCurrentAccount, "DATA") -- DATA يجيب الاكاونت داتا الي على الاعب مثلا اسمها setElementData(source,"DATA", T1 ) -- يحط عليه الالمنت داتا end -- اكيد تعرف ذي حقت وش ض1 addEventHandler("onPlayerLogin", getRootElement(), playerLoginSavingData) -- ايفنت لما يدخل الاعب function quitPlayerSavingData ( quitType ) -- فنكشن if (isGuestAccount (getPlayerAccount(source))) then return end -- تتأكد ان الاعب كان مسجل دخوله قبل مايطلع local T1 = getElementData (source, "DATA") -- تجيب الالمنت داتا الي عليه setAccountData(getPlayerAccount(source),"DATA", T1) end -- أند addEventHandler ( "onPlayerQuit", getRootElement(), quitPlayerSavingData ) -- ايفنت لما يطلع الاعب كذا لما يطلع الاعب من السيرفر يجيب الالمنت داتا الي عليه ويحطها اكاونت داتا ، ثم لما يدخل يجيب الاكاونت داتا حقه ويحطها المنت داتا مرة ثانية وخلصنا شكراًً لك شرح جميل وفهمت كل شيئ منه Link to comment
HassoN Posted February 4, 2016 Share Posted February 4, 2016 شكراًً لك شرح جميل وفهمت كل شيئ منه العفو ، حياك الله ~ Link to comment
Ja[B]er[X]Pro Posted February 4, 2016 Author Share Posted February 4, 2016 شكراًً لك شرح جميل وفهمت كل شيئ منه العفو ، حياك الله ~ انا مسوي يعطي داتا الحديد بعدد عشوائي كيف اسوي اكتر من داتا ويعطيه داتا عشوائية بعدد عشوائي Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now