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

[L4D1 & L4D2] Spot Marker [v1.0.7 | 10-October-2021]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Plugin ID:
7561
Plugin Version:
1.0.7
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    65 
    Plugin Description:
    Allow teammates to create spot markers visible only to them
    Old 03-16-2021 , 09:42   [L4D1 & L4D2] Spot Marker [v1.0.7 | 10-October-2021]
    Reply With Quote #1

    Description

    Based on my [L4D1 & L4D2] SI Command Chase Common plugin.

    This plugin allows clients to create spot markers in the map at crosshair while pressing SHIFT+E.

    The spot marker will be visible only for teammates.

    Features
    • Allow configuring which teams should be able to create spot markers.
    • Allow configuring the duration and cooldown of the ability.
    • Allow configuring who should see the beacon and sprite indicators.
    • Allow configuring the model/color of the indicators.

    Preview



    Cvars

    A configuration file named "l4d_spot_marker.cfg" will automatically be created for you upon the first run in the "\cfg\sourcemod\" folder.

    PHP Code:
    // Allow the command to be used only by alive players.
    // 0 = OFF, 1 = ON.
    // -
    // Default: "1.0"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d_spot_marker_alive "1"

    // Cooldown (seconds) to use the spot marker.
    // -
    // Default: "10.0"
    // Minimum: "0.000000"
    l4d_spot_marker_cooldown "10.0"

    // Duration (seconds) of the spot marker.
    // -
    // Default: "10.0"
    // Minimum: "0.000000"
    l4d_spot_marker_duration "10.0"

    // Enable/Disable the plugin.
    // 0 = Disable, 1 = Enable.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d_spot_marker_enable "1"

    // Create a beacon field.
    // 0 = OFF, 1 = ON.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d_spot_marker_field "1"

    // Beacon field alpha transparency.
    // 0 = Invisible, 255 = Fully Visible.
    // -
    // Default: "255"
    // Minimum: "0.000000"
    // Maximum: "255.000000"
    l4d_spot_marker_field_alpha "255"

    // Beacon field amplitude.
    // -
    // Default: "0.0"
    // Minimum: "0.000000"
    l4d_spot_marker_field_amplitude "0.0"

    // Beacon field color.
    // Use "random" for random colors.
    // Use three values between 0-255 separated by spaces ("<0-255> <0-255> <0-255>").
    // -
    // Default: "255 255 0"
    l4d_spot_marker_field_color "255 255 0"

    // Beacon field duration (seconds).
    // -
    // Default: "1.0"
    // Minimum: "0.100000"
    l4d_spot_marker_field_duration "1.0"

    // Beacon field end radius.
    // -
    // Default: "100.0"
    // Minimum: "0.000000"
    l4d_spot_marker_field_end_radius "100.0"

    // Beacon field model.
    // -
    // Default: "sprites/laserbeam.vmt"
    l4d_spot_marker_field_model "sprites/laserbeam.vmt"

    // Beacon field offset (Z pos).
    // -
    // Default: "24.0"
    // Minimum: "0.000000"
    l4d_spot_marker_field_offset "24.0"

    // Repeat interval to create a beacon field.
    // -
    // Default: "1.0"
    // Minimum: "0.000000"
    l4d_spot_marker_field_repeat "1.0"

    // Beacon field start radius.
    // -
    // Default: "75.0"
    // Minimum: "0.000000"
    l4d_spot_marker_field_start_radius "75.0"

    // Beacon field width.
    // -
    // Default: "2.0"
    // Minimum: "0.000000"
    l4d_spot_marker_field_width "2.0"

    // Show intro message in chat this many seconds after a client joins.
    // 0 = OFF.
    // -
    // Default: "60.0"
    // Minimum: "0.000000"
    l4d_spot_marker_intro "60.0"

    // Display type for the "Intro" message.
    // 0 = OFF, 1 = CHAT, 2 = HINT.
    // Add numbers greater than 0 for multiple options.
    // Example: "3", displays the message in CHAT and as a HINT.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "3.000000"
    l4d_spot_marker_intro_msg "1"

    // Display type for the "Skill Ready" message.
    // 0 = OFF, 1 = CHAT, 2 = HINT.
    // Add numbers greater than 0 for multiple options.
    // Example: "3", displays the message in CHAT and as a HINT.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "3.000000"
    l4d_spot_marker_skill_ready_msg "1"

    // Skill ready sound.
    // Empty = OFF.
    // -
    // Default: "ui/alert_clink.wav"
    l4d_spot_marker_skill_ready_sound "ui/alert_clink.wav"

    // Display type for the "Spot Marked" message.
    // 0 = OFF, 1 = CHAT, 2 = HINT.
    // Add numbers greater than 0 for multiple options.
    // Example: "3", displays the message in CHAT and as a HINT.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "3.000000"
    l4d_spot_marker_spot_marked_msg "1"

    // Create a sprite.
    // 0 = OFF, 1 = ON.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d_spot_marker_sprite "1"

    // Sprite alpha transparency.
    // Note: Some models don't allow to change the alpha.
    // 0 = Invisible, 255 = Fully Visible
    // -
    // Default: "255"
    // Minimum: "0.000000"
    // Maximum: "255.000000"
    l4d_spot_marker_sprite_alpha "255"

    // Sprite color.
    // Use "random" for random colors.
    // Use three values between 0-255 separated by spaces ("<0-255> <0-255> <0-255>").
    // -
    // Default: "255 255 0"
    l4d_spot_marker_sprite_color "255 255 0"

    // Minimum distance that a client must be before the sprite fades.
    // -1 = Always visible.
    // -
    // Default: "-1"
    // Minimum: "-1.000000"
    // Maximum: "9999.000000"
    l4d_spot_marker_sprite_fade_distance "-1"

    // Minimum/Maximum distance between the original position that the sprite should reach before inverting the vertical direction.
    // 0 = OFF.
    // -
    // Default: "4.0"
    // Minimum: "0.000000"
    l4d_spot_marker_sprite_min_max "4.0"

    // Sprite model.
    // -
    // Default: "vgui/icon_download.vmt"
    l4d_spot_marker_sprite_model "vgui/icon_download.vmt"

    // Sprite scale (increases both height and width).
    // Some range values maintain the size the same.
    // -
    // Default: "0.25"
    // Minimum: "0.000000"
    l4d_spot_marker_sprite_scale "0.25"

    // Speed that the sprite will move at the Z axis.
    // 0 = OFF.
    // -
    // Default: "1.0"
    // Minimum: "0.000000"
    l4d_spot_marker_sprite_speed "1.0"

    // Additional Z axis to the sprite.
    // -
    // Default: "50.0"
    // Minimum: "0.000000"
    l4d_spot_marker_sprite_z_axis "50.0"

    // Apply the same random color for both field and sprite.
    // 0 = OFF, 1 = ON.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d_spot_marker_sync_random_color "1"

    // Which teams should be able to create spot markers.
    // 0 = NONE, 1 = SURVIVOR, 2 = INFECTED, 4 = SPECTATOR, 8 = HOLDOUT.
    // Add numbers greater than 0 for multiple options.
    // Example: "3", enables for SURVIVOR and INFECTED.
    // -
    // Default: "3"
    // Minimum: "0.000000"
    // Maximum: "15.000000"
    l4d_spot_marker_team "3"

    // Use sound.
    // Empty = OFF.
    // -
    // Default: "buttons/blip1.wav"
    l4d_spot_marker_use_sound "buttons/blip1.wav" 
    Admin Commands
    • sm_spotmarker => Create a spot marker on self crosshair (no args) or specified targets crosshair. Example: self -> sm_spotmarker / target -> sm_spotmarker @bots. (z flag required)
    • sm_print_cvars_l4d_spot_marker => Print the plugin related cvars and their respective values to the console. (z flag required)

    Change Log

    Spoiler


    To Do
    • Add option to player select their own spot marker colors.

    Current Translations
    • en - English
    • es - Spanish
    • hu - Hungarian
    • pt - Brazilian Portuguese
    • pt_p - Portuguese
    • ro - Romanian
    • chi - Simplified Chinese
    • zho - Traditional Chinese

    Notes
    • The default plugin sprite is visible through walls, this is because of an attribute on the original .vmt file ($ignorez 1).

      If this bothers you, try setting the following cvar to one of these materials:
      PHP Code:
      l4d_spot_marker_sprite_model "vgui/hud/icon_locator_generic.vmt" 
      PHP Code:
      //can't recolor, default color: white
      l4d_spot_marker_sprite_model "vgui/resource/downarrow.vmt" 

    Thank you!

    Related Plugins

    Post Reply
    • Any feedback, bug reports, fixes, improvements, translations or suggestions for the plugin are welcome.

    Installation
    • Put the "l4d_spot_marker.phrases.txt" file in your "\addons\sourcemod\translations\" folder.
    • Put the "l4d_spot_marker.smx" file (click Get Plugin) in your "\addons\sourcemod\plugins\" folder.
    Attached Files
    File Type: txt l4d_spot_marker.phrases.txt (2.9 KB, 79 views)
    File Type: sp Get Plugin or Get Source (l4d_spot_marker.sp - 131 views - 47.9 KB)
    __________________

    Last edited by Marttt; 01-30-2024 at 06:29.
    Marttt is offline
    PEK727
    Junior Member
    Join Date: Aug 2020
    Location: United States
    Old 03-17-2021 , 14:46   Re: [L4D1 & L4D2] Spot Marker [v1.0.0 | 16-March-2021]
    Reply With Quote #2

    Yet another thing I've wanted in L4D2, it works like a charm!
    PEK727 is offline
    Dragokas
    Veteran Member
    Join Date: Nov 2017
    Location: Ukraine on fire
    Old 03-18-2021 , 07:02   Re: [L4D1 & L4D2] Spot Marker [v1.0.0 | 16-March-2021]
    Reply With Quote #3

    Cool! Nice feature!
    __________________
    Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
    [My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
    Dragokas is offline
    Benjamin38
    New Member
    Join Date: Jan 2021
    Old 03-19-2021 , 22:29   Re: [L4D1 & L4D2] Spot Marker [v1.0.0 | 16-March-2021]
    Reply With Quote #4

    Will it be possible to make a sound or a notification appear each time it is used?

    Sorry my english D:
    Benjamin38 is offline
    moschinovac
    Member
    Join Date: Mar 2019
    Location: Vietnam
    Old 03-24-2021 , 22:46   Re: [L4D1 & L4D2] Spot Marker [v1.0.0 | 16-March-2021]
    Reply With Quote #5

    Sometime the arrow can see throught the wall make this is too OP in Realism. Anyway, good plugins.
    moschinovac is offline
    Proaxel
    Member
    Join Date: Oct 2014
    Old 03-25-2021 , 04:14   Re: [L4D1 & L4D2] Spot Marker [v1.0.0 | 16-March-2021]
    Reply With Quote #6

    I've always thought that one of the main things in L4D2 that does not hold up well today is its lack of a ping system for weapons and items. While this plugin isn't quite there yet it definitely is a start! Here's to hoping this can be built up further into a real ping system that certain other recent team based games have.

    I thought getting it to work with other entities would be as simple as adding this part into the code:
    PHP Code:
        if (IsValidClientIndex(clientAim))
        {
            
    hit true;
            
    GetClientAbsOrigin(clientAimvEndPos);
            
    PrintToChatAll("%N pinged \x03%N"clientclientAim);
        }
        else if((
    IsValidEntity(clientAim)))
        {
            
    hit true;
            
    GetEntPropVector(clientAimProp_Send"m_vecOrigin"vEndPos0);
            
    char entityName[100];
            
    GetEdictClassname(clientAimentityNamesizeof(entityName));
            
    PrintToChatAll("%N pinged \x03%s"cliententityName);
        } 
    Unfortunately this wasn't the case, I tried it on weapon and item spawns in a safe room as well as items dropped on the ground, and while the marker appears as normal the chat message did not. Hopefully the proper solution to this isn't too complex...
    Proaxel is offline
    Benjamin38
    New Member
    Join Date: Jan 2021
    Old 03-25-2021 , 19:54   Re: [L4D1 & L4D2] Spot Marker [v1.0.0 | 16-March-2021]
    Reply With Quote #7

    I am learning.
    add sound and notification.
    Attached Files
    File Type: zip translations.zip (822 Bytes, 189 views)
    File Type: sp Get Plugin or Get Source (l4d_spot_marker.sp - 352 views - 32.0 KB)

    Last edited by Benjamin38; 03-25-2021 at 20:35.
    Benjamin38 is offline
    Shao
    Senior Member
    Join Date: Jan 2015
    Old 03-29-2021 , 07:02   Re: [L4D1 & L4D2] Spot Marker [v1.0.0 | 16-March-2021]
    Reply With Quote #8

    Getting this when in versus.

    L 03/29/2021 - 03:58:00: [SM] Exception reported: Client index 962 is invalid
    L 03/29/2021 - 03:58:00: [SM] Blaming: l4d_spot_marker.smx
    L 03/29/2021 - 03:58:00: [SM] Call stack trace:
    L 03/29/2021 - 03:58:00: [SM] [0] IsFakeClient
    L 03/29/2021 - 03:58:00: [SM] [1] Line 360, /home/forums/content/files/2/9/0/3/2/7/188332.attach::OnPlayerRunCmdPost
    Shao is offline
    Marttt
    Veteran Member
    Join Date: Jan 2019
    Location: Brazil
    Old 04-03-2021 , 17:22   Re: [L4D1 & L4D2] Spot Marker [v1.0.1 | 03-April-2021]
    Reply With Quote #9

    Shao, I wasn't able to reproduce your issue at my end, I even searched in the forum and haven't found any similar case (found only this post here), maybe some plugin is messing with your OnPlayerRunCmd.

    Btw, I added a client index check now on OnPlayerRunCmdPost.

    --------------------------------------------------

    moschinovac,

    Related to the sprite being visible through walls, try to do the following steps (added as a Note to the main thread).
    • The default plugin sprite is visible through walls, this is because of an attribute on the original .vmt file ($ignorez 1).

      If this bothers you, try setting the following cvar to one of these materials:
      PHP Code:
      l4d_spot_marker_sprite_model "materials/vgui/hud/icon_locator_generic.vmt" 
      PHP Code:
      //can't recolor, default color: white
      l4d_spot_marker_sprite_model "materials/vgui/resource/downarrow.vmt" 
    __________________

    Last edited by Marttt; 04-09-2021 at 12:12.
    Marttt is offline
    Psyk0tik
    Veteran Member
    Join Date: May 2012
    Location: Homeless
    Old 04-03-2021 , 19:09   Re: [L4D1 & L4D2] Spot Marker [v1.0.1 | 03-April-2021]
    Reply With Quote #10

    Quote:
    Originally Posted by Marttt View Post
    Shao, I wasn't able to reproduce your issue at my end, I even searched in the forum and haven't found any similar case (found only this post here), maybe some plugin is messing with your OnPlayerRunCmd.

    If this error keeps throwing in your server, PM me so I will add a client index check on the plugin.
    I would still add a client index check just in case. Errors like that tend to happen since the forward can fire even for invalid clients, and sometimes they can be caused by other plugins not validating their own clients in their own usage of the forward.

    Issues like this also occur for sound hooks which I've run into a lot.

    If anyone still gets those invalid index errors even with the index checks added, then the problem lies elsewhere.
    __________________
    Psyk0tik is offline
    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 05:13.


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