NPC_GetRecordCount
注意
此函式於 omp v1.5.8.3079 版本中新增,在更早的版本中無法使用!
Description
Gets the number of loaded NPC recording files on the server.
Returns
Returns the number of recording files currently loaded.
Examples
public OnPlayerCommandText(playerid, cmdtext[])
{
if (!strcmp(cmdtext, "/checkrecordcount", true))
{
new count = NPC_GetRecordCount();
SendClientMessage(playerid, 0x00FF00FF, "Total records loaded: %d", count);
return 1;
}
return 0;
}
Notes
- Returns the total number of valid recordings in memory
- Only successfully loaded recordings are counted
- Recordings persist until explicitly unloaded or server restart
Related Functions
- NPC_LoadRecord: Load a recording file
- NPC_UnloadRecord: Unload a recording
- NPC_IsValidRecord: Check if record is valid
- NPC_UnloadAllRecords: Unload all recordings
Related Callbacks
- OnNPCPlaybackStart: Called when playback starts
- OnNPCPlaybackEnd: Called when playback ends