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] Replace Cars Into Car Alarms [v1.0.0 | 09-January-2021]


MYGO.pl
 Udostępnij

Rekomendowane odpowiedzi

  • RSSy
Description

This plugin replaces normal cars with car alarms.

It was heavily inspired and borrowed a lot of code from the [L4D1&2] Spawn Alarmcars plugin.

Features
  • Configuring the color of the replaced car.
  • Configuring the chance to a existing car become a car alarm.
  • Configuring which models should be considered as valid cars to replace.

Cvars

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

PHP Code:

// Chance of a normal car be replaced by the plugin.
// -
// Default: "100.0"
// Minimum: "0.000000"
// Maximum: "100.000000"
l4d_replace_car_alarm_chance "100.0"

// Car alarm color.
// Use "maintain" to maintain the original color.
// Use "random" for random colors.
// Use three values between 0-255 separated by spaces ("<0-255> <0-255> <0-255>"), to apply a specific color. (e.g: "138 37 9", vanilla color of car alarm)
// -
// Default: "maintain"
l4d_replace_car_alarm_color "maintain"

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

// Ignore prop_car_alarm entities while replacing.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_replace_car_alarm_ignore_car_alarm "1" 

Valid models

File that goes at "\addons\sourcemod\data\" folder.

Spoiler


Admin Commands
  • sm_car_alarm_reload => Reload the valid models file to replace into car alarms. (z flag required)
  • sm_car_alarm_refresh => Refresh the car alarms replace chance. (z flag required)
  • sm_print_cvars_l4d_replace_car_alarm => Print the plugin related cvars and their respective values to the console. (z flag required)

Change Log

Spoiler


Notes
  • All replaced cars has the same model. (models/props_vehicles/cara_95sedan.mdl)
  • The plugin ignores cars that start with "PP_" on Questionable Ethics 1 (2nd Map).
  • prop_dynamic entities aren't considered in this plugin cause usually they bug when replaced. (not meant to have physics in most of cases, examples below)
  • Dead Air (4th Map) - there is a van (prop_dynamic - hammerid 2388979) that is not replaced. When replaced the event stops working.
  • Sacrifice (3rd Map) - there is a car (prop_dynamic - hammerid 5587943) next to the stairs used lift the bridge that is not replaced. When replaced the car bugs in the map.

Known Issues
  • May not work properly with [L4D & L4D2] Mutant Tanks plugin, for Tanks with car ability. (cars won't disappear)
  • The replaced car may not fit the same position from the previous model, because they may have different sizes.
  • In L4D1 seems that you can't trigger alarms so often, so when hitting a car alarm, you may have to wait for the next one trigger the alarm.
  • May not work properly in some custom maps (let me know if you find one) or with Stripper modifications (like Sky events), because there is no parentname in some entities related to the car, usually when that happens you can see a car glass floating next to the alarm car.

To Do
  • Allow car alarms to become random too (without alarm).

Thank you!

Related Plugins

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

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

Attached Files
File Type: cfg l4d_replace_car_alarm.cfg (1,022 Bytes)
File Type: sp Get Plugin or Get Source (l4d_replace_car_alarm.sp - 32.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ę...