local defaultHairMale = 1
local defaultHairFemale = 0
local oldHair = { item = -1, texture = -1 }
RegisterCommand("toka", function()
local playerPed = PlayerPedId()
oldHair.texture = GetPedHairColor(playerPed)
local defaultHair = defaultHairFemale
if GetEntityModel(playerPed) == 1885233650 then defaultHair = defaultHairMale end -- Erkek Model
if oldHair.item == -1 then oldHair.item = defaultHair end
if oldHair.item == defaultHair then
SetPedComponentVariation(playerPed, 2, defaultHair, 0, 0)
oldHair.item = skinData["hair"].item
else
SetPedComponentVariation(playerPed, 2, oldHair.item, 0, 0)
oldHair.item = defaultHair
end
SetPedHairColor(playerPed, oldHair.texture, oldHair.texture)
end)