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

NPC_UnloadRecord

எச்சரிக்கை

செயல்பாடு என்பது omp v1.5.8.3079 பதிப்பில் சேர்க்கப்பட்டது. இது முந்தைய பதிப்புகளில் இயங்காது!

Description​

Unloads a specific NPC recording from memory to free up resources.

NameDescription
recordIdThe ID of the record to unload

Returns​

Returns true if the record was unloaded successfully, false otherwise.

Examples​

public OnPlayerCommandText(playerid, cmdtext[])
{
if (!strcmp(cmdtext, "/npcunloadrecord ", true, 17))
{
new recordid = strval(cmdtext[17]);

new bool:success = NPC_UnloadRecord(recordid);

if (success)
SendClientMessage(playerid, 0x00FF00FF, "Record %d unloaded successfully", recordid);
else
SendClientMessage(playerid, 0xFF0000FF, "Failed to unload record %d", recordid);
return 1;
}
return 0;
}

Notes​

  • Frees memory used by the specific recording
  • The record ID becomes invalid after unloading
  • Any NPCs using this recording will stop playback
  • Use NPC_UnloadAllRecords to unload all recordings at once