EH10 Posted January 26, 2014 Share Posted January 26, 2014 السلام عليكم طلب فنكشات اول مايشغل المود يجي كاميرا على الدائري وتضغط سهم يمين يروح للنخيل يضغط سهم يمين يروح للغروب ويضغط سهم يسار يرجع للنخيل كذا نشااالله فهمتو Link to comment
iPrestege Posted January 26, 2014 Share Posted January 26, 2014 السلام عليكمطلب فنكشات اول مايشغل المود يجي كاميرا على الدائري وتضغط سهم يمين يروح للنخيل يضغط سهم يمين يروح للغروب ويضغط سهم يسار يرجع للنخيل كذا نشااالله فهمتو interpolateBetween شكلهآ صعبه عليكك موب شرط تكون الكآميرآ تتحركك تقدر تسوي تسوي فيد للكآميرآ احسن ب النسبه لكك + العوالم الوهميه جرب ذآ local gTable = { [ 1 ] = { text = '', dimension = 0, x = 0, y = 0, z = 0, lookAtX = 0, lookAtY = 0, lookAtZ = 0 }, [ 2 ] = { text = '', dimension = 0, x = 0, y = 0, z = 0, lookAtX = 0, lookAtY = 0, lookAtZ = 0 }, [ 3 ] = { text = '', dimension = 0, x = 0, y = 0, z = 0, lookAtX = 0, lookAtY = 0, lookAtZ = 0 } }; local i = 1; local screen = { guiGetScreenSize( ) }; function swingBettwenArrow( key ) if key == 'arrow_l' then if i == 1 then i = #gTable; else i = i - 1; end else if i == #gTable then i = 1; else i = i + 1; end end fadeCamera( true ); end bindKey ( 'arrow_l', 'down', swingBettwenArrow ); bindKey ( 'arrow_r', 'down', swingBettwenArrow ); function enterTheDimension( Key ) if Key == 'enter' then setElementDimension( localPlayer, gTable[i].dimension ); end end bindKey( 'enter', 'down', enterTheDimension ); addEventHandler( 'onClientRender', root, function( ) dxDrawText( gTable[i].text, screen[ 1 ] / 2 - dxGetTextWidth( gTable[i].text, 1, 'arial' ) / 2, screen[ 2 ] / 2 + 128, screen[ 1 ], screen[ 2 ], tocolor( 255, 255, 255, 255), 1, 'arial', 'left', 'top', false, false, false, true ); setCameraMatrix( gTable[i].x, gTable[i].y, gTable[i].z, gTable[i].lookAtX, gTable[i].lookAtY, gTable[i].lookAtZ ); end ); Link to comment
EH10 Posted January 26, 2014 Author Share Posted January 26, 2014 السلام عليكمطلب فنكشات اول مايشغل المود يجي كاميرا على الدائري وتضغط سهم يمين يروح للنخيل يضغط سهم يمين يروح للغروب ويضغط سهم يسار يرجع للنخيل كذا نشااالله فهمتو interpolateBetween شكلهآ صعبه عليكك موب شرط تكون الكآميرآ تتحركك تقدر تسوي تسوي فيد للكآميرآ احسن ب النسبه لكك + العوالم الوهميه جرب ذآ local gTable = { [ 1 ] = { text = '', dimension = 0, x = 0, y = 0, z = 0, lookAtX = 0, lookAtY = 0, lookAtZ = 0 }, [ 2 ] = { text = '', dimension = 0, x = 0, y = 0, z = 0, lookAtX = 0, lookAtY = 0, lookAtZ = 0 }, [ 3 ] = { text = '', dimension = 0, x = 0, y = 0, z = 0, lookAtX = 0, lookAtY = 0, lookAtZ = 0 } }; local i = 1; local screen = { guiGetScreenSize( ) }; function swingBettwenArrow( key ) if key == 'arrow_l' then if i == 1 then i = #gTable; else i = i - 1; end else if i == #gTable then i = 1; else i = i + 1; end end fadeCamera( true ); end bindKey ( 'arrow_l', 'down', swingBettwenArrow ); bindKey ( 'arrow_r', 'down', swingBettwenArrow ); function enterTheDimension( Key ) if Key == 'enter' then setElementDimension( localPlayer, gTable[i].dimension ); end end bindKey( 'enter', 'down', enterTheDimension ); addEventHandler( 'onClientRender', root, function( ) dxDrawText( gTable[i].text, screen[ 1 ] / 2 - dxGetTextWidth( gTable[i].text, 1, 'arial' ) / 2, screen[ 2 ] / 2 + 128, screen[ 1 ], screen[ 2 ], tocolor( 255, 255, 255, 255), 1, 'arial', 'left', 'top', false, false, false, true ); setCameraMatrix( gTable[i].x, gTable[i].y, gTable[i].z, gTable[i].lookAtX, gTable[i].lookAtY, gTable[i].lookAtZ ); end ); السلام عليكمطلب فنكشات اول مايشغل المود يجي كاميرا على الدائري وتضغط سهم يمين يروح للنخيل يضغط سهم يمين يروح للغروب ويضغط سهم يسار يرجع للنخيل كذا نشااالله فهمتو Link to comment
The Killer Posted January 26, 2014 Share Posted January 26, 2014 عطاك الكود جاهز ,, تبيه خذه جاهز ماتبيه خذ منه الفنكشنات #ٌ_#ٌ Link to comment
EH10 Posted January 26, 2014 Author Share Posted January 26, 2014 عطاك الكود جاهز ,,تبيه خذه جاهز ماتبيه خذ منه الفنكشنات #ٌ_#ٌ اضغط انتر ماينتقل Link to comment
The Killer Posted January 26, 2014 Share Posted January 26, 2014 (edited) عدل السطر 32 بمكان الاحداثيات local gTable = { [ 1 ] = { text = '', dimension = 0, x = 0, y = 0, z = 0, lookAtX = 0, lookAtY = 0, lookAtZ = 0 }, [ 2 ] = { text = '', dimension = 0, x = 0, y = 0, z = 0, lookAtX = 0, lookAtY = 0, lookAtZ = 0 }, [ 3 ] = { text = '', dimension = 0, x = 0, y = 0, z = 0, lookAtX = 0, lookAtY = 0, lookAtZ = 0 } }; local i = 1; local screen = { guiGetScreenSize( ) }; function swingBettwenArrow( key ) if key == 'arrow_l' then if i == 1 then i = #gTable; else i = i - 1; end else if i == #gTable then i = 1; else i = i + 1; end end fadeCamera( true ); end bindKey ( 'arrow_l', 'down', swingBettwenArrow ); bindKey ( 'arrow_r', 'down', swingBettwenArrow ); function enterTheDimension( Key ) if Key == "enter" then setElementDimension( localPlayer, gTable[i].dimension ); setElementPosition(localPlayer, x,y,z) setCameraTarget(localPlayer) removeEventHandler( "onClientRender", root, look) end end bindKey( "enter", "down", enterTheDimension ); function look () dxDrawText( gTable[i].text, screen[ 1 ] / 2 - dxGetTextWidth( gTable[i].text, 1, "arial" ) / 2, screen[ 2 ] / 2 + 128, screen[ 1 ], screen[ 2 ], tocolor( 255, 255, 255, 255), 1, "arial", "left", "top", false, false, false, true ); setCameraMatrix( gTable[i].x, gTable[i].y, gTable[i].z, gTable[i].lookAtX, gTable[i].lookAtY, gTable[i].lookAtZ ); end addEventHandler( "onClientRender", root, look) Edited January 26, 2014 by Guest Link to comment
EH10 Posted January 26, 2014 Author Share Posted January 26, 2014 عدل السطر 32 بمكان الاحداثيات local gTable = { [ 1 ] = { text = '', dimension = 0, x = 0, y = 0, z = 0, lookAtX = 0, lookAtY = 0, lookAtZ = 0 }, [ 2 ] = { text = '', dimension = 0, x = 0, y = 0, z = 0, lookAtX = 0, lookAtY = 0, lookAtZ = 0 }, [ 3 ] = { text = '', dimension = 0, x = 0, y = 0, z = 0, lookAtX = 0, lookAtY = 0, lookAtZ = 0 } }; local i = 1; local screen = { guiGetScreenSize( ) }; function swingBettwenArrow( key ) if key == 'arrow_l' then if i == 1 then i = #gTable; else i = i - 1; end else if i == #gTable then i = 1; else i = i + 1; end end fadeCamera( true ); end bindKey ( 'arrow_l', 'down', swingBettwenArrow ); bindKey ( 'arrow_r', 'down', swingBettwenArrow ); function enterTheDimension( Key ) if Key == 'enter' then setElementDimension( localPlayer, gTable[i].dimension ); setElementPosition(localPlayer, x,y,z) end end bindKey( 'enter', 'down', enterTheDimension ); addEventHandler( 'onClientRender', root, function( ) dxDrawText( gTable[i].text, screen[ 1 ] / 2 - dxGetTextWidth( gTable[i].text, 1, 'arial' ) / 2, screen[ 2 ] / 2 + 128, screen[ 1 ], screen[ 2 ], tocolor( 255, 255, 255, 255), 1, 'arial', 'left', 'top', false, false, false, true ); setCameraMatrix( gTable[i].x, gTable[i].y, gTable[i].z, gTable[i].lookAtX, gTable[i].lookAtY, gTable[i].lookAtZ ); end ); لو سمحت قصدي الان تضغط سهم يمين يتغير وكذا ابي كل كاميرا فيها انتقال خاص Link to comment
The Killer Posted January 26, 2014 Share Posted January 26, 2014 طيب غير الاحداثيات + انسخ الكود مره ثانيه وعدل الاحداثيات تلقاها فوق x = 0 y = 0 z = 0 غير الصفر بمكان الاحداثيات Link to comment
EH10 Posted January 26, 2014 Author Share Posted January 26, 2014 طيب غير الاحداثيات + انسخ الكود مره ثانيهوعدل الاحداثيات تلقاها فوق x = 0 y = 0 z = 0 غير الصفر بمكان الاحداثيات الي بالتيبل بالسطر الاول ؟ Link to comment
The Killer Posted January 26, 2014 Share Posted January 26, 2014 شف انا سويتها لك بطريقه ثانيه لأن صاحب الكود ناسي فيه اشياء كثيره الزبده في الكود حق الانتر سويته لك على حسب التكست عشان تتسهل عليك + في كل تكست لها مكان انت غير ال x,y,z بالمكان الي بينتقل له اذا ضغط انتر الي هي من السطر 31 الى 41 جرب local gTable = { [ 1 ] = { text = "الدائري", dimension = 0, x = 0, y = 0, z = 0, lookAtX = 0, lookAtY = 0, lookAtZ = 0 }, [ 2 ] = { text = "النخيل", dimension = 0, x = 0, y = 0, z = 0, lookAtX = 0, lookAtY = 0, lookAtZ = 0 }, [ 3 ] = { text = "البدايه", dimension = 0, x = 0, y = 0, z = 0, lookAtX = 0, lookAtY = 0, lookAtZ = 0 } }; local i = 1; local screen = { guiGetScreenSize( ) }; function swingBettwenArrow( key ) if key == "arrow_l" then if i == 1 then i = #gTable; else i = i - 1; end else if i == #gTable then i = 1; else i = i + 1; end end fadeCamera( true ); end bindKey ( "arrow_l", "down", swingBettwenArrow ); bindKey ( "arrow_r", "down", swingBettwenArrow ); function enterTheDimension( Key ) if Key == "enter" then setElementDimension( localPlayer, gTable[i].dimension ); if gTable[i].text == "الدائري" then setElementPosition(localPlayer, x,y,z) setCameraTarget(localPlayer) removeEventHandler( "onClientRender", root, look) elseif gTable[i].text == "النخيل" then setElementPosition(localPlayer, x,y,z) setCameraTarget(localPlayer) removeEventHandler( "onClientRender", root, look) elseif gTable[i].text == "البدايه" then setElementPosition(localPlayer, x,y,z) setCameraTarget(localPlayer) removeEventHandler( "onClientRender", root, look) end end end bindKey( "enter", "down", enterTheDimension ); function look () dxDrawText( gTable[i].text, screen[ 1 ] / 2 - dxGetTextWidth( gTable[i].text, 1, "arial" ) / 2, screen[ 2 ] / 2 + 128, screen[ 1 ], screen[ 2 ], tocolor( 255, 255, 255, 255), 1, "arial", "left", "top", false, false, false, true ); setCameraMatrix( gTable[i].x, gTable[i].y, gTable[i].z, gTable[i].lookAtX, gTable[i].lookAtY, gTable[i].lookAtZ ); end addEventHandler( "onClientRender", root, look) Link to comment
فاّرس Posted January 26, 2014 Share Posted January 26, 2014 ^ وين تسهل عليه؟ خخخ كود بلاوي مختصر والمفروض الي يتعلم برمجه يتعلم يختصر عشان يفيد نفسه ويسوي اكواده بسرعه Link to comment
EH10 Posted January 26, 2014 Author Share Posted January 26, 2014 ^ وين تسهل عليه؟ خخخ كود بلاوي مختصر والمفروض الي يتعلم برمجه يتعلم يختصر عشان يفيد نفسه ويسوي اكواده بسرعه يعطيكم العافية بس حتى انا احاول اتعلم والاكواد الصعبة اطلبها السبب اشوفها وفهمها Link to comment
The Killer Posted January 26, 2014 Share Posted January 26, 2014 ^ وين تسهل عليه؟ خخخ كود بلاوي مختصر والمفروض الي يتعلم برمجه يتعلم يختصر عشان يفيد نفسه ويسوي اكواده بسرعه مب لازم اختصر هذا مجرد تصحيح لا غير ابي اختصر ولا لا هذا شي راجع لي انا صححت له الكود لا اكثر -,- يعطيكم العافية بس حتى انا احاول اتعلم والاكواد الصعبة اطلبها السبب اشوفها وفهمها الله يعافيك # Link to comment
CRoW,,# Posted January 29, 2014 Share Posted January 29, 2014 شف انا سويتها لك بطريقه ثانيهلأن صاحب الكود ناسي فيه اشياء كثيره الزبده في الكود حق الانتر سويته لك على حسب التكست عشان تتسهل عليك + في كل تكست لها مكان انت غير ال x,y,z بالمكان الي بينتقل له اذا ضغط انتر الي هي من السطر 31 الى 41 جرب local gTable = { [ 1 ] = { text = "الدائري", dimension = 0, x = 0, y = 0, z = 0, lookAtX = 0, lookAtY = 0, lookAtZ = 0 }, [ 2 ] = { text = "النخيل", dimension = 0, x = 0, y = 0, z = 0, lookAtX = 0, lookAtY = 0, lookAtZ = 0 }, [ 3 ] = { text = "البدايه", dimension = 0, x = 0, y = 0, z = 0, lookAtX = 0, lookAtY = 0, lookAtZ = 0 } }; local i = 1; local screen = { guiGetScreenSize( ) }; function swingBettwenArrow( key ) if key == "arrow_l" then if i == 1 then i = #gTable; else i = i - 1; end else if i == #gTable then i = 1; else i = i + 1; end end fadeCamera( true ); end bindKey ( "arrow_l", "down", swingBettwenArrow ); bindKey ( "arrow_r", "down", swingBettwenArrow ); function enterTheDimension( Key ) if Key == "enter" then setElementDimension( localPlayer, gTable[i].dimension ); if gTable[i].text == "الدائري" then setElementPosition(localPlayer, x,y,z) setCameraTarget(localPlayer) removeEventHandler( "onClientRender", root, look) elseif gTable[i].text == "النخيل" then setElementPosition(localPlayer, x,y,z) setCameraTarget(localPlayer) removeEventHandler( "onClientRender", root, look) elseif gTable[i].text == "البدايه" then setElementPosition(localPlayer, x,y,z) setCameraTarget(localPlayer) removeEventHandler( "onClientRender", root, look) end end end bindKey( "enter", "down", enterTheDimension ); function look () dxDrawText( gTable[i].text, screen[ 1 ] / 2 - dxGetTextWidth( gTable[i].text, 1, "arial" ) / 2, screen[ 2 ] / 2 + 128, screen[ 1 ], screen[ 2 ], tocolor( 255, 255, 255, 255), 1, "arial", "left", "top", false, false, false, true ); setCameraMatrix( gTable[i].x, gTable[i].y, gTable[i].z, gTable[i].lookAtX, gTable[i].lookAtY, gTable[i].lookAtZ ); end addEventHandler( "onClientRender", root, look) معليشش ادري الموضوع له اسبوعع بس كودك ذا م يشتغل يالغالي .. addEventHandler("onClientResourceStart", resourceRoot, function() local gTable = { [ 1 ] = { text = "الدائري", dimension = 0, x = -3275.85913, y = -2971.42334, z = 499.37030, lookAtX = -3292.92065, lookAtY = -2853.30176, lookAtZ = 482.50317 }, [ 2 ] = { text = "النخيل", dimension = 0, x = 1873.07971, y = 825.39416, z = 29.59185, lookAtX = 1797.5855712891, lookAtY = 830.97955322266, lookAtZ = 10.664346694946 }, [ 3 ] = { text = "البدايه", dimension = 0, x = -3070.94921, y = -3083.84301, z = 45.22809, lookAtX = -3072.5554199219, lookAtY = -3000.345703125, lookAtZ = 5 } }; local i = 1; local screen = { guiGetScreenSize( ) }; function swingBettwenArrow( key ) if key == "arrow_l" then if i == 1 then i = #gTable; else i = i - 1; end else if i == #gTable then i = 1; else i = i + 1; end end fadeCamera( true ); end bindKey ( "arrow_l", "down", swingBettwenArrow ); bindKey ( "arrow_r", "down", swingBettwenArrow ); function enterTheDimension( Key ) if Key == "enter" then setElementDimension( localPlayer, gTable[i].dimension ); if gTable[i].text == "الدائري" then setElementPosition(localPlayer, 1797.5855712891,830.97955322266,10.664346694946) setCameraTarget(localPlayer) removeEventHandler( "onClientRender", root, look) elseif gTable[i].text == "النخيل" then setElementPosition(localPlayer, -2541.21655, -2897.66601, 18.39924) setCameraTarget(localPlayer) removeEventHandler( "onClientRender", root, look) elseif gTable[i].text == "البدايه" then setElementPosition(localPlayer, -3070.94921, -3083.84301, 45.22809) setCameraTarget(localPlayer) removeEventHandler( "onClientRender", root, look) end end end bindKey( "enter", "down", enterTheDimension ); function look () dxDrawText( gTable[i].text, screen[ 1 ] / 2 - dxGetTextWidth( gTable[i].text, 1, "arial" ) / 2, screen[ 2 ] / 2 + 128, screen[ 1 ], screen[ 2 ], tocolor( 255, 255, 255, 255), 1, "arial", "left", "top", false, false, false, true ); setCameraMatrix( gTable[i].x, gTable[i].y, gTable[i].z, gTable[i].lookAtX, gTable[i].lookAtY, gTable[i].lookAtZ ); end addEventHandler( "onClientRender", root, look) end Link to comment
The Killer Posted January 30, 2014 Share Posted January 30, 2014 local gTable = { [ 1 ] = { text = "الدائري", dimension = 0, x = -3275.85913, y = -2971.42334, z = 499.37030, lookAtX = -3292.92065, lookAtY = -2853.30176, lookAtZ = 482.50317 }, [ 2 ] = { text = "النخيل", dimension = 0, x = 1873.07971, y = 825.39416, z = 29.59185, lookAtX = 1797.5855712891, lookAtY = 830.97955322266, lookAtZ = 10.664346694946 }, [ 3 ] = { text = "البدايه", dimension = 0, x = -3070.94921, y = -3083.84301, z = 45.22809, lookAtX = -3072.5554199219, lookAtY = -3000.345703125, lookAtZ = 5 } }; local i = 1; local screen = { guiGetScreenSize( ) }; function swingBettwenArrow( key ) if key == "arrow_l" then if i == 1 then i = #gTable; else i = i - 1; end else if i == #gTable then i = 1; else i = i + 1; end end fadeCamera( true ); end bindKey ( "arrow_l", "down", swingBettwenArrow ); bindKey ( "arrow_r", "down", swingBettwenArrow ); function enterTheDimension( Key ) if Key == "enter" then setElementDimension( localPlayer, gTable[i].dimension ); if gTable[i].text == "الدائري" then setElementPosition(localPlayer, 1797.5855712891,830.97955322266,10.664346694946) setCameraTarget(localPlayer) removeEventHandler( "onClientRender", root, look) elseif gTable[i].text == "النخيل" then setElementPosition(localPlayer, -2541.21655, -2897.66601, 18.39924) setCameraTarget(localPlayer) removeEventHandler( "onClientRender", root, look) elseif gTable[i].text == "البدايه" then setElementPosition(localPlayer, -3070.94921, -3083.84301, 45.22809) setCameraTarget(localPlayer) removeEventHandler( "onClientRender", root, look) end end end bindKey( "enter", "down", enterTheDimension ); function look () dxDrawText( gTable[i].text, screen[ 1 ] / 2 - dxGetTextWidth( gTable[i].text, 1, "arial" ) / 2, screen[ 2 ] / 2 + 128, screen[ 1 ], screen[ 2 ], tocolor( 255, 255, 255, 255), 1, "arial", "left", "top", false, false, false, true ); setCameraMatrix( gTable[i].x, gTable[i].y, gTable[i].z, gTable[i].lookAtX, gTable[i].lookAtY, gTable[i].lookAtZ ); end addEventHandler( "onClientRender", root, look) Link to comment
CRoW,,# Posted January 30, 2014 Share Posted January 30, 2014 يعطيكك الفف عافيةةة _ ما قصصرت يالحب .. تعبانك معنا .. 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