Jump to content

كتابه اثناء التحميل


Recommended Posts

-- Server Side --

DownloadDisplay = textCreateDisplay() 
Text = textCreateTextItem("Please wait until the download Resource", 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 Side --

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

Link to comment

-- Server Side --

DownloadDisplay = textCreateDisplay() 
Text = textCreateTextItem("Please wait until the download Resource", 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 Side --

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