Jump to content

while player downloading


Wei

Recommended Posts

resourceRoot = getResourceRootElement(getThisResource()) 
function checkTransfer() 
    if isTransferBoxActive() == true then 
        setTimer(checkTransfer,2000,1) -- Check again after 2 seconds 
    else  
        fadeCamera(true)  -- TransferBox isnt active, fade in camera 
    end 
end 
addEventHandler("onClientResourceStart",resourceRoot,checkTransfer) 

Link to comment

X-SHADOW, It's wrong example.

Client side script only work if downloaded.

You can test it.

He just copied an wiki example, don't bother.

Yes it should work but why create this check?If you download all requested files you can use what you need without event ( onClientResourceStart ) and etc.

Full code in client side.

  
fadeCamera( true ) 
  

Done

Link to comment
Capy you think your cool ?

.....

Absolutely yes.

why dont you help him ?

He simply can do what Kenix said.

Trigger the server text with onPlayerJoin ( same for cams )

function showTextDisplay ( player ) 
   local serverDisplay = textCreateDisplay() 
   textDisplayAddObserver ( serverDisplay, player ) 
   local serverText = textCreateTextItem ( "Input text over here", 0.5, 0.5 ) 
   textDisplayAddText ( serverDisplay, serverText ) 
end 
  

and stop it with onClientResourceStart.

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