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[L4D1 & L4D2] Random Entity Color [v1.0.0 | 27-September-2021]


MYGO.pl
 Udostępnij

Rekomendowane odpowiedzi

  • RSSy
Description

This plugin applies a random color to entities on the map.

Features
  • Allow configuring the color (random or specific).
  • Allow ignoring scavenge gas cans. L4D2 only.

Cvars

A configuration file named "l4d_random_entity_color.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"
l4d_random_entity_color_enable "1"

// (L4D2 only) Apply color to scavenge gascans.
// 0 = OFF, 1 = ON.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_random_entity_color_scavenge_gascan "0" 

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

// Attributes explained:
//  "enable"   -> Apply plugin color to entity. "0" = Disable, "1" = Enable.
//  "random"   -> Apply a random color. "0" = OFF, "1" = ON.
//  "color"    -> Entity 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".

"l4d_random_entity_color"
{
    
"default"
    
{
        
"enable"        "1"
        "random"        "1"
        "color"         "255 255 255"
    
}

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

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

        
// Secondary Weapons - Slot 2
        // Pistols
        
"weapon_pistol"
        
{
            
"enable"        "1"
            "random"        "1"
            "color"         "255 0 255"
        
}
        
"weapon_pistol_magnum"
        
{
            
"enable"        "1"
            "random"        "1"
            "color"         "255 0 255"
        
}

        
// Throwables - Slot 3
        
"weapon_molotov"
        
{
            
"enable"        "1"
            "random"        "1"
            "color"         "255 100 0"
        
}
        
"weapon_pipe_bomb"
        
{
            
"enable"        "1"
            "random"        "1"
            "color"         "255 100 0"
        
}
        
"weapon_vomitjar"
        
{
            
"enable"        "1"
            "random"        "1"
            "color"         "255 100 0"
        
}

        
// Upgrade Packs - Slot 4
        
"weapon_upgradepack_explosive"
        
{
            
"enable"        "1"
            "random"        "1"
            "color"         "0 255 0"
        
}
        
"weapon_upgradepack_incendiary"
        
{
            
"enable"        "1"
            "random"        "1"
            "color"         "0 255 0"
        
}

        
// Health Items - Slot 4
        
"weapon_first_aid_kit"
        
{
            
"enable"        "1"
            "random"        "1"
            "color"         "0 255 0"
        
}
        
"weapon_defibrillator"
        
{
            
"enable"        "1"
            "random"        "1"
            "color"         "0 255 0"
        
}

        
// Health Items - Slot 5
        
"weapon_pain_pills"
        
{
            
"enable"        "1"
            "random"        "1"
            "color"         "0 255 0"
        
}
        
"weapon_adrenaline"
        
{
            
"enable"        "1"
            "random"        "1"
            "color"         "0 255 0"
        
}

        
// Carryables
        
"weapon_gnome"
        
{
            
"enable"        "1"
            "random"        "1"
            "color"         "255 0 0"
        
}
        
"weapon_cola_bottles"
        
{
            
"enable"        "1"
            "random"        "1"
            "color"         "255 0 0"
        
}
        
"weapon_gascan"
        
{
            
"enable"        "1"
            "random"        "1"
            "color"         "255 0 0"
        
}
        
"weapon_propanetank"
        
{
            
"enable"        "1"
            "random"        "1"
            "color"         "255 0 0"
        
}
        
"weapon_oxygentank"
        
{
            
"enable"        "1"
            "random"        "1"
            "color"         "255 0 0"
        
}
        
"weapon_fireworkcrate"
        
{
            
"enable"        "1"
            "random"        "1"
            "color"         "255 0 0"
        
}

        
// Upgrades
        
"upgrade_laser_sight"
        
{
            
"enable"        "1"
            "random"        "1"
            "color"         "0 255 255"
        
}
        
"upgrade_ammo_incendiary"
        
{
            
"enable"        "1"
            "random"        "1"
            "color"         "0 255 255"
        
}
        
"upgrade_ammo_explosive"
        
{
            
"enable"        "1"
            "random"        "1"
            "color"         "0 255 255"
        
}

        
// Others
        
"weapon_ammo"
        
{
            
"enable"        "1"
            "random"        "1"
            "color"         "255 255 255"
        
}
        
"survivor_death_model"
        
{
            
"enable"        "0"
            "random"        "1"
            "color"         "255 0 0"
        
}
        
"prop_fuel_barrel"
        
{
            
"enable"        "0"
            "random"        "1"
            "color"         "255 0 0"
        
}
        
"prop_car_alarm"
        
{
            
"enable"        "0"
            "random"        "1"
            "color"         "255 255 255"
        
}
        
"prop_physics"
        
{
            
"enable"        "0"
            "random"        "1"
            "color"         "255 255 255"
        
}

        
// Miniguns
        
"prop_minigun"
        
{
            
"enable"        "1"
            "random"        "1"
            "color"         "255 255 255"
        
}
        
"prop_mounted_machine_gun"
        
{
            
"enable"        "1"
            "random"        "1"
            "color"         "255 255 255"
        
}
        
"prop_minigun_l4d1"
        
{
            
"enable"        "1"
            "random"        "1"
            "color"         "255 255 255"
        
}

        
// Melees - Slot 2
        
"weapon_chainsaw"
        
{
            
"enable"        "1"
            "random"        "1"
            "color"         "255 0 0"
        
}
        
"weapon_melee"
        
{
            
"enable"        "1"
            "random"        "1"
            "color"         "255 0 0"
        
}
    }

    
"melees"
    
{
        
"fireaxe"
        
{
            
"enable"        "1"
            "random"        "1"
            "color"         "255 0 0"
        
}
        
"frying_pan"
        
{
            
"enable"        "1"
            "random"        "1"
            "color"         "255 0 0"
        
}
        
"machete"
        
{
            
"enable"        "1"
            "random"        "1"
            "color"         "255 0 0"
        
}
        
"baseball_bat"
        
{
            
"enable"        "1"
            "random"        "1"
            "color"         "255 0 0"
        
}
        
"crowbar"
        
{
            
"enable"        "1"
            "random"        "1"
            "color"         "255 0 0"
        
}
        
"cricket_bat"
        
{
            
"enable"        "1"
            "random"        "1"
            "color"         "255 0 0"
        
}
        
"tonfa"
        
{
            
"enable"        "1"
            "random"        "1"
            "color"         "255 0 0"
        
}
        
"katana"
        
{
            
"enable"        "1"
            "random"        "1"
            "color"         "255 0 0"
        
}
        
"electric_guitar"
        
{
            
"enable"        "1"
            "random"        "1"
            "color"         "255 0 0"
        
}
        
"knife"
        
{
            
"enable"        "1"
            "random"        "1"
            "color"         "255 0 0"
        
}
        
"golfclub"
        
{
            
"enable"        "1"
            "random"        "1"
            "color"         "255 0 0"
        
}
        
"pitchfork"
        
{
            
"enable"        "1"
            "random"        "1"
            "color"         "255 0 0"
        
}
        
"shovel"
        
{
            
"enable"        "1"
            "random"        "1"
            "color"         "255 0 0"
        
}
        
"riotshield"
        
{
            
"enable"        "1"
            "random"        "1"
            "color"         "255 0 0"
        
}
    }

    
"targetname"
    
{
        
"targetname-example"
        
{
            
"enable"        "1"
        
}
    }

    
"models"
    
{
        
"models/model-example.mdl"
        
{
            
"enable"        "1"
        
}
    }


Admin Commands
  • sm_colorinfo => Outputs to the chat the color info about the entity at your crosshair. (z flag required)
  • sm_colorreload => Reload the color configs. (z flag required)
  • sm_colorremove => Remove plugin color from entity at crosshair. (z flag required)
  • sm_colorremoveall => Remove all colors created by the plugin. (z flag required)
  • sm_coloradd => Add color (with default config) to entity at crosshair. (z flag required)
  • sm_colorall => Add color (with default config) to everything possible. (z flag required)
  • sm_print_cvars_l4d_random_entity_color => Print the plugin related cvars and their respective values to the console. (z flag required)

Change Log

Spoiler


Notes
  • 1st person (viewmodel) weapons don't change color.
  • Some models aren't able to change color.

To Do
  • Add map based configs. (including hammerid config)

Thank you!

Related Plugins

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

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

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