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.

Choco 12-23-2015 00:38

Re: [NMRiH] Laser Aim v.1.5
 
still a bit slow, the lowest i can have the laser life set to is 0.06, any lower the laser doesn't disappear

Grey83 01-06-2016 09:03

Re: [NMRiH] Laser Aim v.1.5.1
 
At the request of players added option that disables their own laser dot & beam

To install the new version of the plugin no need to change the texture on the server

Grey83 01-17-2016 14:09

Re: [NMRiH] Laser Aim v.1.5.2 (2016/01/17)
 
The translation file does not require an update.

Mr.Halt 01-18-2016 02:31

Re: [NMRiH] Laser Aim v.1.5.2 (2016/01/17)
 
Thanks for that update, I will use this code for my server's store system.
Really helpful for match positions.

Grey83 04-06-2016 09:42

Re: [NMRiH] Laser Aim v.1.5.3 (2016/04/06)
 
[NMRiH] Laser Aim v.1.5.3 still requires texture from the archive [NMRiH] Laser Aim 1.5.x (textures).zip but no longer required files laser_beam.vmt and laser_beam.vtf

roozxd 07-13-2016 14:34

Re: [NMRiH] Laser Aim v.1.5.3 (2016/04/06)
 
При вызове меню laser aim.
Quote:

L 07/14/2016 - 01:27:06: SourceMod error session started
L 07/14/2016 - 01:27:06: Info (map "nms_favela") (file "errors_20160714.log")
L 07/14/2016 - 01:27:06: [SM] Exception reported: Language phrase "Switch off" not found
L 07/14/2016 - 01:27:06: [SM] Blaming: nmrih_laser_aim 1.5.3.smx()
L 07/14/2016 - 01:27:06: [SM] Call stack trace:
L 07/14/2016 - 01:27:06: [SM] [0] Format
L 07/14/2016 - 01:27:06: [SM] [1] Line 168, /home/forums/content/files/2/5/6/7/1/3/153468.attach:: PrefMenu()

Grey83 07-13-2016 18:30

Re: [NMRiH] Laser Aim v.1.5.3 (2016/04/06)
 
roozxd, add in the end of the nmrih_laser_aim.phrases.txt (after block "White") this block
Code:

        "Switch off"
        {
                "en"                        "Switched off"
                "ru"                        "Отключён"
        }


Grey83 09-30-2016 09:53

Re: [NMRiH] Laser Aim v.1.6.0 [2016/09/30]
 
4 Attachment(s)
You can see old sources here:

Grey83 10-07-2016 13:41

Re: [NMRiH] Laser Aim v.1.6.0 [2016/09/30]
 
Fixed problem when no zoom = no dot

Please reload fixed plugin

jally0411 01-27-2017 02:59

Re: [NMRiH] Laser Aim
 
Hello, author This plugin Installed successfully
But !settings can use
----------------------------------------------------------
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
-----------------------------------------------------------
The above instructions can not be used Sp code seems to be incomplete Please modify the ,author

Grey83 01-27-2017 08:35

Re: [NMRiH] Laser Aim v.1.6.1 [2016/10/07]
 
jally0411, You should print !settings in the chat (or sm_settings in the client console).
Quote:

The above instructions can not be used Sp code seems to be incomplete
It is server variables.
What do I have to change in them? O_o

jally0411 01-27-2017 11:50

Re: [NMRiH] Laser Aim v.1.6.1 [2016/10/07]
 
These instruction can not be used

---------------------------------------------
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

Grey83 01-28-2017 06:38

Re: [NMRiH] Laser Aim v.1.6.1 [2016/10/07]
 
jally0411, probably you are use plugins first time in life?

jally0411 01-28-2017 08:16

Re: [NMRiH] Laser Aim v.1.6.1 [2016/10/07]
 
Console input no effect? no problem?
nmrih_laser_aim 1.6.1.SMX in plugins
nmrih_laser_aim 1.6.1.SP in scripting
nmrih_laser_aim.phrases.txt in translations

jally0411 01-28-2017 08:25

Re: [NMRiH] Laser Aim v.1.6.1 [2016/10/07]
 
Look at the photos
URL:https://drive.google.com/file/d/0B--...o4bEZrOWs/view
https://drive.google.com/file/d/0B--...dJbUsyc1U/view

Plugin successful
Command failed?

Grey83 01-29-2017 00:43

Re: [NMRiH] Laser Aim v.1.6.1 [2016/10/07]
 
jally0411, it's not commands.
It's server variables.
In client You must use command rcon or sm_rcon before variables.

Example: sm_rcon sm_laser_aim_on 1 (in the client console) or /rcon sm_laser_aim_on 1 (in the chat) for SM.
rcon sm_laser_aim_on 1 (in the client console) for default rcon
if You have access to rcon.

jally0411 01-29-2017 02:49

Re: [NMRiH] Laser Aim v.1.6.1 [2016/10/07]
 
Hello, author I already know rcon
Instruction can Operation

I would like to ask Open the menu command:

! Settings I How should In sp Code file I need Plus what Can let! Settings Has permissions

ADMFLAG_GENERIC ?? or? Can teach me Let! See commands?

ZASTRELIS 02-17-2021 23:49

Re: [NMRiH] Laser Aim v.1.6.1 [2016/10/07]
 
how to disable dot culling?

Grey83 02-18-2021 08:52

Re: [NMRiH] Laser Aim v.1.6.1 [2016/10/07]
 
ZASTRELIS, я не понял кривого перевода вопроса на английский.
Продублируй сообщение на русском чтобы можно было понять о чём ты спрашивал.

Translation for forum.
I did not understand the corrupted translation of the question into English.
Duplicate the message in Russian so that I can understand what you were asking about.

Templeton Peck 01-31-2022 08:02

Re: [NMRiH] Laser Aim v.1.6.1 [2016/10/07]
 
Hey there, nice pluign :)

Is there any chance of limiting the laser feature to certain weapons? I would like to only use this for AWP Snipers on our Server.

Thanks for any help :)

Grey83 01-31-2022 09:33

Re: [NMRiH] Laser Aim v.1.6.1 [2016/10/07]
 
Templeton Peck, at line 211 change
PHP Code:

if(!StrContains(weapon"fa_"true) || !StrContains(weapon"tool_flare_"true) || !StrContains(weapon"bow_"true)) CreateBeam(iiAimPref[i]); 

to
PHP Code:

if(!strcmp(weapon"fa_jae700"true)) CreateBeam(iiAimPref[i]); 



All times are GMT -4. The time now is 12:34.

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