[Release][ES] Loadouts (v2.2)

Thanks to @Ryload and @Dante_Kane for the messages :slight_smile:

The latest version should fix all these issues :smiley:

Hello dude,
Thanks for the script !
Do you think is’t possible to load only a part of a skin (For exemple i dont want the head changing, just change players closes !)

Hello,
thanks for the script,
but i have a problem,
weapon from the weapon_shop disappear
can you help me?

sorry,
i have cherch and i have find

Am I just completely blind or does the “loadouts.lua” not exist???

Ah sorry. In the latest version, the loadouts are held in the "settings.lua"file.

Thanks :slight_smile: - a pretty important thing to know :smiley:

Thank you for such a great release!

Can a loadout be assigned to certain players names on the server?
For example, “Player1” joins the server and loadout “Player_1” is automatically applied to their character.

Yea… If you change line 15 in “server.lua” from TriggerEvent("loadout:doLoadout", source, "random", {}) to TriggerEvent("loadout:doLoadout", source, GetPlayerName(source), {}) then that would give players a loadout with their name.

For example, if player “Havoc” joined they would be given the “Havoc” loaded. It would have to be defined in the “settings.lua” file, something like

["Havoc"] = {
    name = "Havoc's spawn loadout", 
    weapons = {  },
    skins = {  }
}

Thanks for confirming Havoc. I got it to work but the loadout is not applied all the time. Sometimes one of the skater kids spawns into the server.

Did I leave something out?

I believe another server was having similar issues, I’m not currently at my computer (and I won’t be for a while) so, I can’t do tests to find the cause and fix it.

The only thing that pops into my mind (literally just popped in) is that it could be an issue with servers using EssentialMode 2.0. Could you put the add-on onto a clean server or, a server using EssentialMode 3.0 to see if this issue still persists?

I think I got it to work by completely removing the “random” loadout and only keeping the two that I’m currently testing with.

Can i give players items at spawn .

a couple things, 1 it does not work when i type /loadout cop it doesnt do anything. 2. Is there another addon or maybe a way you could make it where you could only do the command in the police station?

Can’t seem to get this to work since the latest FiveM update. Am I doing something wrong or isn’t this just me?

  1. Sorry, I would need more information to help you (PM me).
  2. No, I have no intention to implement this feature. Sorry.

Sorry to hear that. I’m not at a computer at the minute so, I can’t fix the problem :slightly_frowning_face:. I’ll try and update the add-on when I get back (it’ll remove all EssentialMode dependencies) but, I don’t have an eta as to when that’ll be. If you know how to script, you could give it a shot yourself and submit a PR on Github :slightly_smiling_face:

i have noticed this as well for some reason i have to go in to rcon and stop and start essentialmode, es_admin and loadouts to get loadouts to work again. its like it needs a reboot after so many hours of running.

Thanks for the quick reply, did some testing and it seems to work fine when disabling saving loadouts to database.

OK, thanks for that :smiley:. I’m pretty sure this is because of the dependency on the old EssentialMode. When I get back, I’ll see if I can update it to use the latest version or, change how the loadouts are saved (instead of saving to a database which, is probably not needed).

That sounds odd… I’ll definitely do some tests when I get back and see if I can reproduce and fix the problem :slight_smile: