Server Crash on NPC Connect Timer
#7

Quote:
Originally Posted by Vince
Посмотреть сообщение
I don't think you realize that you current code does exactly the same thing. It just waits 1 second and then it connects them all simultaneously anyway. If you need a 1 second interval then you can multiply "npcid" with 1000. There is another solution that only uses one timer but it is more complex and since this thing only gets executed once it doesn't really matter.
Yes, saw it now..

i tried it with:

Код:
forward ZombieTimer();
public ZombieTimer()
{
    RNPC_SetUpdateRate(80);

    MapAndreas_Init(MAP_ANDREAS_MODE_NOBUFFER);
    new zombie_count = 0;
 	new name[24];
    format(name, sizeof(name), "Zombie_%i", zombie_count + 1);
    ConnectRNPC(name);

    zombie_count++;

    if(zombie_count == MAX_ZOMBIES)
    {
       KillTimer(ZombieTimer);
    }
    return 1;
}
But now i get error 076: syntax error in the expression, or invalid function call
at KillTimer(ZombieTimer);

Edit:
Timer: SetTimer("ZombieTimer", 500, true);
Reply


Messages In This Thread
Server Crash on NPC Connect Timer - by LongGong - 29.06.2017, 00:32
Re: Server Crash on NPC Connect Timer - by NewFreeroamStunt - 29.06.2017, 07:17
Re: Server Crash on NPC Connect Timer - by iLearner - 29.06.2017, 07:19
Re: Server Crash on NPC Connect Timer - by LongGong - 29.06.2017, 21:40
Re: Server Crash on NPC Connect Timer - by Konstantinos - 30.06.2017, 10:43
Re: Server Crash on NPC Connect Timer - by Vince - 30.06.2017, 11:47
Re: Server Crash on NPC Connect Timer - by LongGong - 30.06.2017, 15:55
Re: Server Crash on NPC Connect Timer - by LongGong - 03.07.2017, 20:11

Forum Jump:


Users browsing this thread: 1 Guest(s)