Jump to content

Alternative for getPedWalkingStyle


..:D&G:..

Recommended Posts

I added those functions into my code, but it still doesn't change my walking style:

elseif (source) then 
            outputChatBox("on." source) 
            setPedWalkingStyle(source, 138) 
        if getPedWalkingStyle(source) then 
            outputChatBox("off." source) 
            setPedWalkingStyle(source, 0) 
        end 

Link to comment
elseif (source) then 
        if getPedWalkingStyle(source) ~= 138 then 
            outputChatBox("on.", source) 
            setPedWalkingStyle(source, 138) 
        else 
            outputChatBox("off." ,source) 
            setPedWalkingStyle(source, 0) 
        end 

Link to comment

You can store the info of the walking style on a data, e.g setAccountData.

  
function putWalkingStyle(player,_,number) 
if tonumber(number) == nil then return end 
setPedWalkingStyle(player,138) 
setAccountData(getPlayerAccount(player),"WalkingStyle",tonumber(number)) 
else 
outputChatBox("Syntax: /walkstyle ",player,255,0,0) 
end 
end  
addCommandHandler("walkstyle",putWalkingStyle) 
function WhatsMyWalkingStyle(player) 
if getAccountData(getPlayerAccount(player),"WalkingStyle") ~= false then 
outputChatBox("Your walking style is: "..getAccountData(getPlayerAccount(player),"WalkingStyle",player) 
else 
outputChatBox("You don't have a walking style, use /walkstyle ",player,255,0,0) 
end 
end 
addCommandHandler("whatsmywalkstyle",WhatsMyWalkingStyle) 
  

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...