View Single Post
Author Message
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
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, 158 views)
File Type: sp Get Plugin or Get Source (l4d_spot_marker.sp - 231 views - 47.9 KB)
__________________

Last edited by Marttt; 01-30-2024 at 06:29.
Marttt is offline