Can somebody make me the command of FCNPC to spawn and create the FCNPC, to see him, for me dont work. Thanks
Dont work...
I tried this but dont work...
BUMP! I can't spawn FCNPCs either... I have this on my OnFilterscriptInit
pawn Code:
Bot[A69_1] = FCNPC_Create("FCNPC_Test_Bot");
new I[6];
I[0] = FCNPC_Spawn(Bot[A69_1], 180, 0, 0, 4);
I[1] = FCNPC_SetHealth(Bot[A69_1], 100.0);
I[2] = FCNPC_SetArmour(Bot[A69_1], 100.0);
I[3] = FCNPC_SetWeapon(Bot[A69_1], WEAPON_MP5);
I[4] = FCNPC_SetAmmo(Bot[A69_1], 999999);
I[5] = FCNPC_AimAt(Bot[A69_1], 0.0, 10.0, 4.0, 1);
printf("%d%d%d%d%d%d",
I[0],
I[1],
I[2],
I[3],
I[4],
I[5]);
pawn Code:
CreateZombies() {
FCNPC_SetUpdateRate( 80 );
for( new i = 0; i < MAX_NODES; i++ )
{
if( !FCNPC_IsNodeOpen( i ) && !FCNPC_OpenNode( i ) )
{
printf( "Gamemode: Failed to open node %d from (scriptfiles/FCNPC/Nodes/NODES%d.DAT)", i, i );
return 0;
}
}
for( new i = 0; i < MAX_ZOMBIES; i++ )
{
new
name[ 24 ];
format( name, 24, "ZOMBIE%d", i );
new npcid = FCNPC_Create( name );
FCNPC_Spawn( npcid, Skins[ random( 7 ) ], 0, 0, 0 );
FCNPC_SetWeapon( npcid, 4 );
FCNPC_SetHealth( npcid, 95 );
if( IsPlayerNPC( i ) )
{
SetPlayerAttachedObject( i, 1, 2908, 2, 0.064999,0.045000,0.000999, 176.500000, 5.699998, 95.000007, 0.941999, 1.082999, 1.075000 );
SetPlayerAttachedObject( i, 2, 2907, 1, 0.038000,0.051000,0.027000,-94.999984, -0.299995, 89.399932, 1.0, 0.739000, 1.211000 );
SetPlayerAttachedObject( i, 3, 2906, 5, -0.146000,0.000000,-0.007000,10.299988,1.500002, -89.800010, 1.0, 1.0, 1.0 );
SetPlayerAttachedObject( i, 4, 2905, 10, -0.176999,0.082000,0.005000, 0.000000, 0.000000, -92.700004,1.067999, 0.662999, 0.998000 );
SetPlayerAttachedObject( i, 5, 2804, 8, 0.240999,0.034000,0.000000, 0.000000, 0.000000,91.499977, 0.757999, 1.000000, 1.214999 );
SetPlayerAttachedObject( i, 5, 2803, 1,0.132999,-0.161000,0.000000, 0.000000,91.599998,102.699989, 0.259000,0.369999, 0.719000 );
}
new node = random( MAX_NODES );
new vehnodes,
pednodes,
navinodes;
FCNPC_GetNodeInfo( node, vehnodes, pednodes, navinodes );
new
point;
if( random( 2 ) == 1 && pednodes != 0 )
point = random( pednodes ) + pednodes;
else
point = random( pednodes );
FCNPC_SetNodePoint( node, point );
if( point < vehnodes )
{
new Float:x,
Float:y,
Float:z;
FCNPC_GetNodePointPosition( node, x, y, z );
FCNPC_SetPosition( npcid, x, y, z+1 );
}
FCNPC_PlayNode( npcid, node, point < pednodes ? NODE_TYPE_PED : NODE_TYPE_PED );
SetPlayerColor( npcid, 0xAA333300 );
FCNPC_SetPosition( npcid, 2232.1501,-1734.9570,13.3828 ); // CHANGE THE COORDINATES
}
return true;
}