ziggi / FCNPC

FCNPC - Fully Controllable NPC
Apache License 2.0
125 stars 30 forks source link

Need Some Information About Some Natives #298

Closed AtlanticCityRoleplay closed 10 months ago

AtlanticCityRoleplay commented 10 months ago
  1. What is the difference Between These Natives...?
native FCNPC_AddPointToMovePath(pathid, Float:x, Float:y, Float:z);
native FCNPC_AddPointsToMovePath(pathid, Float:points[][3], const size = sizeof(points));
native FCNPC_AddPointsToMovePath2(pathid, Float:points_x[], Float:points_y[], Float:points_z[], const size = sizeof(points_x));
  1. What is Pointid in this native that has been Used...?
native FCNPC_GoByMovePath(npcid, pathid, pointid = 0, type = FCNPC_MOVE_TYPE_AUTO, Float:speed = FCNPC_MOVE_SPEED_AUTO, mode = FCNPC_MOVE_MODE_AUTO, pathfinding = FCNPC_MOVE_PATHFINDING_AUTO, Float:radius = 0.0, bool:set_angle = true, Float:min_distance = 0.0);
  1. Need Some Info Regards Pathfinding...?

I don't know what exactly its working Process, Whether i need to Program the Path by Path or it will work automatically, My NPC is moving through Building, I can't find any Example Code Regards this.

I searched Previous Issue regards this, If you could help me ping me to the Reference were i could understand

Thanks in Advance

ziggi commented 10 months ago
  1. What is the difference Between These Natives...?

No difference, it's just different forms of the same function.

  1. What is Pointid in this native that has been Used...?

This is the ordinal number of a point on the route

  1. Need Some Info Regards Pathfinding...?

Pathfinding isn't implemented. You need an another plugin/include to do this.

AtlanticCityRoleplay commented 10 months ago

Pathfinding isn't implemented. You need an another plugin/include to do this.

In that case any suggested plugin or include that may enhance the working

Or

Shall use the native

native FCNPC_AddPointToMovePath(pathid, Float:x, Float:y, Float:z);
native FCNPC_AddPointsToMovePath(pathid, Float:points[][3], const size = sizeof(points));
native FCNPC_AddPointsToMovePath2(pathid, Float:points_x[], Float:points_y[], Float:points_z[], const size = sizeof(points_x));

Will it be a effective one...?

ANOTHER DOUBT

  1. Whether the recorded npc vehicle get damaged will the forward FCNPC_OnVehicleTakeDamage(npcid, issuerid, vehicleid, Float:amount, weaponid, Float:fX, Float:fY, Float:fZ); inovked or not..?
ziggi commented 10 months ago

In that case any suggested plugin or include that may enhance the working

Maybe this one: https://bitbucket.org/Pamdex/pathfinder/src/master/

public OnPathCalculated(routeid, success, Float:nodesX[], Float:nodesY[], Float:nodesZ[], nodesSize)
{
    FCNPC_AddPointsToMovePath2(pathid, nodesX, nodesY, nodesZ, nodesSize);
    return 1;
}