NPC_UnloadAllRecords
تحذير
أُضيف هذا العنصر (دالة) في الإصدار omp v1.5.8.3079 ولا يعمل في الإصدارات الأقدم!
Description
Unloads all NPC recording files from memory to free up resources.
Returns
Returns true if all records were unloaded successfully, false otherwise.
Examples
public OnPlayerCommandText(playerid, cmdtext[])
{
if (!strcmp(cmdtext, "/npcunloadallrecords", true))
{
new bool:success = NPC_UnloadAllRecords();
if (success)
SendClientMessage(playerid, 0x00FF00FF, "All records unloaded successfully");
else
SendClientMessage(playerid, 0xFF0000FF, "Failed to unload all records");
return 1;
}
return 0;
}
Notes
- This frees up memory used by loaded recordings
- All record IDs become invalid after this function
- Any NPCs using these recordings will stop playback
Related Functions
- NPC_LoadRecord: Load a recording file
- NPC_UnloadRecord: Unload specific recording
- NPC_GetRecordCount: Get number of loaded records
- NPC_IsValidRecord: Check if record is valid
Related Callbacks
- OnNPCPlaybackEnd: Called when playback ends