[OLD-OUTDATED][Release] Loadout System

Loadout System

Ever wanted a system which allows your users to use a command and in return receive weapons and/or a model? If so then this script is for you.


Default Setup

Idea / Special Thanks:
Idea by ioxo: Giving players items on spawn?
@schneehaze + @SirMark for initial code support.

** @Havoc **: Primary coder, doesn’t have an account (yet) so I’ve posted this on his behalf, will link his account properly when he has one.



You’re a hero! Gonna try it tonight.

1 Like

i make /cop and nothing all is load in the server help!

You forgot:

    local playerPed = GetPlayerPed(-1)

in spawn/client.lua

and for me, /cop or /rebel doesn’t work. I activated essentialmode.

Do you have EssentialMode on your server?

Works without the

    local playerPed = GetPlayerPed(-1)

for me at least :S

Have you set a rank in EssentialMode, you need to have kick permission, which is 1 with this addon.

no i install them but i dont know how too setup mysql …

I think my essentialmode is not working properly…
I’m always getting an error when I am trying to restart essentialmode -.-
“Type ‘Double’ is not callable.”

yeah i have error too

Error as a cause of this script, or?

Like That

You need to setup MySQL. Get a hosting provider (more reliable way and cheap) edit the SQL file given in the EssentialMode’s download to change the Database’s name to the name you’ve set it as then import it to the database. After which you need to set the database instructions in your EssentialMode’s config area (can be found in its instructions) and then you’re good to go. If you need help send me a PM I’ll see what I can do.

Any way we can make it so that every player is able to choose loadouts? I’d rather not have it linked to specific permissions. And not a coding wonder, so no idea how to edit the code to get rid of the permission system in this resource :wink:

Great work though! Looks easy to add more loadouts. I’m happy with it.

You should be able to replace

TriggerEvent('es:addAdminCommand', 'cop', permission.kick, function(source, args, user)

to something like

TriggerEvent('es:addCommand', 'cop', function(source, args, user)

Oh snap, that easy? Can’t wait to test it. Can my workday be over already?!

1 Like

i have pick hostinger for mysql but the file sql i need put it in my essential mod or ? and the ip or …

Go on phpMyAdmin (I assume you have with that host) click on the database you’ve made for use, then click “import” at the top, after which you need to import that SQL file so long as you’ve edited the database name in the file to that of your database, I believe I deleted one of the lines and edited the one underneath to my database name.

Hmm, I don’t have that problem… I’ll have a look for you though :slight_smile:

Msg me privately :wink: so this doesn’t get too spammed with setting up EssentialMode - Although that setup seems fine, doesn’t look like there’s a problem there.