Skip to content

Commit

Permalink
added walk styles (Freeroam)
Browse files Browse the repository at this point in the history
  • Loading branch information
shadylua authored Nov 22, 2024
1 parent 1ff08f9 commit 4a18d75
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions [gameplay]/freeroam/fr_client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -875,6 +875,45 @@ wndStats = {
},
oncreate = initStats
}
---------------------------
-- Walk Style
---------------------------
function applyWalkStyle( leaf )
if type( leaf ) ~= 'table' then
leaf = getSelectedGridListLeaf( wndWalking, 'walkStyle' )
if not leaf then
return
end
end
server.setPedWalkingStyle(localPlayer, leaf.id)
end

function stopWalkStyle()
server.setPedWalkingStyle(localPlayer, 0)
end

wndWalking = {
'wnd',
text = 'Walk Styles',
width = 250,
controls = {
{
'lst',
id = 'walkStyle',
width = 230,
height = 290,
columns = {
{ text = 'Styles', attr = 'name' }
},
rows = { xml = 'data/walk.xml', attrs = { 'id', 'name' } },
onitemdoubleclick = applyWalkStyle
},
{ 'btn', id = 'Apply', onclick = applyWalkStyle, width = 70 },
{ 'btn', id = 'Remove', onclick = stopWalkStyle, width = 70 },
{ 'btn', id = 'Close', closeswindow = true, width = 70 }
}
}


---------------------------
-- Bookmarks window
Expand Down Expand Up @@ -2175,6 +2214,7 @@ wndMain = {
{'btn', id='playergrav', text='grav', window=wndGravity},
{'btn', id='warp', window=wndWarp},
{'btn', id='stats', window=wndStats},
{'btn', id='walks', window=wndWalking},
{'btn', id='bookmarks', window=wndBookmarks},
{'br'},

Expand Down

0 comments on commit 4a18d75

Please sign in to comment.