30.06.2017, 15:55
Quote:
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.
|
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; }
at KillTimer(ZombieTimer);
Edit:
Timer: SetTimer("ZombieTimer", 500, true);