Skip to content

Fernando-A-Rocha/mta-samp-maploader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Banner

mta-samp-maploader is a MTA resource that reads SA-MP map code in Pawn and loads the map objects and other elements in MTA.

MTA forum topic: Coming Soon

Contact (author): Nando#7736 (Discord)

Your opinion matters

Click the button to check the project's feedback page:

Getting Started

Dependencies

This project uses 2 resources that samp_maploader requires.

Installing

No stable release has yet been released! Proceed at your own risk.

Download Everything

  • Go to the latest mta-add-models release page: link
  • Download the following resources (dependencies):
    • newmodels
    • sampobj_reloaded
      • Download models.zip containing all dff/txd/col files required (SA-MP Objects)
  • Go to the latest mta-samp-maploader release page: link
  • Download the samp_maploader resource
  • Place the 3 folders you downloaded in your server's resources folder
  • Execute command refresh in server console to see if all 3 resources are loaded successfully

Edit the Dependencies

Here are some changes you could make to the dependencies:

Tutorial

With this samp_maploader resource you can load SA-MP maps in the Pawn format. To do this, follow these steps:

  1. Place map files in samp_maploader/maps

    • Check the list of supported Pawn functions here
    • Lines must be a series of function calls, see the existing example Pawn files
  2. List map files (name.pwn) in samp_maploader/meta.xml under <!-- SA-MP Maps -->

    • This allows the resource to send these files to the client when they join so the maps can be loaded
  3. Place custom model files in samp_maploader/models

    • This is required if your map has any added objects using AddSimpleModel
    • Must have dot dff, txd and col files for each new object
    • If you don't have a collision file for your model check this tutorial
  4. List custom model files (dff + txd + col) in samp_maploader/meta.xml under <!-- SA-MP Map Models -->

    • This is required if your map has any added objects using AddSimpleModel
    • This allows the resource to send these files to the client when they join so the models can be loaded when requested in a map file
  5. Define maps to load in samp_maploader/map_list.lua inside mapList

    • Read the comments to understand how to define your map
  6. Use start samp_maploader to initiate the resource

  7. ‼️ Important: If you restart newmodels, you will also need to restart samp_maploader.

Important Info

  • MTA currently limits the amount of objects you can stream within a small radius (memory issue). It's very noticeable when in SA-MP interiors with a lot of objects, e.g. test map #2

Generating Collision Files

There's a tool to generate a .col file from a given .dff model. Check out the tutorial here.

Final Note

Feel free to update this README.md if you wish to improve it.

Thank you for reading, have fun!