M7MD# Posted June 6, 2015 Share Posted June 6, 2015 السلام عليكم GtaWorldابي كود الي يرسم كتابة في الــ يعني مثلا ابي اكتب شيء معين فوق الماركر وكذا الرجاء المُساعدة والسلام عليكم Link to comment
[iMr]-W[i]Fi,.! Posted June 7, 2015 Share Posted June 7, 2015 (edited) i'm sorry Delete Re: Edited June 7, 2015 by Guest Link to comment
N3xT Posted June 7, 2015 Share Posted June 7, 2015 ^ بلاك نكست ما بتخرب عليه ؟ بتجي في وجهه في كل مكان لازم يسوي ماركر مخفي قريب عن الماركر الاصلي ويعمل هاد "onMarkerHit" -- Event addEventHandler( "onClientRender", root, dxDrawText) -- اضافه النص removeEventHandler( "onClientRender", root, dxDrawText) -- اخراج النص اذا خرج من الماركر وطبعا تعمل else باديك مثال ما جربته function MarkerHit() -- اسم الوظيفه if ( source == marker ) then -- نتحقق من الماركر addEventHandler( "onClientRender", root, dxDrawText) -- نصنع نص else -- لو خرج من الماركر وذا شيء انا مني متأكد منه صراحه removeEventHandler( "onClientRender", root, dxDrawText) -- نحذف النص end end addEventHandler( "onMarkerHit", root, MarkerHit ) لو في اخطاء تعالي واديني الديبوق واحلها انشاءالله ,, وطبعاً اول شيء تستعمل اكواد بلاك نيكست لا ي شيخ , الكود حقك اذا دخل الماركر يكتب له هو يبي يكتب له بدون م يدخل الماركر انا عطيته الكود .. وهو يجرب يحط له أحداثيات المكان Link to comment
[iMr]-W[i]Fi,.! Posted June 7, 2015 Share Posted June 7, 2015 لو سو الحركه مو صح راح تصير على وجه الاعب ؟ طريقتي بتقعد طويل !! انا قصدي انه لو احس اني غلطان مدري ليش ض1 المهمه بحذف الرد بس كنت احاول اقول انه لو جرب كذه راح تصير على وجهه Link to comment
mouamle Posted June 7, 2015 Share Posted June 7, 2015 جرب هذا ما اتذكر من وين نسختة بس المهم يشتغل function renderIng( ) local x, y, z = getCameraMatrix( ) local dimension = getElementDimension( localPlayer ) for key, marker in ipairs ( getElementsByType( "marker", resourceRoot ) ) do if getElementDimension( marker ) == dimension then local px, py, pz = getElementPosition( marker ) local distance = getDistanceBetweenPoints3D( px, py, pz, x, y, z ) if distance <= 50 then local text = getElementData( marker, "message" ) if text and ( distance < 3 or isLineOfSightClear( x, y, z, px, py, pz + 1.7, true, true, true, true, false, false, true, localPlayer ) ) then local sx, sy = getScreenFromWorldPosition( px, py, pz + 1.7 ) if sx and sy then local w = dxGetTextWidth( tostring( text ) ) local h = ( text and 3 or 1 ) * dxGetFontHeight( ) dxDrawText( tostring( text ), sx, sy, sx, sy, tocolor( 255, 255, 255, 255 ), 4, "Tahoma", "center", "center" ) end end end end end end addEventHandler( "onClientRender", getRootElement( ),renderIng) Marker = createMarker ( x, y, z, "cylinder", s, r, g, b, a ) setElementData(Marker,"message","الكتابة") Link to comment
#|_oskar_|# Posted June 7, 2015 Share Posted June 7, 2015 text = { {"Text 1",-1323,-147,15, -- x,y,z pos 255,0,255},-- r,g,b color -- {"Text",x,y,z,r,g,b}, } addEventHandler ( "onClientRender", root, function (v) for _,v in ipairs (text) do if ( getDistanceBetweenPoints3D (v[2],v[3],v[4], getElementPosition ( localPlayer ) ) ) < 50 then local pos = { getScreenFromWorldPosition ( v[2],v[3],v[4]) } if pos[1] and pos[2] then dxDrawText (v[1], pos[1],pos[2],pos[1],pos[2], tocolor(v[5],v[6],v[7]), 2, "default-bold" ) end end end end) 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