Jump to content

fadeCamera happens after spawn


Recommended Posts

server side

addEvent ("myCustomEvent", true ) 
        function myCustomEvent() 
              fadeCamera ( source, false ) 
            setElementPosition ( source, -2416.0766601563, -604.67163085938, 132.5625 ) 
            setCameraTarget ( source ) 
             setTimer ( fadeCamera, 1000, 1, source, true, 9 ) 
      
        end 
        addEventHandler("myCustomEvent", getRootElement(), myCustomEvent) 

client side

       local Jarker = createMarker ( -2388.5144042969, -579.02172851563, 131.1171875, "cylinder", 4, 255, 0, 0, 255 ) 
        addEventHandler('onClientMarkerHit', Jarker,function(hitPlayer,thePlayer) 
            if (hitPlayer == localPlayer) then 
          triggerServerEvent("myCustomEvent", localPlayer) 
            end 
        end) 

here's the result

https://www.youtube.com/watch?v=fcew-tnj ... ature=plcp

it fadeCamera after spawn, i want it while the spawn not after

Link to comment
Guest Guest4401
addEvent ("myCustomEvent", true ) 
    function myCustomEvent() 
        fadeCamera ( source, false ) 
        setTimer( 
            function() 
                setElementPosition ( source, -2416.0766601563, -604.67163085938, 132.5625 ) 
                setCameraTarget ( source ) 
                fadeCamera( source, true ) 
            end, 1000, 1 
        ) 
    end 
addEventHandler("myCustomEvent", getRootElement(), myCustomEvent) 

Link to comment
addEvent ("myCustomEvent", true ) 
    function myCustomEvent() 
        fadeCamera ( source, false ) 
        setTimer( 
            function() 
                setElementPosition ( source, -2416.0766601563, -604.67163085938, 132.5625 ) 
                setCameraTarget ( source ) 
                fadeCamera( source, true ) 
            end, 1000, 1 
        ) 
    end 
addEventHandler("myCustomEvent", getRootElement(), myCustomEvent) 

bad argument at 'setElementPosition' & 'fadeCamera' & 'setCameraTarget'

and only black screen

Link to comment
Guest Guest4401
addEvent ("myCustomEvent", true ) 
    function myCustomEvent() 
        local player = source 
        fadeCamera ( source, false ) 
        setTimer( 
            function() 
                setElementPosition ( player, -2416.0766601563, -604.67163085938, 132.5625 ) 
                setCameraTarget ( player ) 
                fadeCamera( player, true ) 
            end, 1000, 1 
        ) 
    end 
addEventHandler("myCustomEvent", getRootElement(), myCustomEvent) 

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