FCNPC drive through ground - 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)
+--- Thread: FCNPC drive through ground (
/showthread.php?tid=579095)
FCNPC drive through ground -
Carper - 24.06.2015
Hello guys!
I have one problem with FCNPC: I drive through the ground.
OnGameModeInit:
Code:
MapAndreas_Init(MAP_ANDREAS_MODE_FULL);
if(FCNPC_InitZMap("scriptfiles/SAfull.hmap"))
{
printf("ZMap Init!");
} else {
printf("ZMap Init failed!");
}
(I get ZMap Init!)
Then I create and spawn the npc:
Code:
npccar = AddStaticVehicle(560,460.4980,-1734.5624,9.5587,358.6630,1,1);
NPC[0] = FCNPC_Create("Taxi_1");
FCNPC_Spawn(NPC[0],15,460.4980,-1734.5624,9.5587);
FCNPC_PutInVehicle(NPC[0], npccar, 0);
My test command to drive:
Code:
ocmd:test(playerid,params[])
{
FCNPC_GoTo(NPC[0],1479.1648,-1735.6666,13.0888,MOVE_TYPE_DRIVE,5,true);
return 1;
}
What is wrong?