Random
#1

Hi all, how to make random npc bots connects, when the server is starts?
Reply
#2

Just look at the forum for NPC bots , there are good filterscripts for it!
Reply
#3

Also take a look here.
https://sampwiki.blast.hk/wiki/Category:NPC

You may find these useful:
https://sampforum.blast.hk/showthread.php?tid=299207
https://sampforum.blast.hk/showthread.php?tid=95034
https://sampforum.blast.hk/showthread.php?tid=278902
Reply
#4

Okay Thanks. I create npc bots, how to make they random connects?(Not All, only one)
Reply
#5

You need to configure that i think
Reply
#6

Quote:
Originally Posted by Randyy
Посмотреть сообщение
You need to configure that i think
How
Reply
#7

Help..
Reply
#8

Up..
Reply
#9

Try something like
Edited
Код:
new RandNpc[][] = {
    {"NpcName1","npcname1"},
    {"NpcName2","npcname2"}
};
Код:
new rand = random(sizeof(RandNpc));
    ConnectNPC(RandNpc[rand]);
Not tested
Reply
#10

Quote:
Originally Posted by TzAkS.
Посмотреть сообщение
Try something like
Edited
Код:
new RandNpc[][] = {
    {"NpcName1","npcname1"},
    {"NpcName2","npcname2"}
};
Код:
new rand = random(sizeof(RandNpc));
    ConnectNPC(RandNpc[rand]);
Not tested
Thanks, but I got error's:

Код:
error 017: undefined symbol "RandNpc"
error 029: invalid expression, assumed zero
warning 215: expression has no effect
Line:
Код:
new rand = random(sizeof(RandNpc));
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)