local shader = dxCreateShader("shader.fx", 0, 0, true, "ped")
local avaliableClothes = {
{"cj_ped_torso", "1.png"},
{"cj_ped_torso", "2.png"},
{"cj_ped_torso", "3.png"},
{"cj_ped_torso", "4.png"}
-- vector 1 = tex name, vector 2 = tex file
}
function createClothes(id)
local clothes = getAvaliableClothes()
local texture = dxCreateTexture(clothes[id][2])
if (id) then
if (clothes[id]) then
engineApplyShaderToWorldTexture(shader, clothes[id][1])
dxSetShaderValue(shader, "Tex0", texture)
outputChatBox("creating shader")
else
outputChatBox("invalid id")
end
else
outputChatBox("please provied an id")
end
end