Jump to content

x[ مساعده ]x


EdeN

Recommended Posts

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

----

انا عامل تحميل خفي لبعض المودات وابي اعمل رساله اثناء مايحمل تستمر الرساله ولمن يخلص التحميل تختفي

وش احتاج ؟

Link to comment

Server

  
DownloadDisplay = textCreateDisplay() 
Text = textCreateTextItem("إنتظر انتهاء اللتحميل", 0.5, 0.5) 
textDisplayAddText(DownloadDisplay, Text) 
  
setTimer(function() 
    textItemSetColor(Text, math.random(0, 255), math.random(0, 255), math.random(0, 255), 255 ) 
end,1000,0) 
  
addEventHandler("onPlayerJoin", root, 
function() 
    textDisplayAddObserver(DownloadDisplay, source) 
    showChat(source, false) 
    fadeCamera(source, false) 
end) 
  
addEvent("onClientDownloadFinish", true) 
addEventHandler("onClientDownloadFinish", root, 
function() 
    if textDisplayIsObserver(DownloadDisplay, source) then 
        textDisplayRemoveObserver(DownloadDisplay, source) 
        showChat(source, true) 
        fadeCamera(source, true) 
    end 
end) 
  
  

Client

Timer = setTimer( 
function() 
    if not isTransferBoxActive() then 
        triggerServerEvent("onClientDownloadFinish", localPlayer) 
        if isTimer(Timer) then killTimer(Timer) end 
    end 
end,1000,0) 

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...