முதன்மை உள்ளடக்கத்துக்குச் செல்லவும்

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