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: Difference between revisions
Jump to navigation
Jump to search
Create API Function Page. Include Example. |
m doe -> does |
||
| Line 3: | Line 3: | ||
| returns = A [[bz_APIStringList]] data type containing all the reports available on the server. | | returns = A [[bz_APIStringList]] data type containing all the reports available on the server. | ||
| returntype = bz_APIStringList* | | returntype = bz_APIStringList* | ||
| description = Retrieves reports made by other players in the same format as the '''/viewreports''' command | | description = Retrieves reports made by other players in the same format as the '''/viewreports''' command does | ||
}} | }} | ||
Latest revision as of 09:06, 19 October 2011
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;