mirror of
https://github.com/APercy/airutils.git
synced 2025-03-21 18:41:21 +00:00
fix
This commit is contained in:
parent
55baf3de07
commit
b639722326
1 changed files with 5 additions and 2 deletions
|
@ -29,6 +29,8 @@ function airutils.set_player_skin(player, skin)
|
||||||
texture = texture[1]
|
texture = texture[1]
|
||||||
if skinsdb_mod_path then
|
if skinsdb_mod_path then
|
||||||
texture = "character.png"
|
texture = "character.png"
|
||||||
|
--local skdb_skin = skins.get_player_skin(player)
|
||||||
|
--texture = texture.."^"..skdb_skin._texture
|
||||||
end
|
end
|
||||||
|
|
||||||
if player:get_attribute(backup) == nil or player:get_attribute(backup) == "" then
|
if player:get_attribute(backup) == nil or player:get_attribute(backup) == "" then
|
||||||
|
@ -42,14 +44,14 @@ function airutils.set_player_skin(player, skin)
|
||||||
if skinsdb_mod_path then
|
if skinsdb_mod_path then
|
||||||
player:set_properties({
|
player:set_properties({
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
visual_size = {x=1, y=1},
|
visual_size = {x=0.95, y=1},
|
||||||
mesh = "character.b3d",
|
mesh = "character.b3d",
|
||||||
textures = {texture},
|
textures = {texture},
|
||||||
})
|
})
|
||||||
else
|
else
|
||||||
set_player_textures(player, { texture })
|
set_player_textures(player, { texture })
|
||||||
|
player:set_attribute(curr_skin, texture)
|
||||||
end
|
end
|
||||||
player:set_attribute(curr_skin, texture)
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
local old_texture = player:get_attribute(backup)
|
local old_texture = player:get_attribute(backup)
|
||||||
|
@ -79,6 +81,7 @@ function airutils.set_player_skin(player, skin)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
player:set_attribute(backup, nil)
|
player:set_attribute(backup, nil)
|
||||||
|
player:set_attribute(curr_skin, nil)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue