Jump to content

Fadecamera in and fadecamera out


Cronoss

Recommended Posts

Hi, I want to make the camera fade in black when the player teleports to an interior, and then the camera fade out. The problem is that I can't find any reference to a system like this, because every example I get it's about a TP without pressing a Key (just hitmarker) what I could do?

function tpTienda1( player, key, keyState )
setCameraTarget ( player )
fadeCamera(player, false, 0, 0, 0, 0) ------fade camera in black
setElementInterior( player, 18 )
setElementPosition( player, -30.906, -90.749, 1003.547 )
unbindKey (player, "f", "down", tpTienda1)
triggerClientEvent(player, "camaranormal", player) ------- wanted to try this to make the camera back to normal 
end

(Server side)

 

Link to comment
6 hours ago, Cronoss said:

Hi, I want to make the camera fade in black when the player teleports to an interior, and then the camera fade out. The problem is that I can't find any reference to a system like this, because every example I get it's about a TP without pressing a Key (just hitmarker) what I could do?

function tpTienda1( player, key, keyState )
setCameraTarget ( player )
fadeCamera(player, false, 0, 0, 0, 0) ------fade camera in black
setElementInterior( player, 18 )
setElementPosition( player, -30.906, -90.749, 1003.547 )
unbindKey (player, "f", "down", tpTienda1)
triggerClientEvent(player, "camaranormal", player) ------- wanted to try this to make the camera back to normal 
end

(Server side)

 

Try using after triggerClientEvent.

setCameraTarget(player)

fadeCamera(player, true)

I'm on my phone so i can't try and test it for you, but that's the logic. You fade it out, then u should fade it in.

Edited by ๖ۣۜζ͜͡RapGod
  • Like 1
Link to comment

can you try this

function tpTienda1( player, key, keyState )
setCameraTarget ( player )
fadeCamera(player, false) ------fade camera in black
setElementInterior( player, 18 )
setElementPosition( player, -30.906, -90.749, 1003.547 )
setTimer(function(player)
    if(isElement(player)) then
       fadeCamera(player, true) --Turn off completely after 2 seconds
    end
end, 2000, 1, player)
unbindKey (player, "f", "down", tpTienda1)
--triggerClientEvent(player, "camaranormal", player) --actually no need this
end
Edited by Burak5312
  • Thanks 1
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...