Jump to content

ابي اعمل setTimer بس معرفتش :(


Recommended Posts

السلام عليكم ورحمة الله وبركاته

ارجو منكم احبائي ان تساعدووني

انا ابي اعمل لهاده المود settimer

يعني ابيه يبقى شغاال عاادي بس ابيه يرووح بعد مرور 30 ثانية

المود عبارة عن انترو

كود الانترو

الكوود :arrowdown::arrowdown::arrowdown:

local sm = {} 
sm.moov = 0 
sm.object1,sm.object2 = nil,nil 
  
Song = playSound("intro.mp3") 
  
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, 337.96209716797, -1620.0395507813, 106.43092346191, 130000) 
end 
) 
  
addEventHandler("onClientResourceStart",root ,function()  
local x,y = guiGetScreenSize()  
  
    img = guiCreateStaticImage(x/2-300, y/2-300,650,600, "img.png", false)  
    guiSetVisible(img,false)  
    
    setTimer (guiSetVisible,100,1,img,true)  
    setTimer (guiSetVisible,100000,1,img,false)  
end)  
  

Link to comment
addEventHandler("onClientResourceStart",root ,function() 
     local x,y = guiGetScreenSize() 
    img = guiCreateStaticImage(x/2-300, y/2-300,650,600, "img.png", false) 
    setTimer (guiSetVisible,100000,1,img,false) 
end) 

خرابيط

خل عنك شغل الدرعمة ي بابا ,

الكود مافيه اي شي من الي تقول عنه " خرابيط " :/:redhotevil:

Link to comment
addEventHandler("onClientResourceStart",root ,function() 
     local x,y = guiGetScreenSize() 
    img = guiCreateStaticImage(x/2-300, y/2-300,650,600, "img.png", false) 
    setTimer (guiSetVisible,100000,1,img,false) 
end) 

خرابيط

خل عنك شغل الدرعمة ي بابا ,

الكود مافيه اي شي من الي تقول عنه " خرابيط " :/:redhotevil:

._. اتوقع قال يبي يخفي الانترو كامل م قال صوره ويبي يوقف الكاميرا

ولو تلاحظ اخر اسطر من كود الرجال بتشوف نفس الاكواد

NicKeLz وانا عملتها له يعني لو ركب حقت الاخ

مراح يستفيد شيء ، اتمنى تركز وتفهم الموضوع = )

Link to comment

._. اتوقع قال يبي يخفي الانترو كامل م قال صوره ويبي يوقف الكاميرا

فيه فرق كبــــــــــــــــــــــــــــــــــــــــير

بين انك تقول خرابيط = يعني الكود ماله معنى

وفيه فرق لما تقول الكود ذا , مو هو الي طالبه في الموضوع

-_-

وبخصوص صاحب الموضوع

اعتقد لازم تستخدم

killTimer 

وعلى العموم انا ما ابي افتح نقاش مال امه داعي

Link to comment

ي حبي افهم الكود اللي انت حاطه اول ي صاحب الموضوع

لو تشوف بنهاية الفكشن مكتوب

time

وذا التايم اللي تبيه ينفذ فيه الانترو 20 ثانية تكتبها

20000

وكذا

انت كاتب

130000

يعني 13 ثانية

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...