16.08.2017, 18:54
without timers/loops but for 300.0 range
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;
}