NPC_IsAnyStreamedIn
cảnh báo
Đã thêm hàm trong phiên bản omp v1.5.8.3079. Mục này không hoạt động trên các phiên bản cũ hơn!
Description
Checks if an NPC is streamed in for any player on the server.
| Name | Description |
|---|---|
| npcid | The 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
Related Functions
- NPC_IsStreamedIn: Check if streamed in for specific player
- NPC_SetPos: Set NPC position
- NPC_SetVirtualWorld: Set NPC virtual world
- NPC_SetInterior: Set NPC interior
Related Callbacks
- OnNPCSpawn: Called when NPC spawns