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[ANY] Beam Follow by Classname [v1.0.0 | 21-May-2022]


MYGO.pl
 Udostępnij

Rekomendowane odpowiedzi

  • RSSy
Description

Adds a beam following an entity (TE_SetupBeamFollow) by classname.

Tested in L4D1/L4D2/PVKII games but may work in other games as well. (however the classnames in the data file are only based on these 3 games)

Features
  • Allow enabling/disabling the plugin.
  • Allow setting the beam model.
  • Allow setting the beam time duration.
  • Allow setting the beam initial width.
  • Allow setting the beam ending width.
  • Allow setting the beam fade time duration.
  • Allow setting a random RGB color to the beam.
  • Allow setting the beam RGB color.
  • Allow setting a random alpha (transparency) to the beam.
  • Allow setting the beam alpha (transparency).

Preview

68747470733a2f2f692e696d6775722e636f6d2f

Cvars

A configuration file named "beam_follow_classname.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"
beam_follow_classname_enable "1" 

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

// Attributes explained:
// "enable"        -> Apply a beam follow to entity. "0" = Disable, "1" = Enable.
// "model"         -> Beam model.
// "lifeDuration"  -> Beam time duration.
// "widthStart"    -> Beam initial width.
// "widthEnd"      -> Beam ending width.
// "fadeDuration"  -> Beam fade time duration.
// "randomColor"   -> Apply a random RGB color to the beam. "0" = OFF, "1" = ON.
// "color"         -> Beam RGB color. Use three values between 0-255 separated by spaces. "<0-255> <0-255> <0-255>", e.g: "255 255 255". Ignored when "randomColor" is "1".
// "randomAlpha"   -> Apply a random alpha (transparency) to the beam. "0" = OFF, "1" = ON.
// "alpha"         -> Beam alpha (transparency). 0-255. "0" = Invisible (0%), "255" = Fully visible (100%). Ignored when "randomAlpha" is "1".
// Note: You can overwrite the "default" attribute values inside any other section (e.g. "classnames")

"beam_follow_classname"
{
    
"default"
    
{
        
"enable"            "1"
        "model"             "materials/sprites/laser.vmt"
        "lifeDuration"      "1.0"
        "widthStart"        "5.0"
        "widthEnd"          "5.0"
        "fadeDuration"      "10"
        "randomColor"       "1"
        "color"             "255 255 255"
        "randomAlpha"       "0"
        "alpha"             "255"
    
}

    
"classnames"
    
{
        
/*** L4D1 and L4D2 classnames ***/

        // Survivor - Throwable - Slot 3
        
"molotov_projectile"
        
{
            
"enable"            "1"
            "randomColor"       "0"
            "color"             "255 50 0"
        
}

        
// Survivor - Throwable - Slot 3
        
"pipe_bomb_projectile"
        
{
            
"enable"            "1"
            "randomColor"       "0"
            "color"             "200 1 1"
        
}

        
// Survivor - Throwable - Slot 3 (L4D2 only)
        
"vomitjar_projectile"
        
{
            
"enable"            "1"
            "randomColor"       "0"
            "color"             "0 128 0"
        
}

        
// Survivor - Primary Weapon - Slot 1 (L4D2 only)
        
"grenade_launcher_projectile"
        
{
            
"enable"            "1"
            "randomColor"       "0"
            "color"             "255 0 0"
        
}

        
// Infected - Spitter - Special Ability (L4D2 only)
        
"spitter_projectile"
        
{
            
"enable"            "1"
            "randomColor"       "0"
            "color"             "0 255 0"
        
}

        
// Infected - Tank - Special Ability
        
"tank_rock"
        
{
            
"enable"            "1"
            "randomColor"       "0"
            "color"             "128 128 128"
        
}

        
/*** PVKII classnames ***/

        // Pirates - Skirmisher - Slot 3
        
"powderkeg"
        
{
            
"enable"            "1"
            "randomColor"       "0"
            "color"             "255 0 0"
        
}

        
// Pirates - Captain - Slot 2 + Special
        
"projectile_rocketball"
        
{
            
"enable"            "1"
            "randomColor"       "0"
            "color"             "255 0 0"
        
}

        
// Pirates - Captain - Slot 3
        
"npc_parrot"
        
{
            
"enable"            "1"
            "randomColor"       "0"
            "color"             "255 0 0"
        
}

        
// Pirates - Sharpshooter - Special
        
"projectile_powderhorn"
        
{
            
"enable"            "1"
            "randomColor"       "0"
            "color"             "255 0 0"
        
}

        
// Vikings - Huscarl - Slot 3
        
"throwaxe"
        
{
            
"enable"            "1"
            "randomColor"       "0"
            "color"             "0 255 0"
        
}

        
// Vikings - Gestir - Slot 3
        
"javelin"
        
{
            
"enable"            "1"
            "randomColor"       "0"
            "color"             "0 255 0"
        
}

        
// Vikings - Bondi - Slot 2
        
"atlatl"
        
{
            
"enable"            "1"
            "randomColor"       "0"
            "color"             "0 255 0"
        
}

        
// Vikings - Bondi - Slot 3 / Slot 3 + Special
        
"flatbow_arrow"
        
{
            
"enable"            "1"
            "randomColor"       "0"
            "color"             "0 255 0"
        
}

        
// Knights - Archer - Slot 2
        
"crossbow_bolt"
        
{
            
"enable"            "1"
            "randomColor"       "0"
            "color"             "0 0 255"
        
}

        
// Knights - Archer - Slot 3 / Slot 3 + Special
        
"arrow"
        
{
            
"enable"            "1"
            "randomColor"       "0"
            "color"             "0 0 255"
        
}

        
// Knights - Man-at-Arms - Slot 3
        
"crossbow_bolt_maa"
        
{
            
"enable"            "1"
            "randomColor"       "0"
            "color"             "0 0 255"
        
}

        
// Knights - Assassin - Slot 2
        
"crossbow_pistol_bolt"
        
{
            
"enable"            "1"
            "randomColor"       "0"
            "color"             "0 0 255"
        
}

        
// Knights - Assassin - Slot 3
        
"projectile_pouch"
        
{
            
"enable"            "1"
            "randomColor"       "0"
            "color"             "0 0 255"
        
}

        
// Knights - Assassin - Slot 3
        
"projectile_caltrops"
        
{
            
"enable"            "1"
            "randomColor"       "0"
            "color"             "0 0 255"
        
}

        
// Knights - Assassin - Special
        
"projectile_smokebomb"
        
{
            
"enable"            "1"
            "randomColor"       "0"
            "color"             "0 0 255"
        
}
    }


Admin Commands
  • sm_beam_follow_config_reload => Reload the beam follow configs. (z flag required)
  • sm_print_cvars_beam_follow_classname => Print the plugin related cvars and their respective values to the console. (z flag required)

Change Log

Spoiler


Notes
  • Using bigger values may crash the game.
  • The engine has a limitation on how many temp entities (plugin beams) can be rendered at the same time, usually 32.

Related Plugins

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

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

Attached Files
File Type: cfg beam_follow_classname.cfg (5.8 KB)
File Type: sp Get Plugin or Get Source (beam_follow_classname.sp - 15.2 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ę...