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[TF2] Cloak API


MYGO.pl
 Udostępnij

Rekomendowane odpowiedzi

  • RSSy
Cloak API

Have you ever wanted to mess with watches, whether for a new custom effect or just detect it? You've come to the right place.

This is an API that provides hooks for developers to use to detect and/or change the behaviours of watches.

It has an SDKHook-like system and it automatically unhooks when a player disconnects, so you won't have to.

Three Main Hooks

- OnActivateInvisibilityWatch: Based on
Code:

CTFWeaponInvis::ActivateInvisibilityWatch()
It gets called whenever a player activates or deactivates the watch.

- OnCleanupInvisibilityWatch: Based on
Code:

CTFWeaponInvis::CleanupInvisibilityWatch()
This function gets called when the player has changed loadouts or has done something else that causes it to clean up any side effects of the watch. It doesn't get called when a player dies for some reason, so I decided to make it call the forward myself. You've got an argument that tells you whether or not it was called because the player died, in case you don't want that behaviour.

- OnUpdateCloakMeter: Based on
Code:

CTFPlayerShared::UpdateCloakMeter()
It gets called every tick to manage the player's cloak drain & regen.

Examples

Here is an example of a plugin that utilizes the API.

https://github.com/Zabaniya001/attr_...s_during_cloak


Download

Github Repository

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ę...