This wiki is archived and useful information is being migrated to the main bzflag.org website
Editing Functions (API)
Warning: The database has been locked for maintenance, so you will not be able to save your edits right now. You may wish to copy and paste your text into a text file and save it for later.
The administrator who locked it offered this explanation: Archived wiki
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 5: | Line 5: | ||
}} | }} | ||
− | {{BZFS_API_Doc | + | {{BZFS_API_Doc}} |
Line 49: | Line 49: | ||
2.3+ | 2.3+ | ||
BZF_API bool [[bz_isPlayerPaused]] ( int playerID ); | BZF_API bool [[bz_isPlayerPaused]] ( int playerID ); | ||
− | BZF_API bool [[ | + | BZF_API bool [[bz_canPlayerSpawn]]( int playerID ); |
BZF_API bool [[bz_getPlayerCurrentState]] ( int playerID, bz_PlayerUpdateState &state ); | BZF_API bool [[bz_getPlayerCurrentState]] ( int playerID, bz_PlayerUpdateState &state ); | ||
− | |||
− | |||
− | |||
? | ? | ||
BZF_API bool [[bz_getPlayerPosition]] ( int playerID, float pos[3], bool extrapolate ); | BZF_API bool [[bz_getPlayerPosition]] ( int playerID, float pos[3], bool extrapolate ); | ||
Line 64: | Line 61: | ||
2.3+ | 2.3+ | ||
BZF_API [[bz_BasePlayerRecord]] *[[bz_getPlayerByIndex]] ( int index ); | BZF_API [[bz_BasePlayerRecord]] *[[bz_getPlayerByIndex]] ( int index ); | ||
− | BZF_API [[bz_BasePlayerRecord]] *[[ | + | BZF_API [[bz_BasePlayerRecord]] *[[bz_getPlayerByCallsign]] ( const char* name ); |
+ | BZF_API [[bz_BasePlayerRecord]] *[[bz_getPlayerByBZID]] ( int BZID ); | ||
BZF_API bool [[bz_updatePlayerData]] ( [[bz_BasePlayerRecord]] *playerRecord ); | BZF_API bool [[bz_updatePlayerData]] ( [[bz_BasePlayerRecord]] *playerRecord ); | ||
BZF_API bool [[bz_freePlayerRecord]] ( [[bz_BasePlayerRecord]] *playerRecord ); | BZF_API bool [[bz_freePlayerRecord]] ( [[bz_BasePlayerRecord]] *playerRecord ); | ||
Line 72: | Line 70: | ||
BZF_API bool [[bz_getPlayerIndexList]] ( [[bz_APIIntList]] *playerList ); | BZF_API bool [[bz_getPlayerIndexList]] ( [[bz_APIIntList]] *playerList ); | ||
BZF_API void [[bz_deleteIntList]] ( [[bz_APIIntList]] *l); | BZF_API void [[bz_deleteIntList]] ( [[bz_APIIntList]] *l); | ||
− | |||
− | |||
− | |||
− | |||
==== Player Management ==== | ==== Player Management ==== | ||
Line 84: | Line 78: | ||
BZF_API bool [[bz_setPlayerOperator]] ( int playerId ); | BZF_API bool [[bz_setPlayerOperator]] ( int playerId ); | ||
? | ? | ||
+ | BZF_API bool [[bz_setPlayerSpawnable]]( int playerID, bool spawn ); | ||
BZF_API bool [[bz_setPlayerLimboMessage]]( int playerID, const char* text ); | BZF_API bool [[bz_setPlayerLimboMessage]]( int playerID, const char* text ); | ||
BZF_API bool [[bz_setPlayerCustomData]] (int playerID, const char* key, const char* data ); | BZF_API bool [[bz_setPlayerCustomData]] (int playerID, const char* key, const char* data ); | ||
Line 96: | Line 91: | ||
BZF_API void [[bz_setTeamWins]] ([[bz_eTeamType]] team, int wins ); | BZF_API void [[bz_setTeamWins]] ([[bz_eTeamType]] team, int wins ); | ||
BZF_API void [[bz_setTeamLosses]] ([[bz_eTeamType]] team, int losses ); | BZF_API void [[bz_setTeamLosses]] ([[bz_eTeamType]] team, int losses ); | ||
− | |||
− | |||
BZF_API void [[bz_resetTeamScore]] ([[bz_eTeamType]] team ); | BZF_API void [[bz_resetTeamScore]] ([[bz_eTeamType]] team ); | ||
BZF_API void [[bz_resetTeamScores]] ( void ); | BZF_API void [[bz_resetTeamScores]] ( void ); | ||
Line 109: | Line 102: | ||
BZF_API bool [[bz_setPlayerTKs]] ( int playerId, int tks ); | BZF_API bool [[bz_setPlayerTKs]] ( int playerId, int tks ); | ||
BZF_API bool [[bz_resetPlayerScore]] ( int playerId ); | BZF_API bool [[bz_resetPlayerScore]] ( int playerId ); | ||
− | |||
− | |||
− | |||
BZF_API int [[bz_getPlayerWins]] ( int playerId ); | BZF_API int [[bz_getPlayerWins]] ( int playerId ); | ||
BZF_API int [[bz_getPlayerLosses]] ( int playerId ); | BZF_API int [[bz_getPlayerLosses]] ( int playerId ); | ||
Line 122: | Line 112: | ||
BZF_API int [[bz_getPlayerJitter]] ( int playerId ); | BZF_API int [[bz_getPlayerJitter]] ( int playerId ); | ||
BZF_API float [[bz_getPlayerPacketloss]] ( int playerId ); | BZF_API float [[bz_getPlayerPacketloss]] ( int playerId ); | ||
− | |||
− | |||
=== Permission Group Management === | === Permission Group Management === | ||
Line 154: | Line 142: | ||
BZF_API void [[bz_reloadUsers]] (); | BZF_API void [[bz_reloadUsers]] (); | ||
BZF_API void [[bz_reloadHelp]] (); | BZF_API void [[bz_reloadHelp]] (); | ||
− | |||
− | |||
− | |||
− | |||
− | |||
? | ? | ||
+ | BZF_API int [[bz_getPlayerCount]] ( void ); | ||
BZF_API bool [[bz_anyPlayers]] ( void ); | BZF_API bool [[bz_anyPlayers]] ( void ); | ||
Line 177: | Line 161: | ||
BZF_API bool [[bz_givePlayerFlag]] ( int playerID, const char* flagType, bool force ); | BZF_API bool [[bz_givePlayerFlag]] ( int playerID, const char* flagType, bool force ); | ||
BZF_API bool [[bz_removePlayerFlag]] ( int playerID ); | BZF_API bool [[bz_removePlayerFlag]] ( int playerID ); | ||
− | BZF_API void [[bz_resetFlags]] ( bool onlyUnused | + | BZF_API void [[bz_resetFlags]] ( bool onlyUnused ); |
BZF_API unsigned int [[bz_getNumFlags]] ( void ); | BZF_API unsigned int [[bz_getNumFlags]] ( void ); | ||
BZF_API const [[bz_ApiString]] [[bz_getFlagName|bz_getName]] ( int flag ); | BZF_API const [[bz_ApiString]] [[bz_getFlagName|bz_getName]] ( int flag ); | ||
BZF_API bool [[bz_resetFlag]] ( int flag ); | BZF_API bool [[bz_resetFlag]] ( int flag ); | ||
BZF_API int [[bz_flagPlayer]] ( int flag ); | BZF_API int [[bz_flagPlayer]] ( int flag ); | ||
− | |||
− | |||
BZF_API bool [[bz_getFlagPosition]] ( int flag, float* pos ); | BZF_API bool [[bz_getFlagPosition]] ( int flag, float* pos ); | ||
BZF_API bool [[bz_moveFlag]] ( int flag, float pos[3] ); | BZF_API bool [[bz_moveFlag]] ( int flag, float pos[3] ); | ||
Line 191: | Line 173: | ||
? | ? | ||
BZF_API bool [[bz_setPlayerShotType]] ( int playerId, [[bz_eShotType]] shotType ); | BZF_API bool [[bz_setPlayerShotType]] ( int playerId, [[bz_eShotType]] shotType ); | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
=== World Weapon Management === | === World Weapon Management === | ||
2.3+ | 2.3+ | ||
BZF_API bool [[bz_fireWorldWep]] ( const char* flagType, float lifetime, int fromPlayer, float *pos, float tilt, float direction, int shotID , float dt, bz_eTeamType shotTeam = eRogueTeam ); | BZF_API bool [[bz_fireWorldWep]] ( const char* flagType, float lifetime, int fromPlayer, float *pos, float tilt, float direction, int shotID , float dt, bz_eTeamType shotTeam = eRogueTeam ); | ||
− | |||
BZF_API int [[bz_fireWorldGM]] ( int targetPlayerID, float lifetime, float *pos, float tilt, float direction, float dt, bz_eTeamType shotTeam = eRogueTeam ); | BZF_API int [[bz_fireWorldGM]] ( int targetPlayerID, float lifetime, float *pos, float tilt, float direction, float dt, bz_eTeamType shotTeam = eRogueTeam ); | ||
Line 271: | Line 245: | ||
BZF_API bool [[bz_setTimeLimit]] ( float timeLimit ); | BZF_API bool [[bz_setTimeLimit]] ( float timeLimit ); | ||
BZF_API float [[bz_getTimeLimit]] ( void ); | BZF_API float [[bz_getTimeLimit]] ( void ); | ||
− | |||
BZF_API bool [[bz_isTimeManualStart]] ( void ); | BZF_API bool [[bz_isTimeManualStart]] ( void ); | ||
BZF_API bool [[bz_isCountDownActive]] ( void ); | BZF_API bool [[bz_isCountDownActive]] ( void ); | ||
BZF_API bool [[bz_isCountDownInProgress]] ( void ); | BZF_API bool [[bz_isCountDownInProgress]] ( void ); | ||
− | |||
− | |||
BZF_API void [[bz_pauseCountdown]] ( const char *pausedBy ); | BZF_API void [[bz_pauseCountdown]] ( const char *pausedBy ); | ||
− | |||
BZF_API void [[bz_resumeCountdown]] ( const char *resumedBy ); | BZF_API void [[bz_resumeCountdown]] ( const char *resumedBy ); | ||
− | |||
BZF_API void [[bz_startCountdown]] ( int delay, float limit, const char *byWho ); | BZF_API void [[bz_startCountdown]] ( int delay, float limit, const char *byWho ); | ||
− | |||
− | |||
=== Custom Text Commands === | === Custom Text Commands === | ||
Line 378: | Line 345: | ||
2.3+ | 2.3+ | ||
BZF_API bool [[bz_getStandardSpawn]] ( int playerID, float pos[3], float *rot ); | BZF_API bool [[bz_getStandardSpawn]] ( int playerID, float pos[3], float *rot ); | ||
− | |||
BZF_API bool [[bz_killPlayer]] ( int playerID, bool spawnOnBase, int killerID = -1, const char* flagID = NULL ); | BZF_API bool [[bz_killPlayer]] ( int playerID, bool spawnOnBase, int killerID = -1, const char* flagID = NULL ); | ||
BZF_API bool [[bz_sendPlayCustomLocalSound]] ( int playerID, const char* soundName ); | BZF_API bool [[bz_sendPlayCustomLocalSound]] ( int playerID, const char* soundName ); | ||
Line 398: | Line 364: | ||
== See also == | == See also == | ||
− | + | [[BZFS API]] | |
− | + | ||
− | + | [[plug-ins]] | |
[[Category:BZFS_API_Functions]] | [[Category:BZFS_API_Functions]] |