Jump to content

Add Button Walking with functions to f1 panel


yoya99

Recommended Posts

Helli guys i need your help ...i want that players can select their walking style via the f1 freeroam panel....i createt the button ...no problems...then when i cluck on the button all the walking styles lare opening...but when i want to click set nothing happens....walking style is not set....ps:i createt all into the fr_client.lua

Thx for helping answers

Link to comment
Helli guys i need your help ...i want that players can select their walking style via the f1 freeroam panel....i createt the button ...no problems...then when i cluck on the button all the walking styles lare opening...but when i want to click set nothing happens....walking style is not set....ps:i createt all into the fr_client.lua

Thx for helping answers

The one Grafuroam has?

Link to comment

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 
) 

Link to comment

Spider is copying grafuroam, maxim is copying spider...

You will never learn guys, since you are still trying to copy a successful server then you dont have a life or a price.

Learn scripting and make a creative server from your mind, not stealing other people's ideas.

Link to comment
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...