RSSy MYGO.pl Opublikowano Wrzesień 25, 2021 o 20:12 RSSy Udostępnij Opublikowano Wrzesień 25, 2021 o 20:12 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 Więcej opcji udostępniania...
Rekomendowane odpowiedzi