Raised This Month: $51 Target: $400
 12% 

Spawn view effect 1.0.0 - Golden Eye 64 like spawn view effect


Post New Thread Reply   
 
Thread Tools Display Modes
roymor
Senior Member
Join Date: Apr 2012
Old 05-24-2013 , 08:45   Re: "Golden Eye 64 like" spawn view
Reply With Quote #11

sounds like a nice plugin thanks for your effort
roymor is offline
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 05-24-2013 , 09:20   Re: "Golden Eye 64 like" spawn view
Reply With Quote #12

I made a quick video from the plugin, you can find it here : http://www.youtube.com/watch?v=UAMuN...ature=youtu.be
__________________
Kia is offline
Rirre
Veteran Member
Join Date: Nov 2006
Old 05-24-2013 , 09:46   Re: "Golden Eye 64 like" spawn view
Reply With Quote #13

Running while it rotates will keep the camera rotating around you until you're standing still with no freezetime or any respawn plugins.

Last edited by Rirre; 05-24-2013 at 09:50.
Rirre is offline
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 05-24-2013 , 16:34   Re: "Golden Eye 64 like" spawn view
Reply With Quote #14

Quote:
Originally Posted by Rirre View Post
Running while it rotates will keep the camera rotating around you until you're standing still with no freezetime or any respawn plugins.
if you move your mouse at all the rotate goes under you....
__________________
Blizzard_87 is offline
FR0NTLINE
AlliedModders Donor
Join Date: Apr 2006
Location: Riverside Cali
Old 05-27-2013 , 20:16   Re: "Golden Eye 64 like" spawn view
Reply With Quote #15

Really Cool Idea.
__________________
FR0NTLINE is offline
Send a message via AIM to FR0NTLINE Send a message via MSN to FR0NTLINE Send a message via Yahoo to FR0NTLINE
Kidev
Veteran Member
Join Date: Jun 2010
Location: France
Old 05-30-2013 , 18:09   Re: "Golden Eye 64 like" spawn view
Reply With Quote #16

I'm going to correct those bugs this summer, after the exams. I know there is problems when you move. Sorry for the inconvenience.

Quote:
Originally Posted by Kia View Post
I made a quick video from the plugin, you can find it here : http://www.youtube.com/watch?v=UAMuN...ature=youtu.be
Thank you! I'm going to edit the main post!
__________________

Last edited by Kidev; 05-30-2013 at 18:12.
Kidev is offline
jingojang
Senior Member
Join Date: Feb 2010
Location: The Moon
Old 05-28-2014 , 04:22   Re: "Golden Eye 64 like" spawn view
Reply With Quote #17

This is really cool -kid- but the camera spinning around me is very close to my face compared to the video. Is this just the way it is on my screen with my resolution(900x1600) maybe?

regards
__________________
jingojang is offline
Krtola
Veteran Member
Join Date: Oct 2013
Location: Serbia
Old 03-13-2016 , 06:31   Re: "Golden Eye 64 like" spawn view
Reply With Quote #18

Quote:
Originally Posted by Blizzard_87 View Post
if you move your mouse at all the rotate goes under you....
I fix that problem. I have used FL_FROZEN on spawn,and then remove frozen on round start and if players die.
PHP Code:
#include < amxmodx >
#include < engine >
#include < hamsandwich >
#include < xs >
#include < fakemeta >

//#pragma semicolon 1

#define MAX_PLAYERS 32

#define PI 3.14
#define SQRTTWO 1.41
#define CAM_HEIGHT 18.0
#define CAM_LIM 10.0
#define CAM_AIMING_OFFSET 10.0
#define CAM_CLASS "RotatingCam"

#define CAM_SPEED 2
#define CAM_RADIUS 50.0

new Float:gflLauchGameTimeMAX_PLAYERS ];
new 
Float:gflTimeToReachPosition;

public 
plugin_init( )
{
    
register_plugin"Golden Eye Spawn Camera""1.0.0""Kid" );
        
register_logevent("round_start_event"2"1=Round_Start")
        
register_event"DeathMsg""EVENT_Death""a" )

    
register_thinkCAM_CLASS"thinkRotatingCam" );
    
RegisterHamHam_Spawn"player""fwHamPlayerSpawnPost");

    
gflTimeToReachPosition = ( ( 1.5 PI ) / ( CAM_SPEED SQRTTWO ) );
}

public 
round_start_event()
{
    static 
id
    
new numiPlayers[32]
    
get_players(iPlayersnum)
    if( !
num )
    {
        return;
    }
    for(new 
0numi++)
    {
        
id iPlayers[i]
        if(!
is_user_connected(id))
            continue
        new 
iFlags pevidpev_flags );
    
    if( 
iFlags FL_FROZEN )
    {
        
set_pevidpev_flagsiFlags & ~FL_FROZEN );
    }
    }
}

public 
EVENT_Death( )
{
    new 
iVictim read_data);
    
    new 
iFlags peviVictimpev_flags );
    
    if( 
iFlags FL_FROZEN )
    {
        
set_peviVictimpev_flagsiFlags & ~FL_FROZEN );
    }
}

public 
fwHamPlayerSpawnPostid )
{
    
gflLauchGameTimeid ] = ( get_gametime( ) + gflTimeToReachPosition );

    new    
iEnt create_entity"info_target" );
        
set_pevidpev_flagspevidpev_flags ) | FL_FROZEN )
    if ( 
is_valid_entiEnt ) )
    {
        new 
Float:flOrigin], Float:flOffset];
        
flOffset] = CAM_RADIUS;
        
flOffset] = CAM_HEIGHT;

        
entity_set_stringiEntEV_SZ_classnameCAM_CLASS );
        
entity_set_modeliEnt"models/w_usp.mdl" );
        
entity_set_byteiEntEV_INT_solidSOLID_NOT );
        
entity_set_intiEntEV_INT_movetypeMOVETYPE_NOCLIP );
        
entity_set_edictiEntEV_ENT_ownerid );

        
get_offset_originidflOffsetflOrigin );
        
entity_set_vectoriEntEV_VEC_originflOrigin );

        
entity_set_intiEntEV_INT_rendermodekRenderTransTexture );
        
entity_set_floatiEntEV_FL_renderamt0.0 );

        
attach_viewidiEnt );
        
entity_set_floatiEntEV_FL_nextthinkget_gametime( ) );
    }
}

public 
thinkRotatingCamiEnt )
{
    static 
iOwner;
    
iOwner entity_get_edictiEntEV_ENT_owner );

    if ( !
is_user_aliveiOwner ) )
    {
        
remove_entityiEnt );
        return 
PLUGIN_CONTINUE;
    }

    static 
Float:flOriginCamera], Float:flOriginPlayer], Float:flVelocity], Float:flAddVelocity], Float:flOffset], iHeightCheck;
    
entity_get_vectoriEntEV_VEC_originflOriginCamera );
    
flOffset] = CAM_AIMING_OFFSET;
    
get_offset_originiOwnerflOffsetflOriginPlayer );

    if ( 
floatsqrootfloatpower( ( flOriginPlayer] - flOriginCamera] ), 2.0 ) + floatpower( ( flOriginPlayer] - flOriginCamera] ), 2.0 ) ) <= CAM_LIM )
    {
        
remove_entityiEnt );
        
attach_viewiOwneriOwner );
        return 
PLUGIN_CONTINUE;
    }

    
flVelocity] = ( ( flOriginCamera] - flOriginPlayer] ) * CAM_SPEED );
    
flVelocity] = ( ( flOriginPlayer] - flOriginCamera] ) * CAM_SPEED );

    
entity_get_vectoriEntEV_VEC_velocityflAddVelocity );
    
flAddVelocity] = flAddVelocity] = 0.0;
    if ( !( 
iHeightCheck = ( -0.25 <= ( flOriginCamera] - ( flOriginPlayer] + CAM_HEIGHT ) ) <= 0.25 ) ) && ( flAddVelocity] == 0.0 ) )
    {
        
flAddVelocity] = ( ( flOriginPlayer] - flOriginCamera] ) * CAM_SPEED );
        
xs_vec_addflVelocityflAddVelocityflVelocity );
    }
    else if ( 
iHeightCheck )
    {
        
flVelocity] = 0.0;
    }
    
flAddVelocity] = 0.0;

    if ( 
gflLauchGameTimeiOwner ] <= get_gametime( ) )
    {
        
flAddVelocity] = ( ( flOriginPlayer] - flOriginCamera] ) * CAM_SPEED );
        
flAddVelocity] = ( ( flOriginPlayer] - flOriginCamera] ) * CAM_SPEED );
        
xs_vec_addflVelocityflAddVelocityflVelocity );
    }

    
entity_set_vectoriEntEV_VEC_velocityflVelocity );

    
flOriginPlayer] += CAM_HEIGHT;
    
entity_set_aimiEntflOriginCameraflOriginPlayer );

    
entity_set_floatiEntEV_FL_nextthinkget_gametime( ) );

    return 
PLUGIN_CONTINUE;
}

/* *** GHW_Chronic's Functions *** */
get_offset_originiEnt, const Float:flOffset], Float:flOrigin] )
{
    if ( 
is_valid_entiEnt ) )
    {
        new 
Float:flAngle];
        
entity_get_vectoriEntEV_VEC_originflOrigin );
        
entity_get_vectoriEntEV_VEC_anglesflAngle );

        
flOrigin] += floatcosflAngle], degrees ) * flOffset];
        
flOrigin] += floatsinflAngle], degrees ) * flOffset];

        
flOrigin] += floatsinflAngle], degrees ) * flOffset];
        
flOrigin] += floatcosflAngle], degrees ) * flOffset];

        
flOrigin] += floatcosflAngle], degrees ) * flOffset];
        
flOrigin] -= floatsinflAngle], degrees ) * flOffset];

        
flOrigin] += floatsinflAngle], degrees ) * flOffset];
        
flOrigin] += floatcosflAngle], degrees ) * flOffset];

        
flOrigin] += floatcosflAngle], degrees ) * flOffset];
        
flOrigin] -= floatsinflAngle], degrees ) * flOffset];

        
flOrigin] += floatcosflAngle], degrees ) * flOffset];
        
flOrigin] -= floatsinflAngle], degrees ) * flOffset];

        
flOrigin] -= flOffset];
        
flOrigin] -= flOffset];
        
flOrigin] -= flOffset];
    }
}

entity_set_aimiEnt, const Float:flEntOrigin], const Float:flOrigin2] )
{
    if ( 
is_valid_entiEnt ) )
    {
        static 
Float:flOrigin], Float:flVectorLengthFloat:flAimVector], Float:flNewAngles];

        
flOrigin] = flOrigin2];
        
flOrigin] = flOrigin2];
        
flOrigin] = flOrigin2];

        
flOrigin] -= flEntOrigin];
        
flOrigin] -= flEntOrigin];
        
flOrigin] -= flEntOrigin];

        
flVectorLength vector_lengthflOrigin );

        
flAimVector] = flOrigin] / flVectorLength;
        
flAimVector] = flOrigin] / flVectorLength;
        
flAimVector] = flOrigin] / flVectorLength;

        
vector_to_angleflAimVectorflNewAngles );

        
flNewAngles] *= -1;

        if ( 
flNewAngles] > 180.0 )
        {
            
flNewAngles] -= 360;
        }
        if ( 
flNewAngles] < -180.0 )
        {
            
flNewAngles] += 360;
        }
        if ( 
flNewAngles] == 180.0 || flNewAngles] == -180.0 )
        {
            
flNewAngles] = -179.999999;
        }

        
entity_set_vectoriEntEV_VEC_anglesflNewAngles );
        
entity_set_intiEntEV_INT_fixangle);
    }
}
/* ******************************* */ 

Last edited by Krtola; 03-13-2016 at 06:42.
Krtola is offline
Send a message via Skype™ to Krtola
Old 03-14-2016, 21:36
Syturi0
This message has been deleted by Syturi0.
Krtola
Veteran Member
Join Date: Oct 2013
Location: Serbia
Old 03-15-2016 , 03:13   Re: "Golden Eye 64 like" spawn view
Reply With Quote #19

Quote:
Originally Posted by Syturi0 View Post
it crashs my server
Any error or more information about crash?
Krtola is offline
Send a message via Skype™ to Krtola
Old 03-15-2016, 17:03
Syturi0
This message has been deleted by Syturi0.
Old 03-15-2016, 18:38
Syturi0
This message has been deleted by Syturi0.
Krtola
Veteran Member
Join Date: Oct 2013
Location: Serbia
Old 03-16-2016 , 03:13   Re: Spawn view effect 1.0.0 - Golden Eye 64 like spawn view effect
Reply With Quote #20

Quote:
Originally Posted by Syturi0 View Post
This is such a cool plugin, would be nice if someone fixed all the errors and bugs :/
In this version I add is use alive check on spawn and change maxplayer checker in round start:

PHP Code:
#include < amxmodx >
#include < engine >
#include < hamsandwich >
#include < xs >
#include < fakemeta >

//#pragma semicolon 1

#define MAX_PLAYERS 32

#define PI 3.14
#define SQRTTWO 1.41
#define CAM_HEIGHT 18.0
#define CAM_LIM 10.0
#define CAM_AIMING_OFFSET 10.0
#define CAM_CLASS "RotatingCam"

#define CAM_SPEED 2
#define CAM_RADIUS 50.0

new Float:gflLauchGameTimeMAX_PLAYERS ];
new 
Float:gflTimeToReachPosition;

new 
g_maxplayers

public plugin_init( )
{
        
register_plugin"Golden Eye Spawn Camera""1.0.0""Kid" );
        
register_logevent("round_start_event"2"1=Round_Start")
        
register_event"DeathMsg""EVENT_Death""a" )

        
register_thinkCAM_CLASS"thinkRotatingCam" );
        
RegisterHamHam_Spawn"player""fwHamPlayerSpawnPost");

        
g_maxplayers get_maxplayers()

        
gflTimeToReachPosition = ( ( 1.5 PI ) / ( CAM_SPEED SQRTTWO ) );
}

public 
round_start_event()
{
    static 
id
    
for(id 1id <= g_maxplayersid++) 
        
    if(
is_user_connected(id))
    {       
        new 
iFlags pevidpev_flags );
    
        if( 
iFlags FL_FROZEN )
        {
            
set_pevidpev_flagsiFlags & ~FL_FROZEN );
        }
    }
}

public 
EVENT_Death( )
{
    new 
iVictim read_data);
    
    new 
iFlags peviVictimpev_flags );
    
    if( 
iFlags FL_FROZEN )
    {
        
set_peviVictimpev_flagsiFlags & ~FL_FROZEN );
    }
}

public 
fwHamPlayerSpawnPostid )
{
  if(
is_user_alive(id))
  {
      
set_pevidpev_flagspevidpev_flags ) | FL_FROZEN )

      
gflLauchGameTimeid ] = ( get_gametime( ) + gflTimeToReachPosition );

      new    
iEnt create_entity"info_target" );
      if ( 
is_valid_entiEnt ) )
      {
          new 
Float:flOrigin], Float:flOffset];
          
flOffset] = CAM_RADIUS;
          
flOffset] = CAM_HEIGHT;

          
entity_set_stringiEntEV_SZ_classnameCAM_CLASS );
          
entity_set_modeliEnt"models/w_usp.mdl" );
          
entity_set_byteiEntEV_INT_solidSOLID_NOT );
          
entity_set_intiEntEV_INT_movetypeMOVETYPE_NOCLIP );
          
entity_set_edictiEntEV_ENT_ownerid );

          
get_offset_originidflOffsetflOrigin );
          
entity_set_vectoriEntEV_VEC_originflOrigin );
  
          
entity_set_intiEntEV_INT_rendermodekRenderTransTexture );
          
entity_set_floatiEntEV_FL_renderamt0.0 );

          
attach_viewidiEnt );
          
entity_set_floatiEntEV_FL_nextthinkget_gametime( ) );
      }
   }
}

public 
thinkRotatingCamiEnt )
{
    static 
iOwner;
    
iOwner entity_get_edictiEntEV_ENT_owner );

    if ( !
is_user_aliveiOwner ) )
    {
        
remove_entityiEnt );
        return 
PLUGIN_CONTINUE;
    }

    static 
Float:flOriginCamera], Float:flOriginPlayer], Float:flVelocity], Float:flAddVelocity], Float:flOffset], iHeightCheck;
    
entity_get_vectoriEntEV_VEC_originflOriginCamera );
    
flOffset] = CAM_AIMING_OFFSET;
    
get_offset_originiOwnerflOffsetflOriginPlayer );

    if ( 
floatsqrootfloatpower( ( flOriginPlayer] - flOriginCamera] ), 2.0 ) + floatpower( ( flOriginPlayer] - flOriginCamera] ), 2.0 ) ) <= CAM_LIM )
    {
        
remove_entityiEnt );
        
attach_viewiOwneriOwner );
        return 
PLUGIN_CONTINUE;
    }

    
flVelocity] = ( ( flOriginCamera] - flOriginPlayer] ) * CAM_SPEED );
    
flVelocity] = ( ( flOriginPlayer] - flOriginCamera] ) * CAM_SPEED );

    
entity_get_vectoriEntEV_VEC_velocityflAddVelocity );
    
flAddVelocity] = flAddVelocity] = 0.0;
    if ( !( 
iHeightCheck = ( -0.25 <= ( flOriginCamera] - ( flOriginPlayer] + CAM_HEIGHT ) ) <= 0.25 ) ) && ( flAddVelocity] == 0.0 ) )
    {
        
flAddVelocity] = ( ( flOriginPlayer] - flOriginCamera] ) * CAM_SPEED );
        
xs_vec_addflVelocityflAddVelocityflVelocity );
    }
    else if ( 
iHeightCheck )
    {
        
flVelocity] = 0.0;
    }
    
flAddVelocity] = 0.0;

    if ( 
gflLauchGameTimeiOwner ] <= get_gametime( ) )
    {
        
flAddVelocity] = ( ( flOriginPlayer] - flOriginCamera] ) * CAM_SPEED );
        
flAddVelocity] = ( ( flOriginPlayer] - flOriginCamera] ) * CAM_SPEED );
        
xs_vec_addflVelocityflAddVelocityflVelocity );
    }

    
entity_set_vectoriEntEV_VEC_velocityflVelocity );

    
flOriginPlayer] += CAM_HEIGHT;
    
entity_set_aimiEntflOriginCameraflOriginPlayer );

    
entity_set_floatiEntEV_FL_nextthinkget_gametime( ) );

    return 
PLUGIN_CONTINUE;
}

/* *** GHW_Chronic's Functions *** */
get_offset_originiEnt, const Float:flOffset], Float:flOrigin] )
{
    if ( 
is_valid_entiEnt ) )
    {
        new 
Float:flAngle];
        
entity_get_vectoriEntEV_VEC_originflOrigin );
        
entity_get_vectoriEntEV_VEC_anglesflAngle );

        
flOrigin] += floatcosflAngle], degrees ) * flOffset];
        
flOrigin] += floatsinflAngle], degrees ) * flOffset];

        
flOrigin] += floatsinflAngle], degrees ) * flOffset];
        
flOrigin] += floatcosflAngle], degrees ) * flOffset];

        
flOrigin] += floatcosflAngle], degrees ) * flOffset];
        
flOrigin] -= floatsinflAngle], degrees ) * flOffset];

        
flOrigin] += floatsinflAngle], degrees ) * flOffset];
        
flOrigin] += floatcosflAngle], degrees ) * flOffset];

        
flOrigin] += floatcosflAngle], degrees ) * flOffset];
        
flOrigin] -= floatsinflAngle], degrees ) * flOffset];

        
flOrigin] += floatcosflAngle], degrees ) * flOffset];
        
flOrigin] -= floatsinflAngle], degrees ) * flOffset];

        
flOrigin] -= flOffset];
        
flOrigin] -= flOffset];
        
flOrigin] -= flOffset];
    }
}

entity_set_aimiEnt, const Float:flEntOrigin], const Float:flOrigin2] )
{
    if ( 
is_valid_entiEnt ) )
    {
        static 
Float:flOrigin], Float:flVectorLengthFloat:flAimVector], Float:flNewAngles];

        
flOrigin] = flOrigin2];
        
flOrigin] = flOrigin2];
        
flOrigin] = flOrigin2];

        
flOrigin] -= flEntOrigin];
        
flOrigin] -= flEntOrigin];
        
flOrigin] -= flEntOrigin];

        
flVectorLength vector_lengthflOrigin );

        
flAimVector] = flOrigin] / flVectorLength;
        
flAimVector] = flOrigin] / flVectorLength;
        
flAimVector] = flOrigin] / flVectorLength;

        
vector_to_angleflAimVectorflNewAngles );

        
flNewAngles] *= -1;

        if ( 
flNewAngles] > 180.0 )
        {
            
flNewAngles] -= 360;
        }
        if ( 
flNewAngles] < -180.0 )
        {
            
flNewAngles] += 360;
        }
        if ( 
flNewAngles] == 180.0 || flNewAngles] == -180.0 )
        {
            
flNewAngles] = -179.999999;
        }

        
entity_set_vectoriEntEV_VEC_anglesflNewAngles );
        
entity_set_intiEntEV_INT_fixangle);
    }
}
/* ******************************* */ 
Krtola is offline
Send a message via Skype™ to Krtola
Old 03-17-2016, 15:06
Syturi0
This message has been deleted by Syturi0.
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 19:46.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode