Yes it does after investigation i find it isnt coded in, all good and thanks again
So the permission for cop is at 0 does that mean new people to the server can use /cop or should i set permissions to users in the database
I believe everyone can use the command if it’s set to 0.
Yes they can, great addition to essentialmode thanks all
I added a extra class ie rebel however it seems to bug out copSGT, have i done something wrong or missed something?
– Edit the table below for more loadouts!
LOADOUTS = {
[“Cop”] = {
name = “Cop”,
command = “cop”,
permission_level = 0,
weapons = { “WEAPON_PISTOL50”, “WEAPON_STUNGUN”, “WEAPON_NIGHTSTICK”, “WEAPON_PUMPSHOTGUN”, “WEAPON_FLAREGUN” },
skins = { “s_m_y_cop_01”, “s_m_y_cop_01” }
},
[“Rebel”] = {
name = “Rebel”,
command = “rebel”,
permission_level = 0,
weapons = { “WEAPON_AK47”, “WEAPON_UZI”, “WEAPON_NIGHTSTICK”, “WEAPON_PUMPSHOTGUN”, “WEAPON_FLAREGUN”, “WEAPON_ASSAULTSMG” },
skins = { “a_m_y_hippy_01”, “a_m_m_og_boss_01” }
},
[“CopSgt”] = {
name = “Cop Sgt”,
command = “copsgt”,
permission_level = 2,
weapons = { “WEAPON_PISTOL50”, “WEAPON_STUNGUN”, “WEAPON_NIGHTSTICK”, “WEAPON_PUMPSHOTGUN”, “WEAPON_FLAREGUN”, “WEAPON_ASSAULTSMG” },
skins = { “s_m_y_cop_01”, “s_m_y_cop_01” }
},
[“Default”] = {
name = “Default”,
weapons = { “WEAPON_PETROLCAN” },
skins = {“a_m_y_skater_01”,
“a_m_y_skater_02”,
“a_m_m_beach_01”,
“a_m_m_bevhills_01”,
“a_m_m_bevhills_02”,
“a_m_m_business_01”,
“a_m_m_eastsa_01”,
“a_m_m_eastsa_02”,
“a_m_m_farmer_01”,
“a_m_m_genfat_01”,
“a_m_m_golfer_01”,
“a_m_m_hillbilly_01”,
“a_m_m_indian_01”,
“a_m_m_mexcntry_01”,
“a_m_m_paparazzi_01”,
“a_m_m_tramp_01”,
“a_m_y_gay_01”,
“a_m_m_acult_01”,
“a_m_y_hiker_01”,
“a_m_y_hippy_01”,
“a_m_y_genstreet_01”,
“a_m_m_socenlat_01”,
“a_m_m_og_boss_01”,
“a_f_y_tourist_02”,
“a_f_y_tourist_01”,
“a_f_y_soucent_01”,
“a_f_y_scdressy_01”,
“a_m_y_cyclist_01”,
“a_m_y_golfer_01”,
“cs_tenniscoach”
}
}
}
Maybe because those 2 skins are the same ones, it’s the only weird thing I see. Your code looks fine to me.
It worked fine until i added the rebel class, ill investigate further
Try this code
LOADOUTS = {
["Cop"] = {
name = "Cop",
command = "cop",
permission_level = 0,
weapons = { "WEAPON_PISTOL50", "WEAPON_STUNGUN", "WEAPON_NIGHTSTICK", "WEAPON_PUMPSHOTGUN", "WEAPON_FLAREGUN" },
skins = { "s_m_y_cop_01" }
},
["Rebel"] = {
name = "Rebel",
command = "rebel",
permission_level = 0,
weapons = { "WEAPON_AK47", "WEAPON_UZI", "WEAPON_NIGHTSTICK", "WEAPON_PUMPSHOTGUN", "WEAPON_FLAREGUN", "WEAPON_ASSAULTSMG" },
skins = { "a_m_y_hippy_01", "a_m_m_og_boss_01" }
},
["CopSgt"] = {
name = "Cop Sgt",
command = "copsgt",
permission_level = 2,
skins = { "s_m_y_cop_01" },
weapons = { "WEAPON_PISTOL50", "WEAPON_STUNGUN", "WEAPON_NIGHTSTICK", "WEAPON_PUMPSHOTGUN", "WEAPON_FLAREGUN", "WEAPON_ASSAULTSMG" }
},
["Default"] = {
name = "Default",
weapons = { "WEAPON_PETROLCAN" },
skins = { "a_m_y_skater_01", "a_m_y_skater_02", "a_m_m_beach_01", "a_m_m_bevhills_01", "a_m_m_bevhills_02", "a_m_m_business_01", "a_m_m_eastsa_01", "a_m_m_eastsa_02", "a_m_m_farmer_01", "a_m_m_genfat_01", "a_m_m_golfer_01", "a_m_m_hillbilly_01", "a_m_m_indian_01", "a_m_m_mexcntry_01", "a_m_m_paparazzi_01", "a_m_m_tramp_01", "a_m_y_gay_01", "a_m_m_acult_01", "a_m_y_hiker_01", "a_m_y_genstreet_01", "a_m_m_socenlat_01", "a_m_m_og_boss_01", "a_f_y_tourist_02", "a_f_y_tourist_01", "a_f_y_soucent_01", "a_f_y_scdressy_01", "a_m_y_cyclist_01", "a_m_y_golfer_01", "cs_tenniscoach" }
}
}
That shouldn’t really matter, the code should just pick a random skin (in this case, it’ll pick between the same skin).
As for the new loadout not working, I don’t know ![]()
It should work… The code below works on my test server:
LOADOUTS = {
["Cop"] = {
name = "Cop",
command = "cop",
permission_level = 0,
weapons = { "WEAPON_PISTOL50", "WEAPON_STUNGUN", "WEAPON_NIGHTSTICK", "WEAPON_PUMPSHOTGUN", "WEAPON_FLAREGUN" },
skins = { "s_m_y_cop_01", "s_m_y_cop_01" }
},
["Rebel"] = {
name = "Rebel",
command = "rebel",
permission_level = 0,
weapons = { "WEAPON_AK47", "WEAPON_UZI", "WEAPON_NIGHTSTICK", "WEAPON_PUMPSHOTGUN", "WEAPON_FLAREGUN", "WEAPON_ASSAULTSMG" },
skins = { "a_m_y_hippy_01", "a_m_m_og_boss_01" }
},
["CopSgt"] = {
name = "Cop Sgt",
command = "copsgt",
permission_level = 2,
weapons = { "WEAPON_PISTOL50", "WEAPON_STUNGUN", "WEAPON_NIGHTSTICK", "WEAPON_PUMPSHOTGUN", "WEAPON_FLAREGUN", "WEAPON_ASSAULTSMG" },
skins = { "s_m_y_cop_01", "s_m_y_cop_01" }
},
["Default"] = {
name = "Default",
weapons = { "WEAPON_PETROLCAN" },
skins = {"a_m_y_skater_01",
"a_m_y_skater_02",
"a_m_m_beach_01",
"a_m_m_bevhills_01",
"a_m_m_bevhills_02",
"a_m_m_business_01",
"a_m_m_eastsa_01",
"a_m_m_eastsa_02",
"a_m_m_farmer_01",
"a_m_m_genfat_01",
"a_m_m_golfer_01",
"a_m_m_hillbilly_01",
"a_m_m_indian_01",
"a_m_m_mexcntry_01",
"a_m_m_paparazzi_01",
"a_m_m_tramp_01",
"a_m_y_gay_01",
"a_m_m_acult_01",
"a_m_y_hiker_01",
"a_m_y_hippy_01",
"a_m_y_genstreet_01",
"a_m_m_socenlat_01",
"a_m_m_og_boss_01",
"a_f_y_tourist_02",
"a_f_y_tourist_01",
"a_f_y_soucent_01",
"a_f_y_scdressy_01",
"a_m_y_cyclist_01",
"a_m_y_golfer_01",
"cs_tenniscoach"
}
}
}
Works nicely but is there anyway to get the skins to save with props/textures on them? I tried the /skin save command but nothing seems to register.
The loadouts are working but How do you randomize the peds everytime you choose /cop or /rebel also how to add like a flashlight mod on my pistol when you choose loadout?
@Leah_UK, the version from @Havoc has been pushed to Github: https://github.com/TGRHavoc/fivem-loadouts.
I guess it would benefit if the link was added in your description so people can get the latest community release?
i can not wait to use loadout but i have problem with essentialmode i got loading stuck no spawnplayer i have set essentialmode = true but still same i keep got infinity loading screen…
help me hplease to configure essential mode correctly ?
sql done
root sql data done
essentialmode = true
- es_admin
- loadout
whats is my mistake on this configuration ?
pls tell me what to do to get essentialmode work and pass infinity loading screen
?
i already try fix since last week but till now no solution found :3
The only thing I can think of is that you don’t have “essentialmode” in your “AutoStartResources” list in your .yml file…
If not, try to re-install the plugin following the instuctions provided in the main thread.
Installation: Extract the folder to your resources, append “essentialmode” to your AutoStartResources. Change the MySQL data in server/player/login.lua, and last do not forget to import the provided sql file.
I could be wrong but, with the information you’ve given that’s my best guess. If you still need help, I suggest you ask the creator of essentialmode @Kanersps in PMs or on his thread.
Can someone please tell me why its not working?
essentialmode installed permission 4
f8 shows https://gyazo.com/b585549c386b33cc9c4c66da22855c5a
resource https://gyazo.com/ef99aa34cfd949ee8ac4526688afb237
YML https://gyazo.com/bf87f1764b8d748b34da3c1b6698019b
/skin cop, /cop, /rebal etc etc nothing works…
try /loadout (cop,rebel,etc)
Thanks I will try that but f8 console does not show it loading at all, wouldn’t I see something in console if it was loaded?
idk i never use the F8 i chk in the server windows !
ok so if someone can help me out here with this…
So when first login has message… “Use /skin to pick a skin and /skin save to save the skin to the Database!”)
Now it does start the resource cause the random spawn is working fine, just cannot use a command to change skins.
I have added the above last post script.
I have essentialmode set up and working with permission 4.
no errors
so /skin cop or /cop or /loadout cop do nothing, rebel ie or anything , no spawn.
But if type /loadout it says = /loadout to pick a loadout.
but nothing works either//
Anyone have a min to explain whats up?
Sorry for the late reply, been a little busy.
Are you using the latest version from Github?
If so, the command system has changed a bit (I really should update the documentation and in-game messages
).
So, let’s say you’re using the following “loadout.lua” file:
LOADOUTS = {
["cop"] = {
name = "Cop",
permission_level = 0,
weapons = { "WEAPON_PISTOL50", "WEAPON_STUNGUN", "WEAPON_NIGHTSTICK", "WEAPON_PUMPSHOTGUN", "WEAPON_FLAREGUN" },
skins = { "s_m_y_swat_01", "s_m_y_swat_01" }
}
}
The text in the first brackets ([cop]) is the argument for the command /loadout. So, if you run /loadout cop you will get this loadout.
The name (name = "Cop") is the name of the loadout, this is used in-game to tell the player which loadout they have just received (this can take in colors, see: How to change your server color).
The rest are pretty self-explanatory (at least I hope they are, if not just ask
).