#1

I already posted this in 'Scripting Help' but someone said it doesnt have anything to do with scripting

My NPC Train works fine at my test server.
But when I try to connect it to my server on host, the train also spawns, but the BOT wont connect?

Test server


Server on host
Reply
#2

This is a pretty old topic, but yeah, I do still have the same problem, could anyone help me..?
Reply
#3

..Anyone?
Reply
#4

Open server.cfg and be sure to change "0" to "1" ( This allows 1 NPC to connect to your server, just change the number to how many bots you want.

Do you have
Код:
{
    ConnectNPC("[BOT]Train", "train");
    return 1;
}
in your gamemode?
Reply
#5

maybe u made some thing wrong?
Reply
#6

Quote:
Originally Posted by Dopefull
Посмотреть сообщение
Open server.cfg and be sure to change "0" to "1" ( This allows 1 NPC to connect to your server, just change the number to how many bots you want.

Do you have
Код:
{
    ConnectNPC("[BOT]Train", "train");
    return 1;
}
in your gamemode?
No I don't, where should I put that?
Reply
#7

Код:
public OnGameModeInit()
{
    ConnectNPC("[BOT]Train", "train");
    return 1;
}
REMEMBER! Change the names of the bots to the ones you have! Else it won't work, the names I wrote is just an example.
Reply
#8

You must use ConnectNPC to be able to see your NPC in game.
After looking at the SA-MP Wiki, you can see the following format:
pawn Код:
ConnectNPC(name[], script[])
Now to know what to put on name[] and script[], here's an explanation of each: (SA-MP Wiki's)
Код:
name[]	The name the NPC should connect as. Must follow the same rules as normal player names.
script[]	The NPC script name that is located in the npcmodes folder (without the .amx extension).
So just give your NPC a name on the first parameter, and the script name from npcmodes folder for the second one.

Note: Make sure you place the ConnectNPC under OnGameModeInIt else it will NOT work.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)