Cronoss Posted February 3, 2022 Share Posted February 3, 2022 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
๖ۣۜζ͜͡RapGod Posted February 3, 2022 Share Posted February 3, 2022 (edited) 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 February 3, 2022 by ๖ۣۜζ͜͡RapGod 1 Link to comment
βurak Posted February 4, 2022 Share Posted February 4, 2022 (edited) 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 February 4, 2022 by Burak5312 1 Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now