Here is the code:
load object "models/player.x",1
load image "textures/player/body_d.dds",1
load image "textures/player/body_n.dds",2
load image "textures/player/boots_d.dds",3
load image "textures/player/boots_n.dds",4
load image "textures/player/eye.dds",5
load image "textures/player/pads_d.dds",6
load image "textures/player/pads_n.dds",7
load image "textures/player/teeth_d.dds",8
load image "textures/player/teeth_n.dds",9
load image "textures/player/torso_d.dds",10
load image "textures/player/torso_n.dds",11
body#=0
torso#=1
if get limb by name(1,"body")
texture limb 1,body,0,1
texture limb 1,body,1,2
endif
if get limb by name(1,"torso")
texture limb 1,torso,0,10
texture limb 1,torso,1,11
endif
position object 1,0,0,0
rotate object 1,90,0,180
make light 1
color light 1,255,255,255
set light range 1,500
remstart
load effect "shaders/Bumpmapping.fx",1,0
set object effect 1,1
set effect technique 1,"lighting8"
remend
Now what i want is to find a way of texturing this character model
with these textures, but there is the problem of finding limbs and texturing limbs. This way works but this is time consuming I want to make the game that will know how to find limb number and names and paste right textures on them.