Jump to content

WTF its wrong


-Doc-

Recommended Posts

Hi my code its not working. Wahts the problem :cry: . Its server side.

function setPedCorrectWalkingStyle() 
    if getElementType(source) == "player" or getElementType(source) == "ped" then 
    local walking = getElementData(source, "style.walking") 
        if walking then 
        setPedWalkingStyle(source, walking) 
        end 
    end  
end 
addEventHandler("onElementModelChange", getRootElement(), setPedCorrectWalkingStyle) 

Link to comment
Every time u cant understand me =-= . I wanna make walking style for every skin. Is this possible to make it?

Use SetPedWalkingStyle function and these are the walking style id's.

MOVE_DEFAULT    0 
MOVE_PLAYER 54 
MOVE_PLAYER_F   55 
MOVE_PLAYER_M   56 
MOVE_ROCKET 57 
MOVE_ROCKET_F   58 
MOVE_ROCKET_M   59 
MOVE_ARMED  60 
MOVE_ARMED_F    61 
MOVE_ARMED_M    62 
MOVE_BBBAT  63 
MOVE_BBBAT_F    64 
MOVE_BBBAT_M    65 
MOVE_CSAW   66 
MOVE_CSAW_F 67 
MOVE_CSAW_M 68 
MOVE_SNEAK  69 
MOVE_JETPACK    70 
MOVE_MAN    118 
MOVE_SHUFFLE    119 
MOVE_OLDMAN 120 
MOVE_GANG1  121 
MOVE_GANG2  122 
MOVE_OLDFATMAN  123 
MOVE_FATMAN 124 
MOVE_JOGGER 125 
MOVE_DRUNKMAN   126 
MOVE_BLINDMAN   127 
MOVE_SWAT   128 
MOVE_WOMAN  129 
MOVE_SHOPPING   130 
MOVE_BUSYWOMAN  131 
MOVE_SEXYWOMAN  132 
MOVE_PRO    133 
MOVE_OLDWOMAN   134 
MOVE_FATWOMAN   135 
MOVE_JOGWOMAN   136 
MOVE_OLDFATWOMAN    137 
MOVE_SKATE  138 

Link to comment
Every time u cant understand me =-= . I wanna make walking style for every skin. Is this possible to make it?

If you want male walking styles and girl walking styles, then this should work. (Untested)

maleskins = {put male skins here separated by comma} 
girlskins = {put girl skins here separated by comma} 
  
malewalkingstyle = writehere 
girlwalkingstyle = writehere 
  
function onChangeSkin() 
local skin = getElementModel(source) 
if skin == maleskins then 
setPedWalkingStyle(source, malewalkingstyle) 
elseif skin == girlskins then 
setPedWalkingStyle(source, girlwalkingstyle) 
end 
end 
addEventHandler("onElementModelChange", root, onChangeSkin) 

If you want walking style for every skin, then keep repeating elsief for all skins. (Untested)

function onChangeSkin() 
local skin = getElementModel(source) 
if skin == skinid then 
setPedWalkingStyle(source, walkingstyleid) 
elseif skin == skinid then 
setPedWalkingStyle(source, walkingstyleid) 
end 
end 
addEventHandler("onElementModelChange", root, onChangeSkin) 

Link to comment
  • 3 weeks later...
Every time u cant understand me =-= . I wanna make walking style for every skin. Is this possible to make it?

Blue, no offense, but you really need to explain your problem better if you want other people help you on your scripting, and dont accuse them not understanding your question

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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