SA-MP Forums Archive
Question about npc - 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: Question about npc (/showthread.php?tid=279410)



Question about npc - JS_Joker - 27.08.2011

Hi all.
After many attempts,the NPC works for me .Now, I want to know if there is any way for the "NPC" enter the server at different times, I mean, one enter after 30 seconds, another income at 45 and another at 60 because they all come at once and collide their cars...and another thing if you can help me, if there is any way to stop the recording in an estimated time,like exact 2 minutes or just cut the recording time at the moment you wanted

I want two "npc car" begin and end at the same time. I have tried to start and finish the two "npc" at the same time with a stopwatch, but always keeps tenths more or less and eventually causes them collide.

please tell me if is there any way to fix it?

Pls help me!


Re: Question about npc - Kitten - 27.08.2011

not sure but this might work (not a NPC geek )

pawn Код:
forward StartMyNpc();
public OnGameModeInit() {
     SetTimer("StartMyNpc",30000,false); // 30 seconds starts the callback
     return 1;
}
public StartMyNpc() {
    ConnectNPC("MyName","myscript");
    return 1;
}