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_getReports
Jump to navigation
Jump to search
bz_APIStringList* bz_getReports ()
Retrieves reports made by other players in the same format as the /viewreports command does
Returns:
A bz_APIStringList data type containing all the reports available on the server.
Example
Shows all reports to any administrators that join the game as if they typed /viewreports.
case bz_ePlayerJoinEvent: {
if (bz_getAdmin(((bz_PlayerJoinPartEventData_V1*)eventData)->playerID)) {
for (int i=0;i<bz_getReports()->size();i++) {
bz_sendTextMessagef(BZ_SERVER,
((bz_PlayerJoinPartEventData_V1*)eventData)->playerID,"%s",bz_getReports()->get(i).c_str());
}
}
}break;