انتقل إلى المحتوى الرئيسي

NPC_IsAnyStreamedIn

warning

This function was added in omp v1.5.8.3079 and will not work in earlier versions!

Description

Checks if an NPC is streamed in for any player on the server.

NameDescription
npcidThe ID of the NPC

Returns

Returns true if the NPC is streamed in for at least one player, false otherwise.

Examples

public OnPlayerCommandText(playerid, cmdtext[])
{
if (!strcmp(cmdtext, "/checkanystreamedin", true))
{
new bool:anyStreamed = NPC_IsAnyStreamedIn(playerid);

SendClientMessage(playerid, 0x00FF00FF, "Any NPCs streamed in for you: %s", anyStreamed ? "Yes" : "No");
return 1;
}
return 0;
}

Notes

  • An NPC is streamed in when it's within a player's streaming range