Jump to content

Help me


MaRcell

Recommended Posts

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

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 by Army@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...