NPC Help!!
#1

Bot isnt connecting just says incomming connection, and no i dont have my server passworded.. other ppl can connect just fine..

Also my samp-npc.exe doesnt work. Opens then closes instantly without any words..
Reply
#2

Wrong section. Go to 0.3 Scripting Discussion

But anyway, make sure in server.cfg your max NPC isn't 0, you have a script that loads the script in npcmodes which loads the .rec file in recordings.

samp-npc.exe is meant to do that...
Reply
#3

i know the script loads the other script then loads the rec.. but how come it just says incomming connection but nothing else.
Reply
#4

Have you also done:
Quote:

make sure in server.cfg your max NPC isn't 0

Reply
#5

yep made it 10

echo Executing Server Config...
lanmode 0
rcon_password penis
maxplayers 95
port 7777
hostname LSW
gamemode0 lsw 1
filterscripts base gl_actions GSH gl_property ladmin4v2 w-changer
announce 0
query 1
weburl www.sa-mp.com
maxnpc 10
onfoot_rate 50
incar_rate 40
weapon_rate 40
stream_distance 400.0
stream_rate 500

Doing anything wrong? im trying to make a server and putt bots in but.. yeah
Reply
#6

Ok. Just to make this a bit easier, are you loading a pre-made npcmode, or one you made?
Since if you made it, you have to make sure that when you load the recording, you say whether it is an on-foot script or driving one e.g.
pawn Код:
StartRecordingPlayback(PLAYER_RECORDING_TYPE_DRIVER,"at400_sf_to_ls_x1");
And, if they are meant to drive a vehicle, make sure in the script (filterscript/gamemode), you put the NPC into the right vehicle with
pawn Код:
PutPlayerInVehicle(playerid,VehicleID,Seat);
The Seat for driver is 0.
Reply
#7

There all onfoot, and its pre-maid
Reply
#8

here's the FS that loads them..

Код:
#include <a_samp>

new Random;

public OnGameModeInit()
{

	// NPCS
	ConnectNPC("Grove1","grove1");
	ConnectNPC("Grove2","grove2");
	ConnectNPC("Grove3","grove3");
	ConnectNPC("Grove4","grove4");
	ConnectNPC("Grove5","grove5");
	
	Random =	AddStaticVehicle(420,2044.8854,1473.2106,10.4494,181.3339,6,1); // Makes sure the NPC Spawns

	return 1;
}

public OnPlayerSpawn(playerid)
{
  if(!IsPlayerNPC(playerid)) return 0;

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

 	if(!strcmp(playername,"Grove1",true)) {
 		PutPlayerInVehicle(playerid, Random, 0);
 	  SetSpawnInfo( playerid, 0, 106, 1958.33, 1343.12, 15.36, 269.15, 31, 1000, 0, 0, 0, 0 );
    SetPlayerColor(playerid,0x33AA33AA);
	}
	else if(!strcmp(playername,"Grove2",true)) {
    PutPlayerInVehicle(playerid, Random, 0);
	  SetSpawnInfo( playerid, 0, 105, 1958.33, 1343.12, 15.36, 269.15, 31, 1000, 0, 0, 0, 0 );
	  SetPlayerColor(playerid,0x33AA33AA);
	}
	else if(!strcmp(playername,"Grove3",true)) {
	  PutPlayerInVehicle(playerid, Random, 0);
	  SetSpawnInfo( playerid, 0, 107, 1958.33, 1343.12, 15.36, 269.15, 31, 1000, 0, 0, 0, 0 );
    SetPlayerColor(playerid,0x33AA33AA);
	}
	else if(!strcmp(playername,"Grove4",true)) {
	  PutPlayerInVehicle(playerid, Random, 0);
	  SetSpawnInfo( playerid, 0, 105, 1958.33, 1343.12, 15.36, 269.15, 31, 1000, 0, 0, 0, 0 );
	  SetPlayerColor(playerid,0x33AA33AA);
	}
	else if(!strcmp(playername,"Grove5",true)) {
	  PutPlayerInVehicle(playerid, Random, 0);
	  SetSpawnInfo( playerid, 0, 106, 1958.33, 1343.12, 15.36, 269.15, 31, 1000, 0, 0, 0, 0 );
		SetPlayerColor(playerid,0x33AA33AA);
	}

  return 1;
}
Reply
#9

help?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)