AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Unapproved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=109)
-   -   [TF2] Sniper laser (https://forums.alliedmods.net/showthread.php?t=238306)

Arkarr 04-07-2014 17:56

[TF2] Sniper laser
 
17 Attachment(s)
>>> 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 :
http://image.noelshack.com/fichiers/...4-08-00004.jpghttp://image.noelshack.com/fichiers/...4-08-00007.jpg
http://image.noelshack.com/fichiers/...4-08-00008.jpghttp://image.noelshack.com/fichiers/...4-08-00009.jpg

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 :

http://image.noelshack.com/fichiers/...28-exemple.png

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 :D !
-------

Total SMX download : 182
Total SP download : 128

IMPORTANT NOTE:
Nothing.

Dr. Greg House 04-07-2014 20:40

Re: [TF2] Sniper laser
 
Screenshots/video please.

Drixevel 04-07-2014 21:37

Re: [TF2] Sniper laser
 
Quote:

Originally Posted by Dr. Greg House (Post 2121745)
Screenshots/video please.

It is a huge laser, what do you not understand...

Marverlous 04-07-2014 21:47

Re: [TF2] Sniper laser
 
Will there be an option so that the laser wont penetrate enemy player? (invisible spy for example)

Sreaper 04-08-2014 00:04

Re: [TF2] Sniper laser
 
Quote:

Originally Posted by r3dw3r3w0lf (Post 2121763)
It is a huge laser, what do you not understand...

https://dl.dropboxusercontent.com/u/...a53a3535ab.png

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

Arkarr 04-08-2014 05:45

Re: [TF2] Sniper laser
 
Quote:

Originally Posted by Marverlous (Post 2121772)
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 (Post 2121801)
@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.

Mitchell 04-08-2014 09:48

Re: [TF2] Sniper laser
 
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.

Arkarr 04-08-2014 10:16

Re: [TF2] Sniper laser
 
Quote:

Originally Posted by Mitchell (Post 2121923)
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.

Mitchell 04-08-2014 11:46

Re: [TF2] Sniper laser
 
Quote:

Originally Posted by Arkarr (Post 2121939)
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.

Arkarr 04-08-2014 11:49

Re: [TF2] Sniper laser
 
Quote:

Originally Posted by Mitchell (Post 2121985)
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 ?


All times are GMT -4. The time now is 03:57.

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