NPC Does Not Connect
#1

I have my server.cfg set at maxnpc 100

pawn Код:
#define RECORDING "A51G1" //This is the filename of your recording without the extension.
#define RECORDING_TYPE 2 //1 for in vehicle and 2 for on foot.

#include <a_npc>
main(){}
public OnRecordingPlaybackEnd() StartRecordingPlayback(RECORDING_TYPE, RECORDING);

#if RECORDING_TYPE == 1
  public OnNPCEnterVehicle(vehicleid, seatid) StartRecordingPlayback(RECORDING_TYPE, RECORDING);
  public OnNPCExitVehicle() StopRecordingPlayback();
#else
  public OnNPCSpawn() StartRecordingPlayback(RECORDING_TYPE, RECORDING);
#endif
pawn Код:
public OnGameModeInit()
{
    AddSAM(237.5797,1698.6908,23.8673,0.0,0.0,0.0,false);//Area 69
    AddSAM(15.3281,1720.9646,23.8673,0.0,0.0,0.0,false);//Area 69
    AddSAM(188.2694,2083.4644,23.9063,0.0,0.0,0.0,false);//Area 69
    AddSAM(354.5453,2030.3062,23.8750,0.0,0.0,0.0,false);//Area 69
    AddSAM(-1394.9823,494.2042,21.6810,0.0,0.0,0.0,false);//SF Carrier Ship
    AddSAM(-1324.4484,494.2169,24.6888,0.0,0.0,0.0,false);//SF Carrier Ship
    AddSAM(-56.81465912,-1774.74145508,1.37039232,0.0,0.0,0.0,false);//SF Carrier Ship
    SAM_OnGameModeInit();
//------------------------------------------------------------------------------
//NPC
    ConnectNPC("A51G1","Military_Police_Guard1");
//------------------------------------------------------------------------------
    print("Stage 1 - Done !");
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    if(IsPlayerNPC(playerid))
    {
        printf("NPC: OnPlayerRequestClass: %d", playerid);
        return 1;
    }
Reply
#2

What is the problem?

Код:
maxnpc 10
npcmode "mode"
Reply
#3

The npc will not connect to the sever
Reply
#4

the npcmode file amx and recording file are both called "A51G1" ?
Reply
#5

Yes it is
Reply
#6

Your npc use a vehicle?
Reply
#7

No on foot. As it is defined
Reply
#8

u have in u server.cfg

npcmodes mode1

?
Reply
#9

I just added it, still does not work.
Reply
#10

pawn Код:
public OnGameModeInit()
{
  ConnectNPC("A51G1","Military_Police_Guard1"); //(NameOfTheBot,script)
  return 1;
}

public OnPlayerSpawn(playerid)
{
  if(IsPlayerNPC(playerid))
        {
        new npcname[MAX_PLAYER_NAME];
        GetPlayerName(playerid, npcname, sizeof(npcname));
        if(!strcmp(npcname,"A51G1",true))
        printf("Bot is Connected", playerid)
        }
return 1;
}
In u server.cfg

Код:
maxnpc 10
npcmode Military_Police_Guard1
check in the folder of npcmodes ur mode

Server > npcmodes > Mode.pwn / Mode.amx
npcmodes > recordings > Mode.rec
Reply
#11

Still nothing :/

1 Error.
[/code]
Reply
#12

I have the same problem like him.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)