Coder Social home page Coder Social logo

core_npc's Introduction

CORE_NPC

Support Server alt text
Easily add NPC's into your FiveM game

Installation

  1. Download the script either from
  • The Releases page
  • Click on Code and then Download Zip
  • Using Git Clone (See Below)
  1. Drag and drop the core_npc into your server/folder/whatever you use
  2. Add ensure core_npc to your server.cfg
  3. Enjoy!

Usage

To add peds into your server, simply modify the config.lua file, with the template below:

{ x co-ord, y co-ord, z co-ord, ped heading, model hash, ped model, heading text/name, animation_text }

Example:

{ -56.800365447998, -785.83428955078, 43.227298736572, 500.77, 0xB353629E,"s_m_m_paramedic_01", "Paramedic", "mini@strip_club@idles@bouncer@base" }

Don't forget, if you add multiple peds, you need to add a , on all {} except for the last ped line. Example:

{...},
{...},
{...}

Thanks to BombayV, you can now simply set the draw distance for the text spawning and text colour. These can be easily set the config.

Working on

  • Easy integration with bt-target
  • Optimize Draw Distance for text (Thanks to BombayV)
  • Optimize ped spawning, delete ped when client moves away

Useful Links

GTA:V Ped Models and Hashes
GTA:V Animations

Using Git Clone

Using Git Clone is easy (if you have not used it before). If you have never used Git before, I would suggest just downloading the files either from the Releases page or the zip file.

git clone https://github.com/michaelrosstarr/core_npc

License

License: GPL v3
This script falls under GNU General Public License v3.0, which means that you can contribute towards this project, modify this script for private use (meaning, you cannot release this script under your own name and claiming that you created it), rather contribute your changes by doing a Pull Request. Read more about Pull Requests here

core_npc's People

Contributors

bombayv avatar michaelrosstarr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

core_npc's Issues

Text not displayed

Solution:

In client.lua modify:

    while Config.displayText do
        local pos = GetEntityCoords(PlayerPedId())
        Wait(0)
        for _, v in pairs(Config.Peds) do
            local distance = #(pos - vec3(v[1], v[2], v[3]))
            if (distance < Config.displayDistance) then
                DrawText3D(x, y, z + 1, Config.displayColor .. v[7], 1.2, 1)
            end
        end
    end
end)

by:

    while Config.displayText do
        local pos = GetEntityCoords(PlayerPedId())
        Wait(0)
        for _, v in pairs(Config.Peds) do
            local distance = #(pos - vec3(v[1], v[2], v[3]))
            if (distance < Config.displayDistance) then
                DrawText3D(v[1], v[2], v[3] + 1, Config.displayColor .. v[7], 1.2, 1) --- MODIFY LINE
            end
        end
    end
end)

Can't get peds to do anims

I'm trying to get some NPC's to do anims at Vanilla Unicorn and most dance anims aren't working. Any suggestions?

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.