Here is my initial commit to my skin blocker resource. This means a developer can restrict the clothing a ped is wearing depending on their server style as well as restrict items to specific jobs such as the police belts.
The script will check for the restricted items depending on the Citizen.Wait in milliseconds.
I am aiming to make this cleaner and more effective to use on servers as the script at the moment is very unoptimized and lengthy. Ill be updating it in time.
If you want to contribute to this please open an issue on the GitHub and let me know. Please dont reply to this post with LUA snippets as it just gets confusing.
Obviously I created this script with some help. I’m not going to take full credit and my original help post can be found here:
Installation:
Down the resource from this GitHub and drag into resources folder. Add “start esx_skinblocker” to server.cfg. Configure to your liking!
I love you <3
Unfortunately, I did not have the knowledge and the time to do something like that myself. Thank you, I will as soon as I have time of course try and then give a feedback.
Unfortunately it blocks LSPD clothing from LSPD officers when they are clocked in. Issue seems sporadic and can be fixed by a manual restart of the script.
Unreliable for now, for us, unfortunately. Definitely wish it worked, otherwise was great!
Hello when i add a piece to script,
then its still ind the shop, when i buy it,
it says you may not wear police equipment,
but it dosent remove it from my ped or anything
I can get it working for police and ambulance jobs. But not my gang job. I did everything similar, idk why it’s not working. The job title i have listed in my jobs database is soamc but for some reason, this isn’t detecting the job…
Citizen.CreateThread(function()
while true do
Citizen.Wait(10000)
TriggerEvent('skinchanger:getSkin', function(skin)
if PlayerData.job ~= nil and PlayerData.job.name ~= 'soamc' then
if skin.bproof_1 == 10 then
TriggerEvent('skinchanger:loadClothes', skin, removeVest)
ESX.ShowNotification("Server: You may not wear the SOA MC cut!")
end
if skin.bproof_1 == 11 then
TriggerEvent('skinchanger:loadClothes', skin, removeVest)
ESX.ShowNotification("Server: You may not wear the SOA MC cut!")
end
end
end)
end
end)
EDIT: Also, just noticed I’m having the same problem with the clothes being removed from police…
The idea is good but it doesn’t work properly.
There is no definition of whether it is a man or a woman.
Here object 10 & 11 is blocked for both men and women.