3NeD Posted June 18, 2013 Share Posted June 18, 2013 آلسلآم عليكم ,, شبآب , آبي كيف آخليه يوم يضغط مثلا سهم يمين يصير له حدث setCameraMatrix واذا ضغط مره ثانيه يروح لمككان ثآني وكذا مثلا لو فيه 3 اماكن يصير كل ضغطه يروح لمكان + كل مكان محدد يطلع فوق كلآم محدد وشكرآ وآعذرونآ ترآنآ مبتدئين : ( قسم آلدروس فآضي ! Link to comment
iPrestege Posted June 18, 2013 Share Posted June 18, 2013 setCameraMatrix bindKey dxDrawText onClientRender Link to comment
3NAD Posted June 18, 2013 Share Posted June 18, 2013 bindKey setCameraMatrix https://wiki.multitheftauto.com/wiki/Key_names arrows Ex.: numbersTable = { [1] = "Welcome", [2] = "Bye", }; bindKey ( "arrow_l", "down", function ( ) number = ( number +1 ) or 1 outputChatBox ( numbersTable [ number ] or "n/a" ) end ) ^ لم يتم التجربة Link to comment
iPrestege Posted June 18, 2013 Share Posted June 18, 2013 bindKey setCameraMatrix https://wiki.multitheftauto.com/wiki/Key_names arrows Ex.: numbersTable = { [1] = "Welcome", [2] = "Bye", }; bindKey ( "arrow_l", "down", function ( ) number = ( number +1 ) or 1 outputChatBox ( numbersTable [ number ] or "n/a" ) end ) ^ لم يتم التجربة number = ? local number = 0 numbersTable = { [1] = "Welcome", [2] = "Bye", }; bindKey ( "arrow_l", "down", function ( ) number = ( number +1 ) or 1 outputChatBox ( numbersTable [ number ] or "n/a" ) end ) Link to comment
Blaawee Posted June 18, 2013 Share Posted June 18, 2013 مو مجرب local gTable = { [ 1 ] = { text = '', x = 0, y = 0, z = 0, lookAtX = 0, lookAtY = 0, lookAtZ = 0 }, [ 2 ] = { text = '', x = 0, y = 0, z = 0, lookAtX = 0, lookAtY = 0, lookAtZ = 0 }, [ 3 ] = { text = '', 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 end bindKey ( 'arrow_l', 'down', swingBettwenArrow ); bindKey ( 'arrow_r', 'down', swingBettwenArrow ); 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
PaiN^ Posted June 22, 2013 Share Posted June 22, 2013 @ Mr.Pres[T]ege : بقيمته + واحد أو واحد number عناد عرف المتغير في أول مرة راح تعتبر قيمته 1, أما بعد كذا تعتبر قيمته + 1 nil يعني لو كان Link to comment
iPrestege Posted June 22, 2013 Share Posted June 22, 2013 @ Mr.Pres[T]ege : بقيمته + واحد أو واحد number عناد عرف المتغيرفي أول مرة راح تعتبر قيمته 1, أما بعد كذا تعتبر قيمته + 1 nil يعني لو كان لازم نرجع للموضوع مرة ثانية عناد على ايش مسح الردود انا مدري ((= يلا رح جرب وشف لي الديبوق وش يقول Link to comment
3NeD Posted June 22, 2013 Author Share Posted June 22, 2013 كود اخوي Balaawee اعتقد انه شغال تمااام بس يقولي بالديبوق سكربت :8 :attempt to call global 'guiGetScreenSize' (a nil value) local gTable = { [ 1 ] = { text = 'Deathmatch', x = -2409.3894042969, y = -590.20471191406, z = 133.76609802246, lookAtX = -2408.6171875, lookAtY = -589.58673095703, lookAtZ = 133.61820983887 }, [ 2 ] = { text = 'Shooter', x = -2405.05859375, y = -593.91851806641, z = 133.72450256348, lookAtX = -2404.2844238281, lookAtY = -593.30578613281, lookAtZ = 133.56579589844 }, [ 3 ] = { text = 'Race', x = -2402.2358398438, y = -598.51428222656, z = 133.95359802246, lookAtX = -2401.4189453125, lookAtY = -598.00207519531, lookAtZ = 133.6880645752 } }; 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 end bindKey ( 'arrow_l', 'down', swingBettwenArrow ); bindKey ( 'arrow_r', 'down', swingBettwenArrow ); 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
3NeD Posted June 22, 2013 Author Share Posted June 22, 2013 لآ حطيته سيرفر >< آتمنى توضح لي آلكلآينت وآلسيرفر Link to comment
3NeD Posted June 22, 2013 Author Share Posted June 22, 2013 مشكورين جميعآ , آلمود آشتغل تمآم ومآ قصرتوآ 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