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

[TF2] Sniper laser


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Arkarr
Veteran Member
Join Date: Sep 2012
Location: Just behind my PC screen
Plugin ID:
4160
Plugin Version:
1.7
Plugin Category:
Fun Stuff
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Draw a simple laser when snipers are scoping.
    Unapprover:
    Reason for Unapproving:
    https://forums.alliedmods.net/showthread.php?t=285428
    Old 04-07-2014 , 17:56   [TF2] Sniper laser
    Reply With Quote #1

    >>> WATCH OUT; USE BETTER VERSION OF PLUGIN HERE : https://forums.alliedmods.net/showthread.php?t=285428 <<<


    Description :
    This is just for fun, this plugin will draw a laser from the sniper of the player to where he is looking at.
    YAY! Easy target for spys !
    Original request : https://forums.alliedmods.net/showthread.php?t=236976

    Screenshots & Videos :



    clickon image for 1920x1080 resolution.
    If someone wanna do a video about this plugin, you can send me the link and I will post it here.
    The color of laser can be customized, via sm_lasercolor.

    Cvar & installation

    Cvar :

    sm_tf2sniperlaser_enable "1" //Default 1

    Set to "0" to disable the plugin. But would you really do that ?

    sm_tf2sniperlaser_default_status "0" //Default 0

    Should laser be enabled on each player ? 1=yes 0=no
    WARNING : This will be effective on ALL players. Even if they don't have acess to sm_sniperlaser !

    sm_tf2sniperlaser_mount_sound "DEFAULT" //Default "DEFAULT"

    What should be the sound to play when a player mount a laser on his sniper ? Leave 'DEFAULT' to use the default plugin sound.

    sm_tf2sniperlaser_unmount_sound "DEFAULT" //Default "DEFAULT"

    What should be the sound to play when a player unmount a laser on his sniper ? Leave 'DEFAULT' to use the default plugin sound.

    sm_tf2sniperlaser_view_laser_flag "" //Defauflt ""

    All user who have access to this flag will be able to see lasers.

    A configuration file (tf2_sniperlaser.cfg) is auto created in in your cfg/sourcemod folder.

    Commands :

    sm_sniperlaser - Enable/Disable laser on your self. Default flag is cheat OR you can use +reload (your reload key, R by default) key to moun / unmount your laser.

    sm_lasercolor - Customize your laser ! You can create your own laser color by using a simple menu ! Default flag is cheat.

    sm_reloadlaser - Reload the config file of preset laser color. Do it after eahc changes in tf2_sniperlaser_color.txt.

    Installation :

    1) Put sniper_laser.smx in your plugins folder.
    2) Put tf2_sniperlaser_color.txt in your configs folder if you want create custom preset laser color.
    3) Install Updater.
    4) Drink some tea ! It's healthy !
    5) Reload plugins folder, restart map or restart server.
    6) You are done!

    For those who wanna compille the plugin manually, you will need :
    • SDKtools
    • SDKhooks
    • MoreColors

    Configuration

    Oh damn... I don't want to spend 3 houres to config this plugin !

    Well, don't be scared, this will take only 1 minute ! And if you really don't want to configure it, well you can. The plugin can run fine without this file.

    So, this is how we configure the preset lasers colors :

    R-G-B-A

    R = Red, this is the ammount of red in the laser. min. 0 | max. 255
    G = Green, this is the ammount of green in the laser. min. 0 | max. 255
    B = Blue, this is the ammount of blue in the laser. min. 0 | max. 255
    A = Alpha, this is the ammount of opacity. 0 -> transparent | 255 -> compact

    So, each line is 1 new color :



    Save and reload the config file using sm_reloadlaser, and you are done !

    Bugs :


    Any ! Yay everything is fully working !

    Request :

    • Optmize laser beam (less 'lag').
    • Color selections, add a configuration file or/and via chat, let the player specifie the value.

    Thanks to :

    Oshizu, friagram, Mitchell and Horsedick !

    Logs :
    ------
    1.0 : First public release. (SMX download : 18; SP download : 17)
    1.1 : Added Updater support. WARNING It's higly recommend to update to 1.1, you will get the next new important updates. (SMX download : 1; SP download : 0)
    1.2 : Now, you can moun/unmount your laser simply by pushing +reload key.Also playing 2 different sounds as well.(SMX download : 2; SP download : 1)
    1.3 : In 1.2, "sniper_bolt_forward.wav" wasn't played, now it's fixed. (SMX download : 6; SP download : 6)
    1.4 : Fixed a lot of bugs and added 2 Cvar to customize the sounds ! (SMX download : 4; SP download : 5)
    1.5 : You can now create your own custom preset laser using tf2_sniperlaser_color.txt ! (SMX download : 2; SP download : 2)
    1.6 : Fixed a small bug when reading the file with preset color laser. (SMX download : 14; SP download : 14)
    1.7 : Added a new Cvar to allow user with this flag to see the lasers. (SMX download : 168; SP download : 83)
    1.8 : Apply Leonardo's changes, wich fix everything !
    -------

    Total SMX download : 182
    Total SP download : 128

    IMPORTANT NOTE:
    Nothing.
    Attached Files
    File Type: smx sniper_laser.smx (20.3 KB, 914 views)
    File Type: sp Get Plugin or Get Source (sniper_laser.sp - 546 views - 16.4 KB)
    File Type: txt tf2_sniperlaser_color.txt (15 Bytes, 1109 views)
    __________________
    Want to check my plugins ?

    Last edited by Arkarr; 03-08-2018 at 18:02.
    Arkarr is offline
    Dr. Greg House
    Professional Troll,
    Part-Time Asshole
    Join Date: Jun 2010
    Old 04-07-2014 , 20:40   Re: [TF2] Sniper laser
    Reply With Quote #2

    Screenshots/video please.
    __________________
    Santa or Satan?

    Watch out when you're paying people for private requests! Most stuff already exists and you can hardly assess the quality of what you'll get, and if it's worth the money.
    Dr. Greg House is offline
    Drixevel
    AlliedModders Donor
    Join Date: Sep 2009
    Location: Somewhere headbangin'
    Old 04-07-2014 , 21:37   Re: [TF2] Sniper laser
    Reply With Quote #3

    Quote:
    Originally Posted by Dr. Greg House View Post
    Screenshots/video please.
    It is a huge laser, what do you not understand...
    Drixevel is offline
    Marverlous
    Senior Member
    Join Date: May 2013
    Old 04-07-2014 , 21:47   Re: [TF2] Sniper laser
    Reply With Quote #4

    Will there be an option so that the laser wont penetrate enemy player? (invisible spy for example)
    __________________
    Marverlous is offline
    Sreaper
    髪を用心
    Join Date: Nov 2009
    Old 04-08-2014 , 00:04   Re: [TF2] Sniper laser
    Reply With Quote #5

    Quote:
    Originally Posted by r3dw3r3w0lf View Post
    It is a huge laser, what do you not understand...


    @Arkarr: You should upload a screenshot or a video of your plugin. You will get more downloads that way.

    Last edited by Sreaper; 04-08-2014 at 00:06.
    Sreaper is offline
    Arkarr
    Veteran Member
    Join Date: Sep 2012
    Location: Just behind my PC screen
    Old 04-08-2014 , 05:45   Re: [TF2] Sniper laser
    Reply With Quote #6

    Quote:
    Originally Posted by Marverlous View Post
    Will there be an option so that the laser wont penetrate enemy player? (invisible spy for example)
    Hum. I think I can do this, anyway, sniper without laser can still aim invisble spy (the red dot appear on invisible spy.)

    Quote:
    Originally Posted by Sreaper View Post
    @Arkarr: You should upload a screenshot or a video of your plugin. You will get more downloads that way.
    Upload some, don't want to upload vid.
    __________________
    Want to check my plugins ?
    Arkarr is offline
    Mitchell
    ~lick~
    Join Date: Mar 2010
    Old 04-08-2014 , 09:48   Re: [TF2] Sniper laser
    Reply With Quote #7

    no reason for a vid, seems pretty obvious now what it is.
    maybe work on the lifetime, seems weird having 5 lasers lag being your screen.
    Mitchell is offline
    Arkarr
    Veteran Member
    Join Date: Sep 2012
    Location: Just behind my PC screen
    Old 04-08-2014 , 10:16   Re: [TF2] Sniper laser
    Reply With Quote #8

    Quote:
    Originally Posted by Mitchell View Post
    no reason for a vid, seems pretty obvious now what it is.
    maybe work on the lifetime, seems weird having 5 lasers lag being your screen.
    True, but I already give the shortest length of life to the beam (0.1, 0.01 not accepted.).
    I can restrict it why a timer, but the laser will lag a bit, at least you will have only 1 laser.
    __________________
    Want to check my plugins ?
    Arkarr is offline
    Mitchell
    ~lick~
    Join Date: Mar 2010
    Old 04-08-2014 , 11:46   Re: [TF2] Sniper laser
    Reply With Quote #9

    Quote:
    Originally Posted by Arkarr View Post
    True, but I already give the shortest length of life to the beam (0.1, 0.01 not accepted.).
    I can restrict it why a timer, but the laser will lag a bit, at least you will have only 1 laser.
    I was looking into env_beams, you can set their start and end pos, if i can remember.
    Mitchell is offline
    Arkarr
    Veteran Member
    Join Date: Sep 2012
    Location: Just behind my PC screen
    Old 04-08-2014 , 11:49   Re: [TF2] Sniper laser
    Reply With Quote #10

    Quote:
    Originally Posted by Mitchell View Post
    I was looking into env_beams, you can set their start and end pos, if i can remember.
    But... why ? Do you think I should teeleport beam instend of creating a new one ?
    __________________
    Want to check my plugins ?
    Arkarr 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 17:39.


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