Yes kind of .. no error in my debugscript...
other server also have
Thats my code:
function applyStyle(leaf)
if type(leaf) ~= 'table' then
leaf = getSelectedGridListLeaf(wndWalking, 'style')
if not leaf then
return
end
end
server.setPedWalkingStyle(g_Me, true)
end
function stopStyle()
server.setPedWalkingStyle(g_Me, false)
end
wndWalking = {
'wnd',
text = 'Walking',
width = 240,
x = -25,
y = 0.3,
controls = {
{
'lst',
id='style',
width=230,
height=290,
columns={
{text='Walking', attr='name'}
},
rows={xml='walking.xml', attrs={'name'}},
expandlastlevel=false,
onitemdoubleclick=applyStyle
},
{'btn', id='set', onclick=applyStyle},
{'btn', id='stop', onclick=stopStyle},
{'btn', id='close', closeswindow=true}
}
}
addCommandHandler('style',
function(command, lib, name)
server.setPedWalkingStyle(g_Me, true)
end
)