This wiki was in read-only mode for many years, but can now be edited again. A lot of information will need to be updated.

bz setShotMetaData

From BZFlagWiki
Revision as of 22:05, 19 April 2014 by JeffM2501 (talk | contribs) (Created page with "{{BZFS_API_Doc}} {{BZFS_API_Funcs}} ==Prototype== BZF_API void_t bz_setShotMetaData (int fromPlayer, int shotID, const char* name, uint32_t value); ==Parameters== {| border="1...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
BZFS API Documentation This page contains part of the BZFS API documentation for use by Plug-ins on the BZFS server.
BZFS API Function. This page documents a BZFS_API Function, that is provided by the BZFS game server for plug-ins to call.


Prototype

BZF_API void_t bz_setShotMetaData (int fromPlayer, int shotID, const char* name, uint32_t value);

Parameters

name type value desription
fromPlayer int the player who owns the shot, BZ_SERVER for world weapons
shotID int the local ID of the shot for the specified player
name const char* the name of the MetaData value to set
name uint32 the value to associate with the shot

Description

This API function will set the specified data and associated it with the specified shot. If the shot does not exist the function will do nothing. Setting data for a name on a shot will replace any previous data that was associated with the name.

Notes

Shot MetaData is useful for plug-ins that need to fake extra player shots with server based world weapons. Using MetaData a plug-in can store player or score information with the shot to be used later when the shot hits a target or expires. Shot MetaData is server side only and is unique to each shot fired. Multiple shots with the same ID over time will not contain the same data.