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

[L4D & L4D2] Tank Barbecue


MYGO.pl
 Udostępnij

Rekomendowane odpowiedzi

  • RSSy
Description

This plugin allows the Tank to spawn with burnt skin.
It also allows us to increase the maximum burnt skin value from 85% to 100%.
(Maybe someone can do a patch for this later).

This skin change is applied in the vanilla game, while the Tank is on fire, darkening the skin from time to time.

Preview

68747470733a2f2f692e696d6775722e636f6d2f

Cvars

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

PHP Code:

// Chance of a Tank spawning with burnt skin (%).
// -
// Default: "100.0"
// Minimum: "0.000000"
// Maximum: "100.000000"
l4d_tank_barbecue_chance "100.0"

// Enables/Disables the plugin. 0 = Plugin OFF, 1 = Plugin ON.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_tank_barbecue_enabled "1"

// Incremental value for the burnt % skin on every PreThink call after it reaches the maximum vanilla value (0.85) while the Tank is on fire.
// -
// Default: "0.01"
// Minimum: "0.000000"
// Maximum: "0.150000"
l4d_tank_barbecue_incrementvalue "0.01"

// Maximum random burnt % on the Tank skin on spawn.
// -
// Default: "100.0"
// Minimum: "0.000000"
// Maximum: "100.000000"
l4d_tank_barbecue_maxpercent "100.0"

// Minimal random burnt % on the Tank skin on spawn.
// -
// Default: "0.0"
// Minimum: "0.000000"
// Maximum: "100.000000"
l4d_tank_barbecue_minpercent "0.0" 

Admin Commands

PHP Code:

  • sm_print_cvars_l4d_tank_barbecue => Prints the plugin related cvars and their respective values to the console. (needs "z" flag)
  • sm_getburnpercent => Gets the percentage of burnt skin from the target Tank. (needs "z" flag).
  • sm_setburnpercent => Sets the percentage of burnt skin from the target TankOpens a menu when no value is specified. (needs "z" flag).
 

Change Log

Spoiler


Notes
  • This effect was achieved by changing the Tank's "m_burnPercent" netprop value.
  • All classname "player" has this netprop but it only changes the Tank skin.
  • The "barbecue" on plugin's name is because while the Tank is burning, the Tank's "m_bbqPercent" netprop value also changes. (but I didn't find any use for that, except for the plugin's name)
  • The Tank skin is updated using "OnPreThink".
  • I tried to use "TakeDamageAlivePost" to be less expensive, but from all my tries, the game resets it's value to 0.85, when the value becomes greater than 0.85 and the Tank is on fire.

To Do
  • Add bonus damage to the Tank depending on how much its skin is burned.

Thank you!
  • Silvers - for all your shared plugins that helped me a lot to make this one.
  • Lux - for all your shared plugins that helped me a lot to make this one.
  • Rain - for testing in his server.

Related Plugins

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

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

Attached Files
File Type: sp Get Plugin or Get Source (l4d_tank_barbecue.sp - 21.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

×
×
  • Dodaj nową pozycję...