NPC wont connect
#1

Why dont my npc connect to the server?

OnGameModeInit
pawn Код:
print("NPC/John_Wikings has connected");
    ConnectNPC("Train","John_Wikings");
OnPlayerSpawn
pawn Код:
if(IsPlayerNPC(playerid))
    {
        new string[32];
        GetPlayerName(playerid, string, 32);
        if(!strcmp(string, "John_Wikings"))
        {
            SetPlayerSkin(playerid, 264);
            PutPlayerInVehicle(playerid, Train, 0);
            print("NPC/John_Wikings has spawned");
        }
        return 1;
    }
Reply
#2

Quote:

OnPlayerConnect
print("NPC/John_Wikings has connected");
ConnectNPC("Train","John_Wikings");

So everytime a player connects, the NPC also has to connect?
I think you wanna add this code to OnGamemodeInit
Reply
#3

I also have it on OnGameModeInit too
just added it to OnPlayerSpawn to see if it worked
Reply
#4

What is Max NPC in your server configuration?
Reply
#5

Quote:
Originally Posted by JustMe.77
Посмотреть сообщение
What is Max NPC in your server configuration?
maxnpc 3
Reply


Forum Jump:


Users browsing this thread: