then having this code TriggerServerEvent("weaponshop:playerSpawned","")
at the end of the ChangeSkin function in client.lua should do the trick, it’s in the last version i think
No waayyyyyyyyyy!!! :’( :’(
So I’m in a big big issue
I hope you’ll understand where this come from ^^ because I have the thirds version but nothing between it and the last one.
the other version you’ve got works fine ?
Nop, when I load the skin I loose the gun.
as i said add TriggerServerEvent("weaponshop:playerSpawned","")
at the end of the ChangeSkin function in client.lua
function SendSkin(skin)
TriggerServerEvent(“skin_customization:ChoosenSkin”,skin)
TriggerServerEvent(“weaponshop:playerSpawned”,"")
end
Like this? It does not work for me.
Alright, I try that!
Also, where can I change the button to open the menu? I would like to attribute another key which is unused such as “h” or “l”.
@Lynton69 in the ChangeSkin function
function ChangeSkin(skin,components)
--Menu.hidden = true
-- Get model hash.
local modelhashed = GetHashKey(skin)
-- Request the model, and wait further triggering untill fully loaded.
RequestModel(modelhashed)
while not HasModelLoaded(modelhashed) do
RequestModel(modelhashed)
Citizen.Wait(0)
end
-- Set playermodel.
SetPlayerModel(PlayerId(), modelhashed)
if components == nil then
local playerPed = GetPlayerPed(-1)
--SET_PED_COMPONENT_VARIATION(Ped ped, int componentId, int drawableId, int textureId, int paletteId)
--SetPedComponentVariation(playerPed, 0, 0, 0, 2) --Face
--SetPedComponentVariation(playerPed, 2, 11, 4, 2) --Hair
--SetPedComponentVariation(playerPed, 4, 1, 5, 2) -- Pantalon
--SetPedComponentVariation(playerPed, 6, 1, 0, 2) -- Shoes
--SetPedComponentVariation(playerPed, 11, 7, 2, 2) -- Jacket
TriggerServerEvent("skin_customization:ChoosenComponents")
end
local a = "" -- nil doesnt work
TriggerServerEvent("weaponshop:playerSpawned",a)
TriggerServerEvent("item:getItems")
SetModelAsNoLongerNeeded(modelhashed)
end
@golivrob if IsControlJustPressed(1, 289) then
change the 289 value with the value of the key you want
Thank you my friend it works.
Thanks, I find that a few moments later.
I don’t get it, I know have again the issue:
Quiete non-understandable --’
Ok i’m pretty you have the wrong sql file
If this is it, it means your sql is not the good one is you last update. Let’s give try from scratch
I know what it is, delete the row in outfits
With the es script, when the players are going cop they are all the same. Did this script allow police man to save the civilian caracter ? Sorry baguette
Exactly the same problem
ok i know where it comes from i’ll fix it
Yes I delete it and reup the sql?
@Ked When i connect to my server, i’m creating a caracter and i do /job police 1 my player become a hairless bulldog cop so i want to know if this script save the civilian caracter cutomization (hair,color,…) when i connect in cop. Thx my baguette