1337.Ibrahim Posted July 21, 2017 Share Posted July 21, 2017 السلام عليكم وش المشكلة هنا ما يحط الكاميرا على البيد addEventHandler ( "onClientGUIClick", root, function ( ) if source == spectate then triggerServerEvent('spec',localPlayer) end end) addEvent ("spec", true) addEventHandler ("spec", root, function() if Talis [ source ] and isElement ( Talis [ source ] ) then setCameraTarget( Talis [ source ]) end end) Link to comment
iMr.WiFi..! Posted July 21, 2017 Share Posted July 21, 2017 وين البيد , ووين التيبل ؟ 1 Link to comment
1337.Ibrahim Posted July 21, 2017 Author Share Posted July 21, 2017 Talis = {} addEvent ("ped", true) addEventHandler ("ped", root, function (ID,x,y,z,text) if isElement ( Talis [ source ] ) then destroyElement ( Talis [ source ] ) Talis [ source ] = nil end setElementData ( source,'PedBefore',true ) Talis [ source ] = createPed ( tonumber(ID),x,y+2,z ) getPedRotation (Talis [ source ]) triggerClientEvent ( client,'ped', Talis[ source ] ) setElementData ( Talis [ source ],'inf',Talis ) local vehicle = getPedOccupiedVehicle ( source ) if vehicle then warpPedIntoVehicle ( Talis [ source ], vehicle, 1 ) end end ) Link to comment
#BrosS Posted July 21, 2017 Share Posted July 21, 2017 setCameraTarget تشتغل على اللاعبين فقط جرب هيك function getPositionFromElementOffset(element,offX,offY,offZ) local m = getElementMatrix ( element ) -- Get the matrix local x = offX * m[1][1] + offY * m[2][1] + offZ * m[3][1] + m[4][1] -- Apply transform local y = offX * m[1][2] + offY * m[2][2] + offZ * m[3][2] + m[4][2] local z = offX * m[1][3] + offY * m[2][3] + offZ * m[3][3] + m[4][3] return x, y, z -- Return the transformed point end x,y,z = getPositionFromElementOffset(ped,3,0,0) x1,y1,z1 = getElementPosition(ped) setCameraMatrix(x,y,z,x1,y1,z1) غير ped الى اسم البيد حقك :- 1 Link to comment
1337.Ibrahim Posted July 21, 2017 Author Share Posted July 21, 2017 [09:30:07] WARNING: theped\server.lua:38: Bad argument @ 'setCameraMatrix' [Expec ted element at argument 1, got number '2051.9418945313'] Link to comment
Rockyz Posted July 21, 2017 Share Posted July 21, 2017 8 minutes ago, Talis said: [09:30:07] WARNING: theped\server.lua:38: Bad argument @ 'setCameraMatrix' [Expec ted element at argument 1, got number '2051.9418945313'] الارقمنت الاول حط البيد 1 Link to comment
1337.Ibrahim Posted July 21, 2017 Author Share Posted July 21, 2017 function getPositionFromElementOffset(element,offX,offY,offZ) local m = getElementMatrix ( element ) -- Get the matrix local x = offX * m[1][1] + offY * m[2][1] + offZ * m[3][1] + m[4][1] -- Apply transform local y = offX * m[1][2] + offY * m[2][2] + offZ * m[3][2] + m[4][2] local z = offX * m[1][3] + offY * m[2][3] + offZ * m[3][3] + m[4][3] return x, y, z -- Return the transformed point end addEvent ("spec", true) addEventHandler ("spec", root, function() x,y,z = getPositionFromElementOffset(Talis [ source ],3,0,0) x1,y1,z1 = getElementPosition(Talis [ source ]) setCameraMatrix(Talis [ source ],x,y,z,x1,y1,z1) end) مايراقب , حطيته كذا تمام ؟ Link to comment
1337.Ibrahim Posted July 24, 2017 Author Share Posted July 24, 2017 @Abdul KariM مساعدة Link to comment
xX|KeMo|Xx Posted July 24, 2017 Share Posted July 24, 2017 On 7/21/2017 at 08:46, Talis said: function getPositionFromElementOffset(element,offX,offY,offZ) local m = getElementMatrix ( element ) -- Get the matrix local x = offX * m[1][1] + offY * m[2][1] + offZ * m[3][1] + m[4][1] -- Apply transform local y = offX * m[1][2] + offY * m[2][2] + offZ * m[3][2] + m[4][2] local z = offX * m[1][3] + offY * m[2][3] + offZ * m[3][3] + m[4][3] return x, y, z -- Return the transformed point end addEvent ("spec", true) addEventHandler ("spec", root, function() x,y,z = getPositionFromElementOffset(Talis [ source ],3,0,0) x1,y1,z1 = getElementPosition(Talis [ source ]) setCameraMatrix(Talis [ source ],x,y,z,x1,y1,z1) end) مايراقب , حطيته كذا تمام ؟ setCameraMatrix(source,x,y,z,x1,y1,z1) 1 Link to comment
1337.Ibrahim Posted July 24, 2017 Author Share Posted July 24, 2017 9 minutes ago, xX|KeMo|Xx said: setCameraMatrix(source,x,y,z,x1,y1,z1) الله يجزاك خير بس ابي الكاميرا تتحرك مع البيد كيف Link to comment
iMr.WiFi..! Posted July 24, 2017 Share Posted July 24, 2017 1 hour ago, Talis said: الله يجزاك خير بس ابي الكاميرا تتحرك مع البيد كيف ترا مايحتاج كاميرا ماتركس بتحتاج تستعمل setCameraTarget 1 Link to comment
1337.Ibrahim Posted July 24, 2017 Author Share Posted July 24, 2017 3 minutes ago, iMr.WiFi..! said: ترا مايحتاج كاميرا ماتركس بتحتاج تستعمل setCameraTarget استعملت وطرحت لك اكوادي فوق Link to comment
iMr.WiFi..! Posted July 24, 2017 Share Posted July 24, 2017 function getPositionFromElementOffset(element,offX,offY,offZ) local m = getElementMatrix ( element ) -- Get the matrix local x = offX * m[1][1] + offY * m[2][1] + offZ * m[3][1] + m[4][1] -- Apply transform local y = offX * m[1][2] + offY * m[2][2] + offZ * m[3][2] + m[4][2] local z = offX * m[1][3] + offY * m[2][3] + offZ * m[3][3] + m[4][3] return x, y, z -- Return the transformed point end addEvent ("spec", true) addEventHandler ("spec", root, function() setCameraTarget(source,Talis [ source ]) end) Link to comment
1337.Ibrahim Posted July 24, 2017 Author Share Posted July 24, 2017 @iMr.WiFi..! مايراقب + ما يطلع شيء في الدي بق Link to comment
iMr.WiFi..! Posted July 24, 2017 Share Posted July 24, 2017 2 minutes ago, Talis said: @iMr.WiFi..! مايراقب + ما يطلع شيء في الدي بق توني اقرأ سينتاكس الفنكشن ولقيت مايدعم الا اللاعبين زي ماقال بروس فأتوقع مابتقدر تستعمل الا كود الي زبط معك ذذ 1 Link to comment
1337.Ibrahim Posted July 24, 2017 Author Share Posted July 24, 2017 6 minutes ago, iMr.WiFi..! said: توني اقرأ سينتاكس الفنكشن ولقيت مايدعم الا اللاعبين زي ماقال بروس فأتوقع مابتقدر تستعمل الا كود الي زبط معك ذذ طيب الحين كيف اخلي الكاميرا تتحرك من البيد اذا تحرك Link to comment
Rockyz Posted July 24, 2017 Share Posted July 24, 2017 25 minutes ago, Talis said: طيب الحين كيف اخلي الكاميرا تتحرك من البيد اذا تحرك اذا الاكواد كلنت تقدر تستخدم onClientRender 1 Link to comment
1337.Ibrahim Posted July 24, 2017 Author Share Posted July 24, 2017 2 minutes ago, #,+( _xiRoc[K]; > said: اذا الاكواد كلنت تقدر تستخدم onClientRender لا سيرفر 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