SA-MP Forums Archive
NPCs are 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: NPCs are not connecting. (/showthread.php?tid=99725)



NPCs are not connecting. - CJ101 - 29.09.2009

i have 3 npcs. I cant add the 'maxnpc 3' in the server.cfg because serverffs will delete that line.

If i check the logs, they are connecting, but wont get in the server:

Код:
[18:01:15] Incoming connection: 67.228.177.42:51624
[18:01:15] Incoming connection: 67.228.177.42:50138
[18:01:15] Incoming connection: 67.228.177.42:38461
i've checked the code, its all there. I'm connecting them all with ConnectNPC, and the all the npc files are there. Why are my npcs not connecting?


Re: NPCs are not connecting. - V1ceC1ty - 29.09.2009

let me ask, how did you get a 0.3 server with serverffs?


Re: NPCs are not connecting. - CJ101 - 30.09.2009

if you have a serverffs server already, ask them to turn it into a 0.3 server.


Re: NPCs are not connecting. - V1ceC1ty - 30.09.2009

well, make sure if they need to be in a vehicle you have made one for them to go in, the server hasnt got a register before spawn script.


Re: NPCs are not connecting. - CJ101 - 30.09.2009

im putting them in the cars.


Re: NPCs are not connecting. - V1ceC1ty - 30.09.2009

make sure the .rec files are in /npcmodes/recordings/

make sure all filterscripts are in the filterscript folder.

make sure all npcmodes are in the npcmodes folder.

make sure the recording file names have no spaces.


Re: NPCs are not connecting. - CJ101 - 30.09.2009

Quote:
Originally Posted by √№ceC№ty
make sure the .rec files are in /npcmodes/recordings/

make sure all filterscripts are in the filterscript folder.

make sure all npcmodes are in the npcmodes folder.

make sure the recording file names have no spaces.
All files are where they are supposed to be.


Re: NPCs are not connecting. - V1ceC1ty - 30.09.2009

mind if i see part of your script?


Re: NPCs are not connecting. - CJ101 - 30.09.2009

Код:
new heli,shamal;

OnGameModeInit:

heli = CreateVehicle(487,0,0,0,0,0,0,10000);
shamal = CreateVehicle(519,0,0,0,0,0,0,10000);

ConnectNPC("HeliTour","helitour");
ConnectNPC("PlaneTour","shamal");

OnPlayerSpawn:

if(IsPlayerNPC(playerid))
	  {
	  if(!strcmp(name, "HeliTour", true,8))
			{
			PutPlayerInVehicle(playerid,heli,0);
			}
  		if(!strcmp(name, "PlaneTour", true,9))
			{
			PutPlayerInVehicle(playerid,shamal,0);
			}
		}



Re: NPCs are not connecting. - V1ceC1ty - 30.09.2009

pawn Код:
public OnPlayerSpawn(playerid)
{
  if(!IsPlayerNPC(playerid)) return 0;

    new playername[64];
    GetPlayerName(playerid,playername,64);

    if(!strcmp(playername,"HeliTour",true)) {
    PutPlayerInVehicle(playerid,heli,0);
    }
    else if(!strcmp(playername,"PlaneTour",true)) {
      PutPlayerInVehicle(playerid,shamal,0);
    }
    return 1;
}
check other peoples scripts next time and see what your doing wrong, helped me alot when i 1st started pawn.