MaRcell Posted November 11, 2016 Share Posted November 11, 2016 I'm having a problem with a script so when killing the player there is a gray effect on the screen but this does not happen. function player_Wasted ( ammo, attacker, weapon, bodypart ) if ( attacker ) then if ( getElementType ( attacker ) == "player" ) then fadeCamera ( attacker, false, 3.0, 200, 230, 230 ) setTimer ( fadeCameraDelayed, 200, 1, attacker ) end end end addEventHandler ( "onPlayerWasted", getRootElement(), player_Wasted ) function fadeCameraDelayed(player) if (isElement(player)) then fadeCamera(player, true) end end Link to comment
Army@1 Posted November 11, 2016 Share Posted November 11, 2016 (edited) The fade in timer probably doesn't let fade out take place. function player_Wasted ( ammo, attacker, weapon, bodypart ) if ( attacker ) then if ( getElementType ( attacker ) == "player" ) then fadeCamera ( attacker, false, 3.0, 200, 230, 230 ) setTimer ( fadeCameraDelayed, 3000, 1, attacker ) end end end addEventHandler ( "onPlayerWasted", getRootElement(), player_Wasted ) function fadeCameraDelayed(player) if (isElement(player)) then fadeCamera(player, true) end end Edited November 11, 2016 by Army@1 Link to comment
MaRcell Posted November 11, 2016 Author Share Posted November 11, 2016 It still did not work 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