فاّرس Posted July 12, 2013 Share Posted July 12, 2013 vTable = { [ 1 ] = { -2695.6999511719, -185.30000305176, 3.3000001907349 }, [ 2 ] = { -2717, -95.5, 3.3000001907349 }, [ 3 ] = { -2716.8999023438, -54.799999237061, 3.3000001907349 }, [ 4 ] = { -2717.1999511719, 1.7999999523163, 3.3000001907349 }, [ 5 ] = { -2696.1000976563, 59.799999237061, 3.3000001907349 }, [ 6 ] = { -2695.8000488281, 77.800003051758, 3.3000001907349 }, [ 7 ] = { -2694.5, 118.80000305176, 3.3000001907349 }, } local one = createMarker ( -2622.6, 131.599, 7, "cylinder", 1.5, 255, 255, 0, 170 ) addEventHandler('onClientMarkerHit',one, function moneys( hitPlayer ) if hitPlayer == localPlayer then local x,y,z = getElementPosition ( source ) local px,py,pz = getElementPosition ( hitPlayer ) if z and pz then local check = math.abs ( pz - z ) if 1 >= check then triggerLatentServerEvent ( "money",hitPlayer ) local PosX,PosY,PosZ = unpack( vTable [ math.random( #vTable ) ] ) setElementPosition (one, PosX, PosY, PosZ) end end end end,false ) Link to comment
KinG_DrifT Posted July 12, 2013 Author Share Posted July 12, 2013 ماتطلع عشوائي :\ ابي هـ الماركر, يطلع عشوائي في ايي احداثي من الجدول local one = createMarker ( -2622.6, 131.599, 7, "cylinder", 1.5, 255, 255, 0, 170 ) Link to comment
فاّرس Posted July 12, 2013 Share Posted July 12, 2013 اتوقع الخطأ من اسم الفنكشن , جرب كذا, vTable = { [ 1 ] = { -2695.6999511719, -185.30000305176, 3.3000001907349 }, [ 2 ] = { -2717, -95.5, 3.3000001907349 }, [ 3 ] = { -2716.8999023438, -54.799999237061, 3.3000001907349 }, [ 4 ] = { -2717.1999511719, 1.7999999523163, 3.3000001907349 }, [ 5 ] = { -2696.1000976563, 59.799999237061, 3.3000001907349 }, [ 6 ] = { -2695.8000488281, 77.800003051758, 3.3000001907349 }, [ 7 ] = { -2694.5, 118.80000305176, 3.3000001907349 }, } local one = createMarker ( -2622.6, 131.599, 7, "cylinder", 1.5, 255, 255, 0, 170 ) addEventHandler('onClientMarkerHit',one, function( hitPlayer ) if hitPlayer == localPlayer then local x,y,z = getElementPosition ( source ) local px,py,pz = getElementPosition ( hitPlayer ) if z and pz then local check = math.abs ( pz - z ) if 1 >= check then triggerLatentServerEvent ( "money",hitPlayer ) local PosX,PosY,PosZ = unpack( vTable [ math.random( #vTable ) ] ) setElementPosition (one, PosX, PosY, PosZ) end end end end,false ) Link to comment
KinG_DrifT Posted July 12, 2013 Author Share Posted July 12, 2013 يَ اخي ليه مو قادر تفهمني انا ابي الماركر يطلع عشوائي, يختار من الاحداثيات اللي بالجدول Link to comment
فاّرس Posted July 12, 2013 Share Posted July 12, 2013 جرب كذا ذذ, vTable = { [ 1 ] = { -2695.6999511719, -185.30000305176, 3.3000001907349 }, [ 2 ] = { -2717, -95.5, 3.3000001907349 }, [ 3 ] = { -2716.8999023438, -54.799999237061, 3.3000001907349 }, [ 4 ] = { -2717.1999511719, 1.7999999523163, 3.3000001907349 }, [ 5 ] = { -2696.1000976563, 59.799999237061, 3.3000001907349 }, [ 6 ] = { -2695.8000488281, 77.800003051758, 3.3000001907349 }, [ 7 ] = { -2694.5, 118.80000305176, 3.3000001907349 }, } local PosX,PosY,PosZ = unpack( vTable [ math.random( #vTable ) ] ) local one = createMarker ( PosX,PosY,PosZ, "cylinder", 1.5, 255, 255, 0, 170 ) addEventHandler('onClientMarkerHit',one, function( hitPlayer ) if hitPlayer == localPlayer then local x,y,z = getElementPosition ( source ) local px,py,pz = getElementPosition ( hitPlayer ) if z and pz then local check = math.abs ( pz - z ) if 1 >= check then triggerLatentServerEvent ( "money",hitPlayer ) end end end end,false ) Link to comment
KinG_DrifT Posted July 12, 2013 Author Share Posted July 12, 2013 جرب كذا ذذ, vTable = { [ 1 ] = { -2695.6999511719, -185.30000305176, 3.3000001907349 }, [ 2 ] = { -2717, -95.5, 3.3000001907349 }, [ 3 ] = { -2716.8999023438, -54.799999237061, 3.3000001907349 }, [ 4 ] = { -2717.1999511719, 1.7999999523163, 3.3000001907349 }, [ 5 ] = { -2696.1000976563, 59.799999237061, 3.3000001907349 }, [ 6 ] = { -2695.8000488281, 77.800003051758, 3.3000001907349 }, [ 7 ] = { -2694.5, 118.80000305176, 3.3000001907349 }, } local PosX,PosY,PosZ = unpack( vTable [ math.random( #vTable ) ] ) local one = createMarker ( PosX,PosY,PosZ, "cylinder", 1.5, 255, 255, 0, 170 ) addEventHandler('onClientMarkerHit',one, function( hitPlayer ) if hitPlayer == localPlayer then local x,y,z = getElementPosition ( source ) local px,py,pz = getElementPosition ( hitPlayer ) if z and pz then local check = math.abs ( pz - z ) if 1 >= check then triggerLatentServerEvent ( "money",hitPlayer ) end end end end,false ) وين setElementPosition جربت حطيتها كذا وماضبطت setElementPosition (one, PosX, PosY, PosZ) Link to comment
فاّرس Posted July 12, 2013 Share Posted July 12, 2013 وليه تنقل الماركر الى احداثيات عشوائيه ؟ هو اول ما يشتغل المود بيكون الماركر في مكان عشوائي من الجدول ._./: + ليه مستخدم triggerLatentServerEvent؟ Link to comment
KinG_DrifT Posted July 12, 2013 Author Share Posted July 12, 2013 لان انا ابيه اذا وقفت عـ الماركر ينتقل, واروح له , اوقف عليه وينتقل, وتستمر الحياة ض1 + وشش فايدة triggerLatentServerEvent انا اذكر ان واحد عطاني الكود ذا Link to comment
فاّرس Posted July 12, 2013 Share Posted July 12, 2013 انا هذا الفنكشن ما فهمته ذذ, بس استخدم triggerServerEvent + الحين اول تقول تبي الماركر يكون بمكان عشوائي والحين تبي اذا لمسته ؟ ارجع للرد حقي ورا وبتقلى الكود ذذ 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