AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [NMRiH] Laser Aim v.1.6.1 [2016/10/07] (https://forums.alliedmods.net/showthread.php?t=253367)

Grey83 12-20-2014 18:34

[NMRiH] Laser Aim v.1.6.1 [2016/10/07]
 
10 Attachment(s)
Name: Laser Aim

Description: Creates a laser dot every time a firearm in the hands of the player.
This plugin is a modification of [CSS] Laser Aim by Leonardo.

Unlike the original plug-in: Was cut changed a piece of code responsible for drawing the laser beam. Change parameters responsible for the inclusion of the laser dot. Added code to load the texture of the laser dot & beam from the server (in this game no texture suitable for this), as well as creating the configuration file for the plugin when you first start.

Installation: Place compiled plugin (nmrih_laser_aim.smx) into the plugins folder (../addons/sourcemod/plugins/).
Place the translation file (nmrih_laser_aim.phrases.txt) into the translation sfolder (../addons/sourcemod/translations/).

Changes in 1.4 [2015/03/04]:
  • Added variable that is responsible for rendering the laser dot: players can see all dots or only their own dot.
  • Other code fixes
Changes in 1.5 [2015/04/13]:
  • Added client preferences menu for laser (include 8 colours: red, orange, yellow, green, cyan, blue, purple and white).
    Attachment 144111
  • Now in zoom you have not only a dot, but also a beam.
  • Other code fixes
Changes in 1.5.1 [2016/01/06]:
  • At the request of players added option that disables their own laser dot & beam
Changes in 1.5.2 (2016/01/17):
  • Fixed start position of the laser beam when player crouched
  • Updated textures of the laser beam and dot (this dot now looks like laser dot in L4D/L4D2)
  • Small fixes
    Attachment 151254
    Please delete old config if You used previous version of the plugin
Changes in 1.5.3 [2016/04/06]:
  • Minor fixes in the menu
    Attachment 153469
  • Now texture of beam uses texture used by command sm_beacon, sm_timebomb etc.
  • Slightly reduced the amount of code (350 lines in v.1.5.2 -> 268 lines in v.1.5.3)
  • Small fixes
Changes in 1.6.0 [2016/09/30]:
  • Rewritten using the new syntax (1.7+)
    Need SM1.8_stable to compile
  • Minor code optimization
  • Small fixes
  • Divided into parts (by language) the file of the translation
Changes in 1.6.1 [2016/10/07]:
  • Fixed problem when no zoom = no dot
  • Minor code optimization

CVars:
  • nmrih_laser_aim_version - Plugins version
  • sm_laser_aim_on - Enable/disable plugin
  • sm_laser_aim_welcome_message - Show plugin message on player connect
  • sm_laser_aim_default - Default client colour preference (0 - 8 )
  • sm_laser_aim2all - The player can see: 1 - all dots & beams, 0 - only their own dot & beam
  • sm_laser_aim_alpha - Dot & beam transparency
  • sm_laser_aim_life - Life of the dot & beam
  • sm_laser_aim_width - Beam size
  • sm_laser_aim_dot_width - Dot size

Note: The attached zip archive contains the textures required for the plugin.

History of downloads:
nmrih_laser_aim 1.4.sp - 179 views
nmrih_laser_aim 1.5.sp - 236 views
nmrih_laser_aim 1.5.2.sp - 163 views
nmrih_laser_aim.phrases.txt - 89 views

Choco 01-06-2015 21:08

Re: [NMRiH] Laser Aim
 
Are you able to remove the delay time when you change direction?

Grey83 01-07-2015 07:39

Re: [NMRiH] Laser Aim
 
Quote:

Originally Posted by Choco (Post 2245827)
Are you able to remove the delay time when you change direction?

Try change «sm_laser_aim_life» to «0» (and dot will cease to appear, I think).
Try to reduce this variable several times (the default value is "0.1"). Maybe it will help.

Choco 01-08-2015 01:42

Re: [NMRiH] Laser Aim
 
I've tried that and it made it worse.

RedSword 03-02-2015 17:16

Re: [NMRiH] Laser Aim
 
Hey Grey83,

The plugin looks fine and I'll approve it if you remove your FCVAR_REPLICATED, as it may cause error for clients.

A few things you could also change (optional) :
  • You may want to limit R/G/B/A values to 0-255 (SM allows to set up easily such restrictions on a CVar)
  • When a client is IsClientInGame, he is necessarily Connected, so not need to check if he is connected.
  • When you get so many comparison, you may prefer to put all the weapons you want the beam for in a Trie, that way you can compare it in O(1)

Red

Grey83 03-03-2015 12:35

Re: [NMRiH] Laser Aim
 
Thanks for the tips.
On the last point: somewhere I can look at the sample code?

According to the rest of the text the plugin code should look like this?

RedSword 03-03-2015 14:35

Re: [NMRiH] Laser Aim
 
Hey, I highly suggest that you put FCVAR_DONTRECORD back; if you're to update your plugin people will still have the previous version number in their .cfg if you don't have FCVAR_DONTRECORD for your version CVar. You also need FCVAR_NOTIFY for your version CVar (needed for approval).

It's a good thing your changed your version CVar description :$ (I didn't realize the previous one).

You don't necessarily have to put limits on every CVar; I suggest only using them when the limit must be respected or to give information to the user (i.e. if some user would like to try having "red" over 255, they would be a bit confused seeing it has no effects or confusing effects). I.e. for sm_laser_aim_dot_width users might want to play with it; there are no real problem if it is not respected. Also you can put a minimum without a maximum.

On a side note, I believe you could send your TE_ to the only user concerned (i.e. you could add an option to prevent seeing others TE)

Only first paragraph is regarding approval.

Red

Grey83 03-03-2015 19:00

Re: [NMRiH] Laser Aim
 
RedSword, You can check out the updated plugin.
I have already checked on my server.

RedSword 03-04-2015 01:11

Re: [NMRiH] Laser Aim
 
Approved.

Grey83 04-12-2015 20:06

Re: [NMRiH] Laser Aim v.1.5
 
Note: If you want to upgrade a plugin to v1.5 on your server, do not forget to delete the configuration file from the old version of the plugin.


All times are GMT -4. The time now is 01:33.

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