khalid-mks Posted January 11, 2015 Share Posted January 11, 2015 ابي كود يخلي الكتابة ماتضهر الى بعد مرور 5 ثواني وتبقى مدة 7 ثواني وتروح ونفس الشيء على الصصور وشكرا Link to comment
TAPL Posted January 12, 2015 Share Posted January 12, 2015 addEventHandler removeEventHandler setTimer Link to comment
# L 7 N Posted January 12, 2015 Share Posted January 12, 2015 :مثال addEventHandler("onClientResourceStart",root ,function() -- الحدث وبداية الوظيفة local x,y = guiGetScreenSize() -- المتغير img = guiCreateStaticImage(x/2-400, y/2-300,800,600, "img.png", false) -- نسوي صورة guiSetVisible(img,false) -- نخفي الصورة setTimer (guiSetVisible,1000,1,img,true) -- نطلع الصورة بعد 1 ثانية setTimer (guiSetVisible,5000,1,img,false) -- نخفي الصورة بعد 5 ثواني end) -- انهاء الوظيفه والحدث مثآل بسيط ، اتمنى فهمت Link to comment
khalid-mks Posted January 12, 2015 Author Share Posted January 12, 2015 اخي انا لا ادري لمادة لا تريد الاشتغال هاده كود الانترو ابيه يطلع صورة بعد مرور 2 ثواني ويشيل الصورة بعد مرور 5 ثواني من فضلكم القو نضرة ادا كان هناك غلط في الكود واجو التصحيح local sm = {} sm.moov = 0 sm.object1,sm.object2 = nil,nil local function removeCamHandler() if(sm.moov == 1)then sm.moov = 0 end end local function camRender() if (sm.moov == 1) then local x1,y1,z1 = getElementPosition(sm.object1) local x2,y2,z2 = getElementPosition(sm.object2) setCameraMatrix(x1,y1,z1,x2,y2,z2) end end addEventHandler("onClientPreRender",root,camRender) function smoothMoveCamera(x1,y1,z1,x1t,y1t,z1t,x2,y2,z2,x2t,y2t,z2t,time) if(sm.moov == 1)then return false end sm.object1 = createObject(1337,x1,y1,z1) sm.object2 = createObject(1337,x1t,y1t,z1t) setElementAlpha(sm.object1,0) setElementAlpha(sm.object2,0) setObjectScale(sm.object1,0.01) setObjectScale(sm.object2,0.01) moveObject(sm.object1,time,x2,y2,z2,0,0,0,"InOutQuad") moveObject(sm.object2,time,x2t,y2t,z2t,0,0,0,"InOutQuad") sm.moov = 1 setTimer(removeCamHandler,time,1) setTimer(destroyElement,time,1,sm.object1) setTimer(destroyElement,time,1,sm.object2) return true end addEventHandler("onClientResourceStart", resourceRoot, function( ) smoothMoveCamera ( 1266.0865478516, -1658.5220947266, 73.064628601074, -1658.5220947266, -1287.0975341797, 73.064628601074, 366.80706787109, -1598.6693115234, 69.612487792969, 366.80706787109, -1598.6693115234, 69.612487792969, 90000) end ) addEventHandler("onClientResourceStart",root ,function() local x,y = guiGetScreenSize() img = guiCreateStaticImage(x/2-400, y/2-300,800,600, "img.png", false) guiSetVisible(img,false) setTimer (guiSetVisible,3000,1,img,true) setTimer (guiSetVisible,5000,1,img,false) end) Link to comment
khalid-mks Posted January 12, 2015 Author Share Posted January 12, 2015 لالا خلاص تم حل المشكل وشكرا لكم على المساعدة والله ماقصرتو بالنسبة للمشكل كان بسيط نسيت ادخل الورة في الميتا [lua] "logo1.png" /> [/lua] شكرا لكم والسلام عليكم Link to comment
khalid-mks Posted January 12, 2015 Author Share Posted January 12, 2015 ابيك تعمل لي مثاال ثاني مثل ده بس على الكتاابة بلييييييز Link to comment
# L 7 N Posted January 13, 2015 Share Posted January 13, 2015 ابيك تعمل لي مثاال ثاني مثل ده بس على الكتاابة بلييييييز اخوي المقصد من المثال انك تستفيد مو تركبة عموماً الكلام نفس الصوره اللهم غير المتغيرات وضيف اللبل 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