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

NPC_DestroyAllPath

எச்சரிக்கை

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

Description​

Destroys all existing NPC paths on the server.

Returns​

Returns true if the operation was successful, false otherwise.

Examples​

public OnGameModeExit()
{
// Get number of paths before clearing
new total = NPC_GetPathCount();

// Try to destroy them all
if (NPC_DestroyAllPath())
{
printf("[NPC] Destroyed all NPC paths (%d removed).", total);
}
else
{
printf("[NPC] Failed to destroy NPC paths.");
}

return 1;
}

Notes​

  • This function destroys ALL paths on the server and NPCs currently following paths will stop moving
  • All path IDs become invalid after this function is called
  • This is useful for cleanup during gamemode shutdown/restart