Coder Social home page Coder Social logo

Documentation & precision about fcnpc HOT 8 CLOSED

ziggi avatar ziggi commented on June 9, 2024
Documentation & precision

from fcnpc.

Comments (8)

ziggi avatar ziggi commented on June 9, 2024

I am working with FCNPC for my bot system, nonetheless, I have an issue with bot moving.
When the bot target is higher than the bot, the bot is floating in the air. How can I fixe this bug?

Screenshots?

I saw there is a possibility to use MapAndreas, I set the parameters to true, but nothing change.

MapAndreas plugin loaded successfully?

And the last point: Do you plan to make a dcumentation ?

No, I am not interested in this.

from fcnpc.

Tyrar avatar Tyrar commented on June 9, 2024

Hum my bad, I didn't see I have to load MapAndreas.

The default plugin should work? http://forum.sa-mp.com/showthread.php?t=120013

Thank you for your answer :)

from fcnpc.

ziggi avatar ziggi commented on June 9, 2024

Use this: http://forum.sa-mp.com/showpost.php?p=3130004&postcount=153

from fcnpc.

Tyrar avatar Tyrar commented on June 9, 2024

I try with the plugin, but the problem is still here. SOmetimes, the bot is under the ground, sometimes it is in the air.

On this picture : http://img11.hostingpics.net/pics/440427samp010.png , the bot is nearly in the ground and this one http://img11.hostingpics.net/pics/859550samp007.png the bot is under the ground (it is shooting at me)

from fcnpc.

ziggi avatar ziggi commented on June 9, 2024

Show your code.

from fcnpc.

Tyrar avatar Tyrar commented on June 9, 2024

Loading MapAndras:
MapAndreas_Init(MAP_ANDREAS_MODE_FULL); FCNPC_InitMapAndreas(MapAndreas_GetAddress());

Bot management:

if (Bot_GetDistanceFromPlayer(npcid, playerid) > 30.0)
        {
            #if DEV_MODE == 1
                printf("NPC(%d) follow Player(%d)", npcid, playerid);
            #endif
                
            if (FCNPC_IsAiming(npcid))
                FCNPC_StopAim(npcid);

            if (!FCNPC_IsMoving(npcid))
                FCNPC_GoToPlayer(npcid, playerid, MOVE_TYPE_AUTO, MOVE_SPEED_AUTO, true);
        }
        else {
            #if DEV_MODE == 1
                printf("NPC(%d) attacks Player(%d)", npcid, playerid);
            #endif

            if (Bot_GetDistanceFromPlayer(npcid, playerid) < 15.0)
                FCNPC_Stop(npcid);

            if (!FCNPC_IsAiming(npcid))
                FCNPC_AimAtPlayer(npcid, playerid, true);
        }

from fcnpc.

ziggi avatar ziggi commented on June 9, 2024

FCNPC_InitMapAndreas returns 0 or 1?

from fcnpc.

Tyrar avatar Tyrar commented on June 9, 2024

It returns 1.

Hum, after recompilation, there is no bug. Just one thing, sometimes, the bot pass trough the bulding to go to the target.

Thanks for your help

from fcnpc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.