SA-MP Forums Archive
NPC not connecting - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: NPC not connecting (/showthread.php?tid=139093)



NPC not connecting - acade - 03.04.2010

Hey

My NPC isn't connecting to my server. And no, there is no password.

Thanks



Re: NPC not connecting - WardenCS - 03.04.2010

does it have some login system ?


Re: NPC not connecting - acade - 03.04.2010

Nope, LVDM doesnt


Re: NPC not connecting - acade - 04.04.2010

anyone?


Re: NPC not connecting - Beaver07 - 04.04.2010

check in your server.cfg that you have the line

maxnpc

and just put it to how many bots you have ie

maxnpc 10


Re: NPC not connecting - acade - 05.04.2010

Checked that, i put it from 1 to 10. still not working


Re: NPC not connecting - Aygem - 05.04.2010

I have the same problem

http://forum.sa-mp.com/index.php?topic=162766.0


Re: NPC not connecting - acade - 05.04.2010

Re coded it with the help of gl_npcs

http://theonethatownz.pastebin.com/emqYy5EQ

Still not connecting.


Re: NPC not connecting - acade - 06.04.2010

anyone?


Re: NPC not connecting - Dreftas - 06.04.2010

Linux? Windows?


Re: NPC not connecting - nateskywalker - 06.04.2010

oke first sorry bad english
Add your npcs in your gamemode not fs i have the same problem i have fixed with it

//place this ont te beginnig of your script
new Bot1Vehicle;
new Bot2Vehicle;
new Bot3Vehicle;

//under gamemode init
ConnectNPC("TrainLV","train_lv");
ConnectNPC("TrainSF","train_sf");
ConnectNPC("TrainLS","train_ls");

Bot1Vehicle = CreateVehicle(449, 0.0, 0.0, 5.0, 0.0, 3, 3, 5000);
Bot2Vehicle = CreateVehicle(449, 0.0, 0.0, 5.0, 0.0, 3, 3, 5000);
Bot3Vehicle = CreateVehicle(449, 0.0, 0.0, 5.0, 0.0, 3, 3, 5000);

//under on player spawn

if(IsPlayerNPC(playerid))
{
new npcname[MAX_PLAYER_NAME];
GetPlayerName(playerid, npcname, sizeof(npcname));

if(!strcmp(npcname, "TrainLV", true))return PutPlayerInVehicle(playerid, Bot1Vehicle, 0);

if(!strcmp(npcname, "TrainSF", true))return PutPlayerInVehicle(playerid, Bot2Vehicle, 0);

if(!strcmp(npcname, "TrainLS", true))return PutPlayerInVehicle(playerid, Bot3Vehicle, 0);
}

//now it works i mean else sorry
grezz nate


Bonus-----------------------------------------------------------------------------

//place this ont te beginnig of your script
forward NpcBubble();

//under gamemode init
SetTimer("NpcBubble", 5000, 1);

//end of script
public NpcBubble()
{
for(new playerid=0; playerid<MAX_PLAYERS; playerid++)
{
if(IsPlayerNPC(playerid))
{
new bubbles[25];
format(bubbles,sizeof(bubbles),"[BOT]Driver");
SetPlayerChatBubble(playerid,bubbles,0x33CCFFAA,50 0,7000);
SetPlayerColor(playerid,0x33CCFFAA);
}
}
}