Skocz do zawartości

Nowy szablon forum

mygo.pl

Stworzyliśmy dla Was nowy wygląd forum. Z pewnością znajdziesz rzeczy, które wg Ciebie mogą zostać zmienione - wspomnij o tym w specjalnym wątku.

Czytaj więcej

Jak założyć własną sieć

serwerów CS

Zastanawiasz się nad prowadzeniem własnej sieci serwerów? Przeczytaj podstawowe informacje, na które należy zwrócić uwagę, przy takim projekcie.

Czytaj więcej

Tworzymy spis sieci

dodaj swoją

Dodaj sieć do której należysz, pozwoli to na promocję i budowę ogólnopolskiej bazy sieci CS.

Czytaj więcej

RSS[L4D2] Weapon Equip Glow [v1.0.0 | 26-December-2021]


MYGO.pl
 Udostępnij

Rekomendowane odpowiedzi

  • RSSy
L4D2 ONLY

Description

Adds glow to equipped items (visible by all teams) and restore the default glow config back on drop.

Besides all settings only the below items are able to have some configs changed, like the glow color:
  • Gascan
  • Propane Canister
  • Oxygen Tank
  • Fireworks Crate

Features
  • Allow to add a glow to equipped items.
  • Allow to set the glow type, color, flash and range for some weapons.
  • Allow configuring the glow brightness (not accurate).

Preview

68747470733a2f2f692e696d6775722e636f6d2f

Cvars

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

PHP Code:

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

// Which types of gascan should be affected by the plugin.
// 0 = NONE, 1 = NORMAL, 2 = SCAVENGE, 3 = BOTH.
// Add numbers greater than 0 for multiple options.
// Example: "3", enables for NORMAL and SCAVENGE gascans.
// -
// Default: "3"
// Minimum: "0.000000"
// Maximum: "3.000000"
l4d2_weapon_equip_glow_gascan_type "3"

// Algorithm value to detect the glow minimum brightness for a random color (not accurate).
// -
// Default: "0.5"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d2_weapon_equip_glow_min_brightness "0.5" 

Data file (data/l4d2_weapon_equipped_glow.cfg)
PHP Code:

// Attributes explained:
//  "enable"   -> Apply plugin glow to entity. "0" = Disable, "1" = Enable.
//  "random"   -> Apply a random glow color. "0" = OFF, "1" = ON.
//  "color"    -> Item glow color. Use three values between 0-255 separated by spaces. "<0-255> <0-255> <0-255>", e.g: "255 255 255". Ignored when "random" is "1".
//  "flashing" -> Add a flashing effect on glowing entities. "0" = OFF, "1" = ON.
//  "type"     -> Glow type. "0" = OFF, "1" = OnUse (doesn't works), "2" = OnLookAt (doesn't works well for some entities), "3" = Constant (better results but visible through walls).
//  "rangemin" -> Minimum distance that the client must be from the entity to start glowing. "0" = No minimum distance.
//  "rangemax  -> Maximum distance that the client can be away from the entity to start glowing. "0" = No maximum distance.

"l4d2_weapon_equipped_glow"
{
    
"default"
    
{
        
"enable"        "0"
        "random"        "0"
        "color"         "255 255 255"
        "flashing"      "0"
        "type"          "3"
        "rangemin"      "0"
        "rangemax"      "0"
    
}

    
"classnames"
    
{
        
// Carryables
        
"weapon_gascan"
        
{
            
"enable"        "1"
            "color"         "255 0 0"
        
}
        
"weapon_propanetank"
        
{
            
"enable"        "1"
            "color"         "255 0 0"
        
}
        
"weapon_oxygentank"
        
{
            
"enable"        "1"
            "color"         "255 0 0"
        
}
        
"weapon_fireworkcrate"
        
{
            
"enable"        "1"
            "color"         "255 0 0"
        
}

        
// Note:
        // All weapons below only glow in the default color and aren't affected by any other config (game-design)
        
"weapon_gnome"
        
{
            
"enable"        "1"
        
}
        
"weapon_cola_bottles"
        
{
            
"enable"        "1"
        
}

        
// Primary Weapons - Slot 1
        // Tier 1
        // SMGs
        
"weapon_smg"
        
{
            
"enable"        "0"
        
}
        
"weapon_smg_silenced"
        
{
            
"enable"        "0"
        
}
        
"weapon_smg_mp5"
        
{
            
"enable"        "0"
        
}
        
// Shotguns
        
"weapon_pumpshotgun"
        
{
            
"enable"        "0"
        
}
        
"weapon_shotgun_chrome"
        
{
            
"enable"        "0"
        
}

        
// Tier 2
        // Rifles
        
"weapon_rifle"
        
{
            
"enable"        "0"
        
}
        
"weapon_rifle_desert"
        
{
            
"enable"        "0"
        
}
        
"weapon_rifle_ak47"
        
{
            
"enable"        "0"
        
}
        
"weapon_rifle_sg552"
        
{
            
"enable"        "0"
        
}
        
// Shotguns
        
"weapon_autoshotgun"
        
{
            
"enable"        "0"
        
}
        
"weapon_shotgun_spas"
        
{
            
"enable"        "0"
        
}
        
// Snipers
        
"weapon_hunting_rifle"
        
{
            
"enable"        "0"
        
}
        
"weapon_sniper_military"
        
{
            
"enable"        "0"
        
}
        
"weapon_sniper_scout"
        
{
            
"enable"        "0"
        
}
        
"weapon_sniper_awp"
        
{
            
"enable"        "0"
        
}
        
// Tier 3
        
"weapon_rifle_m60"
        
{
            
"enable"        "0"
        
}
        
"weapon_grenade_launcher"
        
{
            
"enable"        "0"
        
}

        
// Secondary Weapons - Slot 2
        // Pistols
        
"weapon_pistol"
        
{
            
"enable"        "0"
        
}
        
"weapon_pistol_magnum"
        
{
            
"enable"        "0"
        
}

        
// Throwables - Slot 3
        
"weapon_molotov"
        
{
            
"enable"        "0"
        
}
        
"weapon_pipe_bomb"
        
{
            
"enable"        "0"
        
}
        
"weapon_vomitjar"
        
{
            
"enable"        "0"
        
}

        
// Upgrade Packs - Slot 4
        
"weapon_upgradepack_explosive"
        
{
            
"enable"        "0"
        
}
        
"weapon_upgradepack_incendiary"
        
{
            
"enable"        "0"
        
}

        
// Health Items - Slot 4
        
"weapon_first_aid_kit"
        
{
            
"enable"        "0"
        
}
        
"weapon_defibrillator"
        
{
            
"enable"        "0"
        
}

        
// Health Items - Slot 5
        
"weapon_pain_pills"
        
{
            
"enable"        "0"
        
}
        
"weapon_adrenaline"
        
{
            
"enable"        "0"
        
}

        
// Melees - Slot 2
        
"weapon_chainsaw"
        
{
            
"enable"        "0"
        
}
        
"weapon_melee"
        
{
            
"enable"        "0"
        
}
    }

     
// "weapon_melee" must be "enabled" set to "1"
    
"melees"
    
{
        
"fireaxe"
        
{
            
"enable"        "0"
        
}
        
"frying_pan"
        
{
            
"enable"        "0"
        
}
        
"machete"
        
{
            
"enable"        "0"
        
}
        
"baseball_bat"
        
{
            
"enable"        "0"
        
}
        
"crowbar"
        
{
            
"enable"        "0"
        
}
        
"cricket_bat"
        
{
            
"enable"        "0"
        
}
        
"tonfa"
        
{
            
"enable"        "0"
        
}
        
"katana"
        
{
            
"enable"        "0"
        
}
        
"electric_guitar"
        
{
            
"enable"        "0"
        
}
        
"knife"
        
{
            
"enable"        "0"
        
}
        
"golfclub"
        
{
            
"enable"        "0"
        
}
        
"pitchfork"
        
{
            
"enable"        "0"
        
}
        
"shovel"
        
{
            
"enable"        "0"
        
}
        
"riotshield"
        
{
            
"enable"        "0"
        
}
    }


Admin Commands
  • sm_glowequipreload => Reload the glow equip configs. (z flag required)
  • sm_print_cvars_l4d2_weapon_equipped_glow => Print the plugin related cvars and their respective values to the console. (z flag required)

Change Log

Spoiler


Notes
  • When the weapon is not able to change some configs they will behave like a default glow (blue).

Related Plugins

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

Installation
  • Put the "l4d2_weapon_equipped_glow.cfg" file in your "\addons\sourcemod\data\" folder.
  • Put the "l4d2_weapon_equipped_glow.smx" file (click Get Plugin) in your "\addons\sourcemod\plugins\" folder.

Attached Files
File Type: cfg l4d2_weapon_equip_glow.cfg (5.9 KB)
File Type: sp Get Plugin or Get Source (l4d2_weapon_equip_glow.sp - 23.9 KB)

Wyświetl pełny artykuł

Odnośnik do komentarza
Udostępnij na innych stronach

Gość
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
 Udostępnij

  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...