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

Projectile Camera


Post New Thread Reply   
 
Thread Tools Display Modes
Author
lugui
Senior Member
Join Date: Feb 2016
Location: GetClientAbsOrigin();
Plugin ID:
7377
Plugin Version:
Plugin Category:
All
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Watch the path of projectiles.
    Old 11-11-2020 , 21:04   Projectile Camera
    Reply With Quote #1

    I made this plugin after watching this: https://youtu.be/tMU04d_arxI
    This is plugin sets your camera to follow your projectiles.

    To use it, just toggle it on with the command: sm_pc
    Then, the camera will jump to the last projectile you shot while you are holding the reaload key.

    Here is a demo: https://youtu.be/4nOER06g9ZI

    For extra fun use this
    Attached Files
    File Type: sp Get Plugin or Get Source (projectile-camera.sp - 560 views - 2.6 KB)
    __________________
    Add me for commissions!
    Steam: [U:1:88621772]
    Discord: lugui#0889
    My Plugins

    Last edited by lugui; 11-13-2020 at 13:51.
    lugui is offline
    daren adler
    Member
    Join Date: Aug 2017
    Location: Iowa
    Old 11-12-2020 , 18:14   Re: Projectile Camera
    Reply With Quote #2

    Quote:
    Originally Posted by lugui View Post
    I made this plugin after watching this: https://youtu.be/tMU04d_arxI
    This is plugin sets your camera to follow your projectiles.

    To use it, just toggle it on with the command: sm_pc
    Then, the camera will jump to the last projectile you shot while you are holding the reaload key.

    Here is a demo: https://youtu.be/4nOER06g9ZI

    For extra fun use this
    I could only get the Grenades and the orb to work in hl2dm, and when i use the sm_pc the look is having the nads or orb look like it coming at you,,i would like it if it was like the video you showed, how can i do that?(it makes it look like you are the eyes of the player you shot it at).
    __________________
    GuitarSlayer
    daren adler is offline
    Send a message via MSN to daren adler
    lugui
    Senior Member
    Join Date: Feb 2016
    Location: GetClientAbsOrigin();
    Old 11-13-2020 , 12:21   Re: Projectile Camera
    Reply With Quote #3

    Quote:
    Originally Posted by daren adler View Post
    I could only get the Grenades and the orb to work in hl2dm, and when i use the sm_pc the look is having the nads or orb look like it coming at you,,i would like it if it was like the video you showed, how can i do that?(it makes it look like you are the eyes of the player you shot it at).
    In order to be able to change the view, the entity must have an m_hOwnerEntity or m_hThrower
    after some googling I found there is also "m_hOwner", I'll add it and maybe it will help.
    I'll also make some fixes to prevent the camera to be set to an entity is isn't supposed to
    __________________
    Add me for commissions!
    Steam: [U:1:88621772]
    Discord: lugui#0889
    My Plugins
    lugui is offline
    Sreaper
    髪を用心
    Join Date: Nov 2009
    Old 11-15-2020 , 17:20   Re: Projectile Camera
    Reply With Quote #4

    Not sure if you saw this but a similar plugin exists and works in TF2 as well. https://forums.alliedmods.net/showthread.php?p=1863414
    Sreaper is offline
    daren adler
    Member
    Join Date: Aug 2017
    Location: Iowa
    Old 11-15-2020 , 17:21   Re: Projectile Camera
    Reply With Quote #5

    Quote:
    Originally Posted by lugui View Post
    In order to be able to change the view, the entity must have an m_hOwnerEntity or m_hThrower
    after some googling I found there is also "m_hOwner", I'll add it and maybe it will help.
    I'll also make some fixes to prevent the camera to be set to an entity is isn't supposed to
    Ok, good to hear.
    __________________
    GuitarSlayer
    daren adler is offline
    Send a message via MSN to daren adler
    daren adler
    Member
    Join Date: Aug 2017
    Location: Iowa
    Old 07-24-2022 , 14:22   Re: Projectile Camera
    Reply With Quote #6

    Quote:
    Originally Posted by lugui View Post
    I made this plugin after watching this: https://youtu.be/tMU04d_arxI
    This is plugin sets your camera to follow your projectiles.

    To use it, just toggle it on with the command: sm_pc
    Then, the camera will jump to the last projectile you shot while you are holding the reaload key.

    Here is a demo: https://youtu.be/4nOER06g9ZI

    For extra fun use this
    I know this is old and been a long time, it works for me but i use merchants and need the (r hold) for them, is there a way to change this to mouse 2 (ATTACK2) insteed of r? i tryed and put PlayerButtons.ATTACK2 and compiled but did not work.
    __________________
    GuitarSlayer
    daren adler is offline
    Send a message via MSN to daren adler
    Sreaper
    髪を用心
    Join Date: Nov 2009
    Old 07-24-2022 , 16:21   Re: Projectile Camera
    Reply With Quote #7

    Quote:
    Originally Posted by daren adler View Post
    I know this is old and been a long time, it works for me but i use merchants and need the (r hold) for them, is there a way to change this to mouse 2 (ATTACK2) insteed of r? i tryed and put PlayerButtons.ATTACK2 and compiled but did not work.
    PHP Code:
    if(buttons IN_RELOAD) {
                
    setClientToProjectileiew(client); 
    ->

    PHP Code:
    if(buttons IN_ATTACK2) {
                
    setClientToProjectileiew(client); 
    Lugui was there any particular reason you went with OnGameFrame() instead of OnPlayerRunCmd() to get the client's button inputs?

    Last edited by Sreaper; 07-24-2022 at 18:41.
    Sreaper is offline
    daren adler
    Member
    Join Date: Aug 2017
    Location: Iowa
    Old 07-24-2022 , 19:18   Re: Projectile Camera
    Reply With Quote #8

    Quote:
    Originally Posted by Sreaper View Post
    PHP Code:
    if(buttons IN_RELOAD) {
                
    setClientToProjectileiew(client); 
    ->

    PHP Code:
    if(buttons IN_ATTACK2) {
                
    setClientToProjectileiew(client); 
    Lugui was there any particular reason you went with OnGameFrame() instead of OnPlayerRunCmd() to get the client's button inputs?
    OK, thank you so much, i will copy and add and compile and see if it works, again ty.
    __________________
    GuitarSlayer
    daren adler is offline
    Send a message via MSN to daren adler
    daren adler
    Member
    Join Date: Aug 2017
    Location: Iowa
    Old 07-24-2022 , 19:30   Re: Projectile Camera
    Reply With Quote #9

    Quote:
    Originally Posted by Sreaper View Post
    PHP Code:
    if(buttons IN_RELOAD) {
                
    setClientToProjectileiew(client); 
    ->

    PHP Code:
    if(buttons IN_ATTACK2) {
                
    setClientToProjectileiew(client); 
    Lugui was there any particular reason you went with OnGameFrame() instead of OnPlayerRunCmd() to get the client's button inputs?
    Nope is says this when trying to do that.
    Quote:
    L 07/24/2022 - 18:24:22: [SM] Failed to load plugin "projectile-camera.smx": Unable to load plugin (unsupported feature set; code is too new).
    ..it lets it compile but says that, thank you again for trying.
    __________________
    GuitarSlayer
    daren adler is offline
    Send a message via MSN to daren adler
    Sreaper
    髪を用心
    Join Date: Nov 2009
    Old 07-24-2022 , 20:11   Re: Projectile Camera
    Reply With Quote #10

    Quote:
    Originally Posted by daren adler View Post
    Nope is says this when trying to do that.

    ..it lets it compile but says that, thank you again for trying.
    Are you running the latest stable Sourcemod? It seems like you are compiling it on a newer version than what your server is running.

    Last edited by Sreaper; 07-24-2022 at 20:16.
    Sreaper is offline
    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 20:09.


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