NPC Does Not Connect -
Robert_Crawford - 03.06.2011
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;
}
Respuesta: NPC Does Not Connect -
Lunnatiicz - 03.06.2011
What is the problem?
Код:
maxnpc 10
npcmode "mode"
Re: NPC Does Not Connect -
Robert_Crawford - 03.06.2011
The npc will not connect to the sever
Re: NPC Does Not Connect -
Donya - 03.06.2011
the npcmode file amx and recording file are both called "A51G1" ?
Re: NPC Does Not Connect -
Robert_Crawford - 03.06.2011
Yes it is
Respuesta: NPC Does Not Connect -
Lunnatiicz - 03.06.2011
Your npc use a vehicle?
Re: NPC Does Not Connect -
Robert_Crawford - 03.06.2011
No on foot. As it is defined
Respuesta: NPC Does Not Connect -
Lunnatiicz - 03.06.2011
u have in u server.cfg
npcmodes mode1
?
Re: NPC Does Not Connect -
Robert_Crawford - 03.06.2011
I just added it, still does not work.
Respuesta: NPC Does Not Connect -
Lunnatiicz - 03.06.2011
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
Re: NPC Does Not Connect -
Robert_Crawford - 03.06.2011
Still nothing :/
1 Error.
[/code]
Re: NPC Does Not Connect -
WARRI0R - 06.07.2011
I have the same problem like him.