Mta Add Models Save

Library for Multi Theft Auto: San Andreas that lets you add new models to your server

Project README

Banner

mta-add-models is an MTA resource (library) which makes use of the engineRequestModel features to add new peds (skins), vehicles and objects:

  • syncs all added models with all players
  • minimalistic, optimized and bug free

In simpler terms, with this resource you can make scripts/change your scripts to add new skin, vehicle and object IDs to your server! For example we can now add all SA-MP objects whilst keeping their intended IDs.

MTA forum thread: link

Support/Help

If you need help with anything related to this project, please read the corresponding section on the MTA forum thread linked above.

Your opinion matters

Visit the project's feedback page to check other people's opinions and share your own.

Getting Started

Prerequisites

  • Required minimum MTA Server & Client version 1.6.0-9.22204.0 (MTA 1.6) ⚠️
  • Get the installers from nightly.mtasa.com
  • Client should auto-update upon joining the server
  • Find out what the build numbers mean here: buildinfo.mtasa.com
  • If you don't have the right version these resources will not work correctly

Includes

newmodels: main library resource

  • (debugging) unittest_newmodels: a resource for testing the main scripts
  • (recommended) newmodels-engine: a resource that uses the main scripts (useful)
  • (optional) sampobj_reloaded: a resource that adds all SA-MP object models to your server
    • 👉 Download models.zip containing all dff/txd/col files required
  • (optional) vehicle_manager: a basic resource that adds some vehicle models to your server with custom properties
  • (optional) editor_custom: modified MTA:SA Map Editor resources to support using new model IDs

Install

  • Get the latest release: here
  • Download the source code Zip and extract it
  • Place the newmodels folder in your server's resources
  • Use command start newmodels in server console

Quick Testing

  • Place mod files newmodels/models (dff & txd (& col for objects))
  • List them in newmodels/meta.xml like the example
  • As of version 2.0, files have the download="false" attribute, causing newmodels to handle downloading them later only when needed
  • Define them in newmodels/mod_list.lua inside modList like the example
  • Use the commands to test, have fun!

Commands

Main testing commands in newmodels:

  • /listmods lists all defined mods
  • /allocatedids shows all allocated mod IDs in realtime
  • /selements lists all streamed in elements for debugging purposes
  • /myskin [ID] sets your skin to a default or new ID
  • /makeped [ID] creates a ped and sets its model to a default or new ID
  • /makeobject [ID] creates an object and sets its model to a default or new ID
  • /makevehicle [ID] creates a vehicle and sets its model to a default or new ID

How to Use

General Information/Guide: It should help you understand how the newmodels resource works and how to use it.

NandoCrypt

There is support for encrypted model files using the NandoCrypt resource.

This is useful for those who want to keep the models private & prevent people from stealing them.

Object Collisions

Object mods need a .col file to define its collisions. Ped and vehicles don't need any because the collisions are automatically generated by the game engine.

Use the KDFF tool to generate a .col file from a given .dff model (tutorial here).

Credits

The resources newmodels, vehicle_manager and sampobj_reloaded include mods from the following sources:

Final Note

Feel free to update the documentation in this repository and contribute to the code via pull requests.

Thank you for reading, have fun!

Open Source Agenda is not affiliated with "Mta Add Models" Project. README Source: Fernando-A-Rocha/mta-add-models
Stars
50
Open Issues
6
Last Commit
3 months ago
License

Open Source Agenda Badge

Open Source Agenda Rating