Help: NPC Driver dont move.
#1

hello friends, I have a problem when I try to move the Npc driver of a car does not move with FCNPC_GOTO, what is the function FCNPC to move the car?

PHP код:
FCNPC_EnterVehicle(bot55460, -1);
FCNPC_GoTo(bot5,-2420.2437,-65.4272,35.14620FCNPC_MOVE_TYPE_AUTOtrue0.0true0.0250); 
Reply
#2

FCNPC_GoTo works for drivers too.

Problem might be that you didn't set up MapAndreas correctly.

Download MapAndreas and install it.

Then put this into OnFilterScriptInit or OnGameModeInit:

Код:
MapAndreas_Init(MAP_ANDREAS_MODE_FULL);
FCNPC_InitMapAndreas(MapAndreas_GetAddress());
Otherwise FCNPC cannot get any map height data.
Reply
#3

Quote:
Originally Posted by NaS
Посмотреть сообщение
FCNPC_GoTo works for drivers too.

Problem might be that you didn't set up MapAndreas correctly.

Download MapAndreas and install it.

Then put this into OnFilterScriptInit or OnGameModeInit:

Код:
MapAndreas_Init(MAP_ANDREAS_MODE_FULL);
FCNPC_InitMapAndreas(MapAndreas_GetAddress());
Otherwise FCNPC cannot get any map height data.
Thx very much NAS, but car still dont move. (i copy ur code in gamemode)

this is code right?

PHP код:
FCNPC_GoTo(bot5,-2420.2437,-65.4272,35.1462, -1, -1true0.0true0.0250); 
Reply
#4

Quote:
Originally Posted by bookknp
Посмотреть сообщение
Thx very much NAS, but car still dont move. (i copy ur code in gamemode)

this is code right?

PHP код:
FCNPC_GoTo(bot5,-2420.2437,-65.4272,35.1462, -1, -1true0.0true0.0250); 
Do you have SAfull.hmap in your scriptfiles folder? Also does it say something in the server log about MapAndreas?

One thing I just noticed is that you might have to wait a bit with FCNPC_GoTo after putting the NPC into a vehicle.

You can use this callback to know when the FCNPC finished entering. After FCNPC_EnterVehicle this will be called:

Код:
public FCNPC_OnVehicleEntryComplete(npcid, vehicleid, seat)
{
}
Check if npcid is bot5 in this callback and then use FCNPC_GoTo.

Your GoTo code seems correct, don't see anything wrong with it.
Reply
#5

Quote:
Originally Posted by NaS
Посмотреть сообщение
Do you have SAfull.hmap in your scriptfiles folder? Also does it say something in the server log about MapAndreas?

One thing I just noticed is that you might have to wait a bit with FCNPC_GoTo after putting the NPC into a vehicle.

You can use this callback to know when the FCNPC finished entering. After FCNPC_EnterVehicle this will be called:

Код:
public FCNPC_OnVehicleEntryComplete(npcid, vehicleid, seat)
{
}
Check if npcid is bot5 in this callback and then use FCNPC_GoTo.

Your GoTo code seems correct, don't see anything wrong with it.
Thx very much NAS, solve it
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)