I just dont understand, the /loadout, /loadout cop, whatever, does not work.
The random peds work fine when spawning in.
Here is what I have
I just dont understand, the /loadout, /loadout cop, whatever, does not work.
The random peds work fine when spawning in.
Here is what I have
where do i put the
name = "^4cop",
or something else !
Inside the ānameā property, so
LOADOUTS = {
["cop"] = {
name = "^4Cop"
}
}
okay ty i just post the same
Hello i was wondering is their away to make this have an option to have a certain vehicle spawn in for instance cop would give you the police or police2
Hello guys, I have got a issue with the loadout system : the command /loadout cop doesnĀ“t do anything but the players spawn with custom clothes :S
I added the loadout system from github, added it to autorestarts, I set lvl permission 4 into DB and I have installed essentialmode.
Thanks in advance
No but, I was planning on adding this feature in future. Just a little busy at the moment with University.
Itās in the āserver.luaā file, specifically lines 30 and 31. Or, if you want to know how you can do it for themā¦ Just add more skins
https://github.com/TGRHavoc/fivem-loadouts/blob/master/loadout/server.lua#L30
Have the players got permission for this command? If not, it should pop up at the bottom of the screen saying they donāt. I donāt get how ānothingā is happening. Whatās the console look like when a command is executed?
Assuming itās the loadout system thatās in ācustom_scriptsā then try checking the loadouts.lua file for a missing ā]ā.
Hello, can someone tell me why i got this when someone is connecting ? :
2017-04-11 17:42:40.7172|ERROR|CitizenMP.Server|Error executing event handler for event loadout:doLoadout in resource fivem-loadouts: Exception has been thrown by the target of an invocation.
2017-04-11 17:42:40.7200|ERROR|CitizenMP.Server| at [U] System.Reflection.MonoMethod.Invoke(Object obj,BindingFlags invokeAttr,Binder binder,Object[] parameters,CultureInfo culture)
2017-04-11 17:42:40.7200|ERROR|CitizenMP.Server| at [U] System.Reflection.MethodBase.Invoke(Object obj,Object[] parameters)
2017-04-11 17:42:40.7200|ERROR|CitizenMP.Server| at [U] System.Delegate.DynamicInvokeImpl(Object[] args)
2017-04-11 17:42:40.7200|ERROR|CitizenMP.Server| at [U] System.MulticastDelegate.DynamicInvokeImpl(Object[] args)
2017-04-11 17:42:40.7200|ERROR|CitizenMP.Server| at [U] System.Delegate.DynamicInvoke(Object[] args)
2017-04-11 17:42:40.7200|ERROR|CitizenMP.Server| at [U] CitizenMP.Server.Resources.ScriptEnvironment.TriggerEvent(String eventName,String argsSerialized,Int32 source)
2017-04-11 17:42:40.7203|ERROR|CitizenMP.Server|Inner exception: Object is nil.
2017-04-11 17:43:32.0246|INFO|CitizenMP.Server|Client Airbourne quit.
Thanks by advance
It looks like its trying to perform ādoLoadoutā on a loadout that doesnāt exist. Have you modified the code in someway or the loadout file?
Edit: If youāre trying to remove the random skin when a player spawns, you canāt just remove it from the loadout.lua file. You also need to edit the server.lua file, specifically line 9.
https://github.com/TGRHavoc/fivem-loadouts/blob/master/loadout/server.lua#L9
Here is my loadout file, can you tell me how can i fix it ?
-- Edit the table below for more loadouts!
LOADOUTS = {
["police"] = {
name = "Police",
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" }
},
["bri"] = {
name = "BRI",
permission_level = 2,
weapons = { "WEAPON_PISTOL50", "WEAPON_STUNGUN", "WEAPON_NIGHTSTICK", "WEAPON_PUMPSHOTGUN", "WEAPON_FLAREGUN", "WEAPON_ASSAULTSMG" },
skins = { "s_m_y_swat_01", "s_m_y_swat_01" }
},
["gendarmerie"] = {
name = "Gendarmerie",
weapons = { "WEAPON_PISTOL50", "WEAPON_STUNGUN", "WEAPON_NIGHTSTICK", "WEAPON_PUMPSHOTGUN", "WEAPON_FLAREGUN" },
skins = { "s_m_y_sheriff_01", "s_m_y_sheriff_01" }
},
["csi"] = {
name = "CSI",
weapons = { "WEAPON_PISTOL50", "WEAPON_STUNGUN", "WEAPON_NIGHTSTICK", "WEAPON_PUMPSHOTGUN", "WEAPON_FLAREGUN" },
skins = { "s_m_y_hwaycop_01", "s_m_y_hwaycop_01" }
},
["bac"] = {
name = "BAC",
weapons = { "WEAPON_PISTOL50", "WEAPON_STUNGUN", "WEAPON_NIGHTSTICK", "WEAPON_PUMPSHOTGUN", "WEAPON_FLAREGUN", "WEAPON_ASSAULTSMG" },
skins = { "s_m_m_ciasec_01", "s_m_m_ciasec_01" }
},
["infirmier"] = {
name = "Infirmier",
weapons = { "WEAPON_FLAREGUN" },
skins = { "s_m_m_paramedic_01", "s_m_m_paramedic_01"}
},
["pompier"] = {
name = "Pompier",
weapons = { "WEAPON_FLAREGUN", "WEAPON_FIREEXTINGUISHER" },
skins = { "s_m_y_fireman_01", "s_m_y_fireman_01"}
}
}
And if u have the time can you help me to set a spawn position cause i still donāt understand how to respawn the player after selecting a loadout. There was a topic but it doesnāt work and give me a ton of errorsā¦
Thanks by advance
@Ruben27 Havoc explained exactly what the problem is. By default, when a user spawns, it sets their loadout to ārandomā. You removed ārandomā from LOADOUTS. You need to find the highlighted line that Havoc showed above and change where it says ārandomā to what you want the default loadout to be.
This loadout Script is AMAZING! Thank you for sharing it with the community~!
you wouldnt happen to know of any way to add a Mask to the random loadout would you?
My end goal is to hopefully add 2 or more masks to the random loadout.
Meaning, āa_m_y_skater_01ā could randomly be selected with either mask 1 or mask 2 already equipped.
can you show me an example of a how to add a random skin? like for cop
Yea, If you want I can try and add support for masks in the next update but, if you donāt want to wait then try the following:
SetPedPropIndex( GetPlayerPed(-1), 0, maskNumberHere, 0, 2) -- First 0 = Head, Second = Colour Variation, 2 = Constant
Note: Iāve not actually tested this, no guarantee that itāll work
@roboticgamer, just add more entries to the āskinā array.
i.e. For the cop:
["cop"] = {
skins = { "s_m_y_swat_01", "s_m_y_ranger_01", "csb_cop" }
}
Then the script will choose a skin at random from that list.
No I already know how to do that ok let me be more clear is when I pick a skin it randomizes the skin to like a black cop or a white cop then having the same skin. So basically I want for the skin itself to be randomized like short sleeves or long sleeves you getting what am saying?
Ah, now I get you.
There isnāt much documentation about this so, Iāll give you some links to resources you may find useful.
For changing the skintone and the likes, try here (I know youāre not creating an online character but, It may help somewhat) or here.
Note: Game.Player.Character.Handle
is the same as GetPlayerPed(-1)
(I think).
As for clothes, Iāve found this link to be very useful myself. Along with a list of cloth hashes.
Hi @Havoc really cool script here iām trying to upgrade it and link the skins with the DB but iām having some troubles with no error message and my function not working do you think you could help me out ?
how add bodyarmor in my loadout guys