set a bot his playerid? is this possible? and if yes, how?
#1

hey guys,

well the title tells you, is it possible to set a bot his playerid? cuz i want it that the normal players are from 0 to -- and the bots are from like id 40 to --

-- means amount of players/bots

anyone knwos if this is possible and IF yes then how?

greets niels
Reply
#2

Yes you can but just like this,to connect some npc-s and then kick them.
Код:
for(new i; i < 40; i++)
{
   new string[16];
   format(string,sizeof(string),"Bot%d",i);
   ConnectNPC(string,"npcidle");
}
ConnectNPC("NPC","NPC");//your npc here
for(new i; i < 40; i++)
{
   Kick(i);
}
Reply
#3

hmm so basically this connects the npc, then disconnects, then connects again and it keeps going like this untill there joins a player?
Reply
#4

No,connects 40 npcs,then connect your npcs and then kick the first 40 npc..
And yours will stay from id 40
Reply
#5

hey yeah now i see thnx XDDD this is EPICCC XDD

EDIT: wtf now it says this:
Код:
[21:13:02]   Loading filterscript 'CarCMD.amx'...
[21:13:02] 
--------------------------------------
[21:13:02]  Blank Filterscript by your name here
[21:13:02] --------------------------------------

[21:13:02]   Loading filterscript 'Admin-VIP.amx'...
[21:13:02]   Loaded 11 filterscripts.

[21:13:02] OnGameo
[21:13:02] Incoming connection: 127.0.0.1:50499
[21:13:02] Incoming connection: 127.0.0.1:50500
[21:13:02] Incoming connection: 127.0.0.1:50502
[21:13:02] Incoming connection: 127.0.0.1:50501
[21:13:02] Incoming connection: 127.0.0.1:50504
[21:13:02] Incoming connection: 127.0.0.1:50503
[21:13:02] Incoming connection: 127.0.0.1:50507
[21:13:02] Incoming connection: 127.0.0.1:50505
[21:13:02] Incoming connection: 127.0.0.1:50506
[21:13:02] Incoming connection: 127.0.0.1:50508
[21:13:02] Incoming connection: 127.0.0.1:50510
[21:13:02] Incoming connection: 127.0.0.1:50509
[21:13:02] Incoming connection: 127.0.0.1:50511
[21:13:02] Incoming connection: 127.0.0.1:50512
[21:13:02] Incoming connection: 127.0.0.1:50513
[21:13:02] Incoming connection: 127.0.0.1:50514
[21:13:02] Incoming connection: 127.0.0.1:50515
[21:13:02] Incoming connection: 127.0.0.1:50516
[21:13:02] Incoming connection: 127.0.0.1:50518
[21:13:02] Incoming connection: 127.0.0.1:50517
[21:13:03] Incoming connection: 127.0.0.1:50519
[21:13:03] Incoming connection: 127.0.0.1:50521
[21:13:03] Incoming connection: 127.0.0.1:50520
[21:13:03] Incoming connection: 127.0.0.1:50522
[21:13:03] Incoming connection: 127.0.0.1:50523
[21:13:03] Incoming connection: 127.0.0.1:50524
[21:13:03] OnGameo
[21:13:03] 
----------------------------------
[21:13:03] TokyoDrift by Niels44
[21:13:03] -------------LOADED!--------------

[21:13:03] Number of vehicle models: 44
[21:13:03] NPC Connect: Bad player ID (127.0.0.1)
[21:13:03] NPC Connect: Bad player ID (127.0.0.1)
[21:13:03] NPC Connect: Bad player ID (127.0.0.1)
[21:13:03] NPC Connect: Bad player ID (127.0.0.1)
[21:13:03] NPC Connect: Bad player ID (127.0.0.1)
[21:13:03] NPC Connect: Bad player ID (127.0.0.1)
[21:13:03] NPC Connect: Bad player ID (127.0.0.1)
[21:13:03] NPC Connect: Bad player ID (127.0.0.1)
[21:13:03] NPC Connect: Bad player ID (127.0.0.1)
[21:13:03] NPC Connect: Bad player ID (127.0.0.1)
[21:13:03] NPC Connect: Bad player ID (127.0.0.1)
[21:13:03] NPC Connect: Bad player ID (127.0.0.1)
[21:13:03] NPC Connect: Bad player ID (127.0.0.1)
[21:13:03] NPC Connect: Bad player ID (127.0.0.1)
[21:13:03] NPC Connect: Bad player ID (127.0.0.1)
[21:13:03] NPC Connect: Bad player ID (127.0.0.1)
[21:13:03] NPC Connect: Bad player ID (127.0.0.1)
[21:13:03] NPC Connect: Bad player ID (127.0.0.1)
[21:13:03] NPC Connect: Bad player ID (127.0.0.1)
[21:13:03] NPC Connect: Bad player ID (127.0.0.1)
[21:13:03] NPC Connect: Bad player ID (127.0.0.1)
[21:13:03] NPC Connect: Bad player ID (127.0.0.1)
[21:13:03] NPC Connect: Bad player ID (127.0.0.1)
[21:13:03] NPC Connect: Bad player ID (127.0.0.1)
[21:13:03] NPC Connect: Bad player ID (127.0.0.1)
[21:13:03] NPC Connect: Bad player ID (127.0.0.1)
[21:13:03] Incoming connection: 127.0.0.1:50531
[21:13:03] Incoming connection: 127.0.0.1:50529
[21:13:03] Incoming connection: 127.0.0.1:50532
[21:13:03] Incoming connection: 127.0.0.1:50525
[21:13:03] Incoming connection: 127.0.0.1:50528
[21:13:03] Incoming connection: 127.0.0.1:50533
[21:13:03] Incoming connection: 127.0.0.1:50534
[21:13:03] Incoming connection: 127.0.0.1:50527
[21:13:03] Incoming connection: 127.0.0.1:50530
[21:13:03] Incoming connection: 127.0.0.1:50526
[21:13:03] Incoming connection: 127.0.0.1:50536
[21:13:03] Incoming connection: 127.0.0.1:50535
[21:13:03] Incoming connection: 127.0.0.1:50537
[21:13:04] [npc:join] Bot38 has joined the server (0:127.0.0.1)
[21:13:04] [npc:join] Bot37 has joined the server (1:127.0.0.1)
[21:13:04] [npc:join] Bot33 has joined the server (2:127.0.0.1)
[21:13:04] [npc:join] Bot36 has joined the server (3:127.0.0.1)
[21:13:04] [npc:join] Drift_NPC has joined the server (4:127.0.0.1)
[21:13:04] [npc:join] Wheelie_NPC has joined the server (5:127.0.0.1)
[21:13:04] [npc:join] Bot39 has joined the server (6:127.0.0.1)
[21:13:04] [npc:join] Bot35 has joined the server (7:127.0.0.1)
[21:13:04] [npc:join] Jump_NPC has joined the server (8:127.0.0.1)
[21:13:04] [npc:join] Bot34 has joined the server (9:127.0.0.1)
[21:13:04] Incoming connection: 127.0.0.1:50538
[21:13:04] Incoming connection: 127.0.0.1:50542
[21:13:04] Incoming connection: 127.0.0.1:50539
[21:13:04] Incoming connection: 127.0.0.1:50543
[21:13:04] Incoming connection: 127.0.0.1:50544
[21:13:04] Incoming connection: 127.0.0.1:50541
[21:13:04] Incoming connection: 127.0.0.1:50547
[21:13:04] Incoming connection: 127.0.0.1:50546
[21:13:04] Incoming connection: 127.0.0.1:50540
[21:13:04] Incoming connection: 127.0.0.1:50545
[21:13:04] Incoming connection: 127.0.0.1:50548
[21:13:04] Incoming connection: 127.0.0.1:50549
[21:13:04] Incoming connection: 127.0.0.1:50550
[21:13:04] [npc:join] Bot22 has joined the server (10:127.0.0.1)
[21:13:04] [npc:join] Bot21 has joined the server (11:127.0.0.1)
Reply
#6

Put it like this,exactly how i commented..
Код:
public OnGameModeInit()
{
for(new i; i < 40; i++)
{
   new string[16];
   format(string,sizeof(string),"Bot%d",i);
   ConnectNPC(string,"npcidle");
}
ConnectNPC("NPC","NPC");//Here to be your NPC to be able to connect from id 40

for(new i; i < 40; i++)//and now kick the first 40
{
   Kick(i);
}
}
Reply
#7

pawn Код:
public OnGameModeInit()
{
    new b;
    while(b < 40)
    {
       new str[16];
       format(str, sizeof(str), "ID_%d", b);
       ConnectNPC(str, "npcidle");
       b ++;
    }
    ConnectNPC("NPC","NPC");
    while(b < 40)
    {
        if(IsPlayerNPC(b)) Kick(b);
        b ++;
    }
        return 1;
}
#EDIT 600 Post u.u
Reply
#8

i did it your way tsaks, but maybe its not working cuz i have 12 npcs?
Reply
#9

How many slots do you have?
Reply
#10

Player slots is 62 and maxnpc is 12, but i already set that to like 50 but still that error in console
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)