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

[ANY] Attachments API (1.0) [01-Jul-2020]


MYGO.pl
 Udostępnij

Rekomendowane odpowiedzi

  • RSSy
Features:
  • Allows 3rd party plugins to attach stuff to weapons worldmodel.
  • Detects when a player changes model and fixes attachments to their player model and weapons.


About:
  • Creates hidden replicas of clients weapon worldmodel when required by other plugins, to save multiple duplicated entities and resources.
  • Fixes attachments to Weapons as required, by dropping the weapon for 0.1 seconds (set by attachments_api_equip cvar) and re-equipping.
  • Fixes attachments to player models by changing the attachment index when a players old/new model attachment name match. Checks every 0.1 seconds (set by attachments_api_check cvar)
    (currently only supports and required by L4D1 & L4D2. CS:GO needs data/attachments_api.csgo.cfg config data filling out if any plugins change players model, request support if required).



Thanks:
  • "Lux" - Various ideas and code.
  • "Voevoda" - Testing and bug reports.



Plugins using Attachment_API:

Known plugins this fixes (plugins that attach items to players):

Known plugins (model changers) causing attachment bugs on players:


Natives and Information for developers:
Spoiler




Admin Commands: (requires "z" flag)

PHP Code:

sm_attachment_qc        // Parses .qc files to get model attachment names. Usage: sm_parse_qc <folder path to .qc files>. Saves to sourcemod/data/attachments_new.cfg.
sm_attachment_reload    // Reload the attachments config: sourcemod/data/attachments_api.<game>.cfg 



CVars:

Saved to attachments_api.cfg in your servers \cfg\sourcemod\ folder.

PHP Code:

// How often to check if a players model has changed. Requires "attachments_api_models" value "1" to enable.
attachments_api_check "0.1"

// When weapons have attachments and a players model has changed, how long to drop the weapon before re-equipping to fix.
attachments_api_equip "0.1"

// 0=Off, 1=Detect when a players model changes to fix attachments to players (required by plugins attaching stuff to players).
attachments_api_models "0.1" in L4D1/L4D2"0.0" in other games (change if requiredsee "Information for developers" for adding attachment names).

// 0=Off, 1=Detect when a players model changes to fix attachments to weapons (required by plugins attaching stuff to weapons).
attachments_api_weapons "0.1" in L4D1/L4D2"0.0" in other gamesgames (change if requiredsee "Information for developers" for adding attachment names).

// Attachments API plugin version.
attachments_api_version 



Changes:
Code:

1.0 (01-Jul-2020)
    - Initial release.



Installation:
  1. Download the .zip and extract the files to their respective folders in your servers \addons\sourcemod\ folder.

Attached Files
File Type: zip attachments_api.zip (28.1 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ę...