SA-MP Forums Archive
Zombie not respawning - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Zombie not respawning (/showthread.php?tid=622791)



Zombie not respawning - Sp00l - 26.11.2016

PHP код:
fp SpawnarZumbi(iddata)
{
    if(
data == 1) return IsDeadNPC{id} = false;
    
    static
        
Float:nxFloat:px,
        
Float:nyFloat:py,
        
Float:nzFloat:pz,
        
bool:lockedproxs ;
    
locked true;
    while(
locked) {
        
GetVectorPath(gSpawnsMRandom(MAX_SPAWNS), nxnynz);
        
proxs 0;
        for (new 
0vector_size(gPlayersOnline) ; i++) {
            
GetPlayerPos(vector_get(gPlayersOnlinei), px,py,pz);
            if(
distance(pxpypznxnynz) <= 150.0) {
                
proxs++;
                break;
            }
        }
        if(!
proxs) {
            
locked false;
            break;
        }
    }
    
npc.SetPos(idnxnynz 1.0);
    
SetTimerEx("SpawnarZumbi"8000false"di"id,1);
    return 
1;

Well, the problem is that the zombie is not respawning, I don't know why, been trying to figure it out for like an hour.


Re: Zombie not respawning - Sp00l - 26.11.2016

I need ideas, anyone?