Checking Ranges and respawning.
#5

without timers/loops but for 300.0 range
PHP код:
new StreamedNPC[MAX_PLAYERS];
public 
OnPlayerStreamIn(playeridforplayerid){
    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(playeridforplayerid){
    if(
IsPlayerNPC(playerid) && IsPlayerNPC(forplayerid)){ //npc for npc
        
StreamedNPC[forplayerid]--;
    }
    return 
1;

Reply


Messages In This Thread
Checking Ranges and respawning. - by iLearner - 16.08.2017, 16:50
Re: Checking Ranges and respawning. - by iLearner - 16.08.2017, 17:02
Re: Checking Ranges and respawning. - by Paulice - 16.08.2017, 17:20
Re: Checking Ranges and respawning. - by ZiGGi - 16.08.2017, 18:46
Re: Checking Ranges and respawning. - by AbyssMorgan - 16.08.2017, 18:54
Re: Checking Ranges and respawning. - by Paulice - 16.08.2017, 19:23

Forum Jump:


Users browsing this thread: 2 Guest(s)