Need help with my NPC`s (gamemode problem)
#1

Hi all. I have downloaded a SARP gamemode from here and now it`s our main gamemode. We want to put some NPC`s on our server but with this GM they doesn`t work. They run perfectly on the lvdm - from 0.3c server package (our bots is a filterscript). I had stopped bots kicking by adding
PHP код:
if(IsPlayerNPC(playerid)) return 1
in the reg system of this GM, but the bots now just don`t enter to their vehicles. I can`t find what is the problem, but it`s in GM. Please help.

An actual version of the GM... Some editions done.

P.S. Sorry for my bad english if so
Reply
#2

i think its bug and sarp gm is big u known so try other
Reply
#3

try to put
pawn Код:
if(IsPlayerNPC(playerid))
{
PutPlayerInVehicle(playerid,vehicleid);
return 1;
}
playerid = your NPC
vehicleid = you need to create that example:
pawn Код:
new npcvehicle;
OnGameModeInit()
pawn Код:
npcvehicle = CreateVehicle(411,0,0,0,1,1,1,1);
try it..
Reply
#4

no i think its include problem plz check ur include is updated?
Reply
#5

This is my FS for bots:
Код:
new MyFirstNPCVehicle;
new GrooveBus;
new AllSATram;
new HyundaiCounty;
new MidnightTrain;

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
	ConnectNPC("Defrago_Driver1","defnpc1");
	ConnectNPC("Defrago_Driver2","defnpc2");
	ConnectNPC("Defrago_Driver3","defnpc3");
	ConnectNPC("Defrago_Driver4","defnpc4");
	ConnectNPC("Defrago_Driver5","defnpc5");
	
	MyFirstNPCVehicle = AddStaticVehicle( 437, 0.0, 0.0, 5.0, 0.0, -1, -1);
	GrooveBus = AddStaticVehicle( 437, 0.0, 0.0, 5.0, 0.0, -1, -1);
	AllSATram = AddStaticVehicle( 449, 0.0, 0.0, 5.0, 0.0, 144, 161);
	HyundaiCounty = AddStaticVehicle( 418, 0.0, 0.0, 5.0, 0.0, 6, 6);
	MidnightTrain = AddStaticVehicle( 538, 0.0, 0.0, 5.0, 0.0, 144, 161);
	return 1;
}
Код:
public OnPlayerSpawn(playerid)
{
	if(IsPlayerNPC(playerid)) //Checks if the player that just spawned is an NPC.
		{
			new npcname[MAX_PLAYER_NAME];
			GetPlayerName(playerid, npcname, sizeof(npcname));
			if(!strcmp(npcname, "Defrago_Driver1", true)) //проверяем имя MyFirstNPC
			{
				PutPlayerInVehicle(playerid, MyFirstNPCVehicle, 0); // Сажаем NPC В созданую для него машину
				return 1;
			}
			if(!strcmp(npcname, "Defrago_Driver2", true))
			{
				PutPlayerInVehicle(playerid, GrooveBus, 0); // Сажаем NPC В созданую для него машину
				return 1;
			}
			if(!strcmp(npcname, "Defrago_Driver3", true))
			{
				PutPlayerInVehicle(playerid, AllSATram, 0); // Сажаем NPC В созданую для него машину
				return 1;
			}
			if(!strcmp(npcname, "Defrago_Driver4", true))
			{
				PutPlayerInVehicle(playerid, HyundaiCounty, 0); // Сажаем NPC В созданую для него машину
				return 1;
			}
			if(!strcmp(npcname, "Defrago_Driver5", true))
			{
			    PutPlayerInVehicle(playerid, MidnightTrain, 0);
			    return 1;
			}
			return 1;
		}
	return 1;
}
(All other is default)

I`m part of the team so I can`t change GM (bots are important but not critical).

Код:
if(IsPlayerNPC(playerid)){PutPlayerInVehicle(playerid,vehicleid);return 1;}
- put it WHERE?
Reply
#6

Still need help (bump)
Reply
#7

Any ideas? (I will NOT pay for this!)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)