Signature
native precache_event(type, const Name[], any:...);
Description
Precaches an event file.
Notes
- The event type should always be 1.
-
Contrary to the other precache_* natives, this can be used outside of
the plugin_precache() forward, e.g. in plugin_init() or plugin_cfg().
A bug in some clients makes this necessary, as plugin_precache() is
called before the mod has precached its own, default event files. This
can cause the event table to be misaligned on the client, leading to
visual and audio bugs that are hard to diagnose.
Parameters
- type — Event type
- Name — Formatting rules, path to the event file
- ... — Variable number of formatting parameters
Returns
Unique cache id of the event