⁉️como usar ( exemplos )
Acompanhe abaixo as nossas exports juntamente com exemplos de funcionamento e as instruções precisas para realizar a exportação de forma correta.
Exemplos de utilização: ( aplicar roupa )
addCommandHandler( 'setclothe', function( player, cmd, bodyPart, clotheType, textureType, shared, margeFace )
if not bodyPart and not clotheType and not textureType then
return print( 'digite /'..cmd..' + bodyPart + clotheType + textureType' )
end
local custom = exports['[HS]Custom_Clothes']
local clothes = custom:getClothesPlayer( player )
if not clothes then
print( 'Você não possui registro, dê reconnect.' )
return
end
local gender = custom:getPlayerGender( player )
custom:setClothesPlayer( player, getElementsByType( 'player' ), {
bodyPart = bodyPart,
clotheType = clotheType,
textureType = tonumber( textureType ),
shared = shared,
margeFace = margeFace,
gender = gender
} )
print( 'Roupa '..clotheType..' aplicada com sucesso.' )
end)Observação: para remover a peça de roupa, altere apenas o argumento textureType para 0.
Useitem para inventário:
O exemplo abaixo foi desenvolvido no inventário (v1) da Hyper Scripts, mas a lógica pode ser aplicada da mesma forma em qualquer outro sistema de inventário.
Config do item ( Hyper_G.lua ):
Useitem ( use_item.lua ):
Last updated