Monthly Target: $400 Donations: $126
 31% 

[NMRiH] Laser Aim v.1.6.1 [2016/10/07]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Grey83
Senior Member
Join Date: Dec 2014
Location: Ukraine
Plugin ID:
4461
Plugin Version:
1.6.1
Plugin Category:
Gameplay
Plugin Game:
No More Room in Hell
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Creates a laser dot every time a firearm in the hands of the player and the beam when he used zoom
    Old 12-20-2014 , 19:34   [NMRiH] Laser Aim v.1.6.1 [2016/10/07]
    Reply With Quote #1

    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).
      Name:  Laser Aim colours.jpg
Views: 1777
Size:  18.1 KB
    • 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
      Name:  LaserAIM_Menu.jpg
Views: 1062
Size:  26.3 KB
      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
      Name:  Laser Aim 1.5.3.jpg
Views: 853
Size:  17.8 KB
    • 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
    Attached Images
    File Type: jpg 2014-12-21_00003.jpg (36.9 KB, 875 views)
    File Type: jpg 2014-12-21_00004.jpg (36.5 KB, 771 views)
    Attached Files
    File Type: zip [NMRiH] Laser Aim 1.5.x (textures).zip (55.5 KB, 229 views)
    File Type: sp Get Plugin or Get Source (nmrih_laser_aim 1.5.3.sp - 225 views - 9.0 KB)
    File Type: zip [NMRiH] Laser Aim translations.zip (1.1 KB, 55 views)
    File Type: sp Get Plugin or Get Source (nmrih_laser_aim 1.6.1.sp - 34 views - 8.4 KB)
    File Type: smx nmrih_laser_aim 1.6.1.smx (11.3 KB, 39 views)
    __________________
    My plugins
    Spoiler

    Last edited by Grey83; 10-07-2016 at 20:26. Reason: Plugin updated to v.1.6.1. smal fixes
    Grey83 is online now
    Choco
    Member
    Join Date: Mar 2012
    Old 01-06-2015 , 22:08   Re: [NMRiH] Laser Aim
    Reply With Quote #2

    Are you able to remove the delay time when you change direction?
    __________________

    Choco is offline
    Grey83
    Senior Member
    Join Date: Dec 2014
    Location: Ukraine
    Old 01-07-2015 , 08:39   Re: [NMRiH] Laser Aim
    Reply With Quote #3

    Quote:
    Originally Posted by Choco View Post
    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.

    Last edited by Grey83; 01-07-2015 at 08:41.
    Grey83 is online now
    Choco
    Member
    Join Date: Mar 2012
    Old 01-08-2015 , 02:42   Re: [NMRiH] Laser Aim
    Reply With Quote #4

    I've tried that and it made it worse.
    __________________

    Choco is offline
    RedSword
    SourceMod Plugin Approver
    Join Date: Mar 2006
    Location: Quebec, Canada
    Old 03-02-2015 , 18:16   Re: [NMRiH] Laser Aim
    Reply With Quote #5

    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
    __________________
    My plugins :
    Red Maze
    Afk Bomb
    RAWR (per player/rounds Awp Restrict.)
    Kill Assist
    Be Medic

    You can also Donate if you appreciate my work
    RedSword is offline
    Grey83
    Senior Member
    Join Date: Dec 2014
    Location: Ukraine
    Old 03-03-2015 , 13:35   Re: [NMRiH] Laser Aim
    Reply With Quote #6

    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?

    Last edited by Grey83; 03-03-2015 at 19:39.
    Grey83 is online now
    RedSword
    SourceMod Plugin Approver
    Join Date: Mar 2006
    Location: Quebec, Canada
    Old 03-03-2015 , 15:35   Re: [NMRiH] Laser Aim
    Reply With Quote #7

    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
    __________________
    My plugins :
    Red Maze
    Afk Bomb
    RAWR (per player/rounds Awp Restrict.)
    Kill Assist
    Be Medic

    You can also Donate if you appreciate my work
    RedSword is offline
    Grey83
    Senior Member
    Join Date: Dec 2014
    Location: Ukraine
    Old 03-03-2015 , 20:00   Re: [NMRiH] Laser Aim
    Reply With Quote #8

    RedSword, You can check out the updated plugin.
    I have already checked on my server.

    Last edited by Grey83; 03-03-2015 at 20:05.
    Grey83 is online now
    RedSword
    SourceMod Plugin Approver
    Join Date: Mar 2006
    Location: Quebec, Canada
    Old 03-04-2015 , 02:11   Re: [NMRiH] Laser Aim
    Reply With Quote #9

    Approved.
    __________________
    My plugins :
    Red Maze
    Afk Bomb
    RAWR (per player/rounds Awp Restrict.)
    Kill Assist
    Be Medic

    You can also Donate if you appreciate my work
    RedSword is offline
    Grey83
    Senior Member
    Join Date: Dec 2014
    Location: Ukraine
    Old 04-12-2015 , 21:06   Re: [NMRiH] Laser Aim v.1.5
    Reply With Quote #10

    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.
    __________________
    My plugins
    Spoiler
    Grey83 is online now
    Reply


    Thread Tools
    Display Modes

    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 04:32.


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