open.mp forum
[Pawn] [Help] How make the NPC move bye CMD And also can point to other near players ? - Printable Version

+ open.mp forum (https://forum.open.mp)
-- Forum: SA-MP (https://forum.open.mp/forumdisplay.php?fid=3)
--- Forum: Pawn Scripting (https://forum.open.mp/forumdisplay.php?fid=10)
--- Thread: [Pawn] [Help] How make the NPC move bye CMD And also can point to other near players ? (/showthread.php?tid=1993)



[Help] How make the NPC move bye CMD And also can point to other near players ? - PutuSuhartawan - 2021-05-10

How to make the NPC move according to orders. And also can point to other players nearby.

I saw that there was someone who could make the NPC move by itself immediately according to the CMD command. but I don't know what command the function uses. Then can you please explain scripting to make this NPC look like it can make decisions according to orders, sir?


RE: [Help] How make the NPC move bye CMD And also can point to other near players ? - Radical - 2021-05-10

FCNPC move npc functions :

PHP Code:
native FCNPC_GoTo(npcidFloat:xFloat:yFloat:ztype FCNPC_MOVE_TYPE_AUTOFloat:speed FCNPC_MOVE_SPEED_AUTOmode FCNPC_MOVE_MODE_AUTOpathfinding FCNPC_MOVE_PATHFINDING_AUTOFloat:radius 0.0bool:set_angle trueFloat:min_distance 0.0stop_delay 250);

native FCNPC_GoToPlayer(npcidplayeridtype FCNPC_MOVE_TYPE_AUTOFloat:speed FCNPC_MOVE_SPEED_AUTOmode FCNPC_MOVE_MODE_AUTOpathfinding FCNPC_MOVE_PATHFINDING_AUTOFloat:radius 0.0bool:set_angle trueFloat:min_distance 0.0Float:dist_check 1.5stop_delay 250);

native FCNPC_Stop(npcid);

native bool:FCNPC_IsMoving(npcid);

native bool:FCNPC_IsMovingAtPlayer(npcidplayerid);

native FCNPC_GetDestinationPoint(npcid, &Float:x, &Float:y, &Float:z); 



https://github.com/ziggi/FCNPC


RE: [Help] How make the NPC move bye CMD And also can point to other near players ? - PutuSuhartawan - 2021-05-10

(2021-05-10, 11:12 AM)Radical Wrote: FCNPC move npc functions :

PHP Code:
native FCNPC_GoTo(npcidFloat:xFloat:yFloat:ztype FCNPC_MOVE_TYPE_AUTOFloat:speed FCNPC_MOVE_SPEED_AUTOmode FCNPC_MOVE_MODE_AUTOpathfinding FCNPC_MOVE_PATHFINDING_AUTOFloat:radius 0.0bool:set_angle trueFloat:min_distance 0.0stop_delay 250);

native FCNPC_GoToPlayer(npcidplayeridtype FCNPC_MOVE_TYPE_AUTOFloat:speed FCNPC_MOVE_SPEED_AUTOmode FCNPC_MOVE_MODE_AUTOpathfinding FCNPC_MOVE_PATHFINDING_AUTOFloat:radius 0.0bool:set_angle trueFloat:min_distance 0.0Float:dist_check 1.5stop_delay 250);

native FCNPC_Stop(npcid);

native bool:FCNPC_IsMoving(npcid);

native bool:FCNPC_IsMovingAtPlayer(npcidplayerid);

native FCNPC_GetDestinationPoint(npcid, &Float:x, &Float:y, &Float:z); 



https://github.com/ziggi/FCNPC



Wow, this plugin is amazing, thank you very much.