SA-MP Forums Archive
Command NPC bots all at once? - 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: Command NPC bots all at once? (/showthread.php?tid=582707)



Command NPC bots all at once? - TheSkyBlueTeam - 22.07.2015

Hey, is there a way to use NPC bots at command? So if I type /NPC1 the bot starts going its path? Cause now it goes by itself, on a loop. I have both NPC in cars and on foot.

Thanks.


Re: Command NPC bots all at once? - xVIP3Rx - 22.07.2015

move the function in the loop to your command..


Re: Command NPC bots all at once? - TheSkyBlueTeam - 22.07.2015

Quote:
Originally Posted by xVIP3Rx
Посмотреть сообщение
move the function in the loop to your command..
Ok, so I did this:

if (strcmp("/bj1npc", cmdtext, true, 10) == 0)
{
print("my gamemode");
ConnectNPC("bj1","bj1");
return 1;
}

It worked, but now it loops over and over once the command is executed. how do I make so it only goes one time?

Thanks.


Re: Command NPC bots all at once? - xVIP3Rx - 22.07.2015

Stop the loop, which is "SetTimer" or "SetTimerEx"


Re: Command NPC bots all at once? - TheSkyBlueTeam - 22.07.2015

Quote:
Originally Posted by xVIP3Rx
Посмотреть сообщение
Stop the loop, which is "SetTimer" or "SetTimerEx"
I use the NPC's for base jumping. Gonna be hard to use Timer for that tbh.


Re: Command NPC bots all at once? - xVIP3Rx - 22.07.2015

I'm not telling you to add a timer, I'm asking you to delete it.


Re: Command NPC bots all at once? - TheSkyBlueTeam - 22.07.2015

Quote:
Originally Posted by xVIP3Rx
Посмотреть сообщение
I'm not telling you to add a timer, I'm asking you to delete it.
Sorry, i read that wrong haha. Thanks man.


Re: Command NPC bots all at once? - TheSkyBlueTeam - 22.07.2015

Quote:
Originally Posted by xVIP3Rx
Посмотреть сообщение
I'm not telling you to add a timer, I'm asking you to delete it.
Theres no Setimer linked to this NPC, not in NPCmodes either.


Re: Command NPC bots all at once? - xVIP3Rx - 22.07.2015

You said it loops and mentioned a loop so I guessed there is one, but if there's no loops what's the problem, what do you mean by

Quote:
Originally Posted by TheSkyBlueTeam
Посмотреть сообщение
It worked, but now it loops over and over once the command is executed. how do I make so it only goes one time?



Re: Command NPC bots all at once? - TheSkyBlueTeam - 22.07.2015

Quote:
Originally Posted by xVIP3Rx
Посмотреть сообщение
You said it loops and mentioned a loop so I guessed there is one, but if there's no loops what's the problem, what do you mean by
It loops as in, it performs, when its done, it does it again. I want it to perform once.