[How-to] Install a FiveM resource / Script

Hello I’m FAXES and in this tutorial I’m going to show you how to install different types of FiveM resources. Yes this may be a very basic thing to do, but this tutorial is more aimed at beginner’s and people that are new to the FiveM world.

Current things this tutorial covers;

Basic script with a server.lua and client.lua
Map Resources
Making a __resource.lua
Weapon Resources

TO COME:
Bigger resources with many client and server files
UI Related resources
Vehicle Resources
Video Tutorials for each tutorial

Some may be thinking, ‘why do you have a server if you know nothing’, well we all have to start somewhere.


Making a __resource.lua

A __resource.lua is the file which loads all the contents of a resource, whether it being a script, map, vehicle etc. These files are required for a resource to work. This tutorial will cover how to make a resource.lua for a resource. You may follow this for the below tutorials

  1. Create your lua file. Open a new text file using notepad, notepad++ or any other similar program. On the first line place your resource manifest version (optional, but recommended) you can find resource manifests here. Your line in your file should look like the below; Note the version may be different, use the link above.
resource_manifest_version '77731fab-63ca-442c-a67b-abc70f28dfa5'
  1. Now the next part is where you can load the script. A client_script is used for client.lua’s and a server_script is used for a server.lua. Below is a list of common ways to start the script.
client_script
server_script
ui_page
file
  1. Find which of the above you need and start your next line and add your script file name. Eg;
client_script "client.lua"

Make sure to include the quotes ( " ) and the space in the above

3A. if your file is in a folder (Eg; /ui/client.lua) make sure to include the directory so it looks like

client_script "ui/client.lua"
  1. Do this for all files that need to be loaded. So the end result could look similar to the below:
resource_manifest_version '77731fab-63ca-442c-a67b-abc70f28dfa5'

ui_page 'ui/index.html'
files {
  'ui/index.html',
  'ui/style.css',
  'ui/img/logo.png',
  'ui/script.js'
}

client_script "client.lua"

or

resource_manifest_version '77731fab-63ca-442c-a67b-abc70f28dfa5'

client_script "client.lua"
server_script "server.lua"
  1. Now you should be done. Make sure you have all quotation marks and all spelling and directory’s are correct.

End Tutorial


Basic Script

With __resource.lua, client.lua & server.lua
Video - https://youtu.be/BEzVqRaVQMY

  1. As with most resources they come from a rar or zip file, In these compressed files may be a folder
    or files. Most resource contents should look like the below image:

1

These files are the common files for resources, sometimes the names of client.lua and server.lua may be changed or you could have a config file.

So first you will want to have these files (in above image) in a folder, some may be inside a folder in the rar or zip file. For a basic script like this you should be able to rename it unless it contains java or (N)UI files.

  1. Upload this folder in to your resources folder on your server. In the image below I’m using a VPS server. In your server a common spot can be server-data/resources You should have the default resources the FiveM dev’s have made, if not go to the below link. Upload it in to your resources folder.
  1. Now after you have uploaded the folder in to your resources folder now go back to the main server folder (should contain a cache folder and server.cfg ) Now open the server.cfg file. It should look like this:


PS; You should have ‘start hardcap’ and ‘start sessionmanager’ as well

Now at the bottom of the start’s add start FolderName (Replace FolderName with the folder name you have)

It should now look like this;

start mapmanager
start chat
start spawnmanager
start sessionmanager
start fivem
start hardcap
start rconlog
start scoreboard
start FolderName
  1. Now restart your server and the resource will automatically start when the server starts.

    4a. If you don’t want it to automatically starts take this line out of the start list and you can start it via console, ingame or rcon using - start FolderName

End Tutorial


Map Resource

Video - https://youtu.be/UzeGqyScLWI

  1. Map resources can be the easiest resources to make. 1st make a __resource.lua and place the manifest. You can find resource manifests here.

  2. Place the manifest version at the top of your __resource.lua. It should look like this:

resource_manifest_version '77731fab-63ca-442c-a67b-abc70f28dfa5'

Version might be different

  1. Now add this_is_a_map ‘yes’. This now tells the server that these is a map resource and to stream the folder (next step).

  2. Now in your resource add a folder called stream. Your resource should look like the below image

Capture

  1. Place any .ymap file(s) (map files) into the stream folder and start your resource. *You can automatically start them on server startup using start ResourceName.

For example maps for FiveM take a look here

End Tutorial


Weapon Resources

This (weapon) tutorial is to show you how to install a weapon modification into FiveM.

  1. Download or get your weapon mod handy. A great place to get weapons is from GTAV-mods.com

  2. Make a new folder for a resource and make a __resource.lua and leave it empty. Note; you can place weapons folder inside another resources stream folder.

  3. Inside your new resource make a stream folder followed by a weapons folder (FolderName>Stream>Weapons). Place all your weapons inside the stream folder (see below)

  1. Now you should be done restart your server and clear cache.

End Tutorial


More are coming soon when I feel like typing, In the mean time if I missed anything please point it out or if you have any feedback chuck it below.

10 Likes
[Help] How to put custom map in my server
Map Editor?
[HELP]How to add map in fivem server
[RELEASE] DOJ styled carhud
How do i install scripts on FiveM
Need Major Help!
How to work K9
[Release] Hide Commands - Hide mis-spelled commands in chat! [fax-hidecmds] [1.1]
ShitScript [Fax-ShitScript] [1.0]
[Release] Spotlight - Vehicle Spotlight Script [1.0] - FaxSlav
[Release] Player Logging - Log Those People That Get Away! [1.2]
Need help for my server
[Release] Vehicle Child Lock [1.0]
[Release] Disable Pause Menu While Driving / Moving [1.0]
[Release] Horn Flash - Flash Headlights When Car Horn Is Active [1.0]
[Release] Vote-to-Kick - Vote Players Out! [Fax-Vote2Kick] [1.0]
[Release] Advanced 911 - Team see's call, not whole server [1.0]
[Release] Police Backup - Sets Waypoint - Clean Layout & Display [1.0]
How to Apply Scripts to the server?
[Release] Server Notifications [1.4]
Need Help With LUA Coding For My FiveM GTA V FX Server
[Request] Looking for a cuff script and delete get guns when entering a medic helicopter
I need help adding custom parts to the map please
This Map on my Server please?
Changing server loading screen & installing custom sirens
How to download custom map?!
[HELP] How do I add it Retextures in my server?
How do I add peds to my Zap Hosting Server
Dumb question - Running custom scripts?
[Release 3.0] RGB Paint Menu & Neons
[Release] Area of Patrol - Set AOP - Ft. Draw Text, Peacetime & More [AOP] [3.0]
[Release] External Vehicle Commands - /trunk, /hood from outside your vehicle [1.2]
Need developer to download scripts in server,configure it and make it playable

is it okay if i make all you said into a video because i wanted to do it but dint have much time and so if you say yes il do it RN

2 Likes

I’ve already made a video just gotta upload it. Thanks for the hand tho :slight_smile:

1 Like

well fuck it im making my OWN

1 Like

This is @FAXES 's copyright tho…

no but il make another video because if you check in my how to add an ADD-ON car i had a check list that i did 2 weeks ago

Tutorial Update

  • Added Map Resource Tutorial

Tutorial Update

  • Added __resource.lua
  • Fixed a couple spelling issues

Tutorial Update

  • Added Weapon resources

Tutorial Update

  • Added basic resource video.
1 Like

Added Map tutorial Video

thanks this helped so much. You should call it a mega guide.

1 Like

Hey. I’m really confused. Could you walk me through this on discord. My discord is: Antoni#5225

Made this topic a Wiki. If you spot an error or something needs updating you can edit it. Please only do so if you know what your writing.

Well for your area-of-patrol it has some errors when i start the server, do any of the files in the folder go anywhere else or do they just go in the resource folder?

1 Like

Ask in the AOP Topic, for better responses and for better documentation if others have the (same) issue…

@FAXES How would you put resources like cars, in a folder, so that they are all together? I made a file named spawn cars, in that, I made a folder named stream and a __ressource.lua, in the stream folders I put the cars in there (add-ons not replaces). But it doesn’t work, how would you do that?

senseiPaulio what i do is i have a folder called cars and inside that i have data with nothing in atm and a stream file i place all cars in that stream file and in the resources.lua i have this resource_manifest_version ‘77731fab-63ca-442c-a67b-abc70f28dfa5’

client_script ‘data/vehicle_names.lua’ and in server.cfg add start cars should work hope helps

@FAXES have you made the vehicle resources tutorial yet? i really need it right now. or just a sample one would be ok. Much appreciation bro. :+1:

I would but there’s heaps already in #development:tutorials