Jump to content

CameraMatrix While Download


~Air

Recommended Posts

That works, because instead of client doing action, the server does. Client can't, because the clientside files aren't downloaded yet.(I'm not sure if onPlayerJoin is the right one, maybe onPlayerConnect)

function update() 
    setCameraMatrix(source, -1360, 1618, 100, -1450, 1200, 100) 
    showChat(source, false) 
end 
--updated as gSub told to. 
addEventHandler("onPlayerJoin", getRootElement(), update) 

Because the clientside isn't ready, you cant use client functions like setSkyGradient, setTime and setWeather, only server functions. Well you can, but that would set effect for every player.

Edited by Guest
Link to comment

You might have to edit this a little bit, but I think you got it.

  
local camID = 0 
local viewPosition = {} 
    viewPosition[1] = {369.0364074707, -2058.7250976563, 33.059700012207, 369.44738769531, -2057.8530273438, 32.79430770874} -- just an example, you can add more by copying this and change the number to a bigger one, for example 
    -- viewPosition[2] = {369.0364074707, -2058.7250976563, 33.059700012207, 369.44738769531, -2057.8530273438, 32.79430770874} 
  
local stageTime = 6500 
local fadeTime = 1000 
local fadeDelay = 0 
  
  
function showViews() 
    fadeCamera ( false, fadeTime/1000 ,0,0,0) 
    setTimer(function() 
        local camID = math.random(1,#viewPosition) 
        local camX = viewPosition[camID][1] 
        local camY = viewPosition[camID][2] 
        local camZ = viewPosition[camID][3] 
        local lookX = viewPosition[camID][4] 
        local lookY = viewPosition[camID][5] 
        local lookZ = viewPosition[camID][6] 
        setCameraMatrix(camX, camY, camZ, lookX, lookY, lookZ) 
        newView = setTimer(function() 
            showFerrisViews() 
        end, stageTime, 1) 
        fadeCamera( true, fadeTime/1000) 
    end, fadeTime+fadeDelay , 1) 
end 
  
function endViews() 
    if isTimer(newView) then 
        killTimer(newView) 
        newView = nil 
    end 
end 
  

EDIT:

Use onPlayerJoin to start the camera matrix views and use onPlayerSpawn to remove it.

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