PHP код:
new StreamedNPC[MAX_PLAYERS];
public OnPlayerStreamIn(playerid, forplayerid){
if(IsPlayerNPC(playerid) && IsPlayerNPC(forplayerid)){ //npc for npc
StreamedNPC[forplayerid]++;
if(StreamedNPC[forplayerid] >= 20){ //reached max npc in 300.0 range
}
}
return 1;
}
public OnPlayerStreamOut(playerid, forplayerid){
if(IsPlayerNPC(playerid) && IsPlayerNPC(forplayerid)){ //npc for npc
StreamedNPC[forplayerid]--;
}
return 1;
}