Jump to content
  • 0

Walking style (need help!)


Soultaker17

Question

Posted

Hello! Our team is working on machinima project. So we are ready to start but one problem. Men and women have same walking style animations and it looks abnormal. I tried to solve this problem by creating a script and it works. I can see that animation changed but other players don't see that. It's a big problem for us and we really need help. How can I change walking style for all players on server?

P.S. Sorry for my bad english

7 answers to this question

Recommended Posts

  • 0
Posted
Use it server side instead of client.

How can I do it? I'm newbie in scripting.

Now I have resource with a .lua script inside with this code

addCommandHandler ( "drunk", 
    function ( player ) 
        setPedWalkingStyle ( player, 126 ) 
    end 
) 

I installed this resource into "MTA San Andreas\server\mods\deathmatch\resources" folder

And It works. When I type "/drunk" in chat my animation changes but other players can't see it. How can I fix it?

  • 0
Posted
Can you post the meta.xml file?

<meta> 
  
    <info author="Mr.X001" name="Walking Style" version="1.3.1" type="misc" /> 
    <script src="walking.lua" type="server" /> 
    <config src="help.xml" type="client" /> 
</meta> 

  • 0
  • MTA Team
Posted

It seems this is a bug for players joining after you have set the walking style.

A hacky work around would be:

Server:

addCommandHandler ( "drunk", 
    function ( player ) 
        setPedWalkingStyle ( player, 126 ) 
        setElementData( player, "walking_style_hack", 126 ) 
    end 
) 

Client:

addEventHandler ( "onClientResourceStart", resourceRoot, 
    function () 
        for _,player in ipairs( getElementsByType("player") ) do 
            local style = getElementData( player, "walking_style_hack" ) 
            if style then 
                setPedWalkingStyle ( player, style ) 
            end 
        end      
    end 
) 

  • 0
Posted

ccw

What should I write in meta.xml file?

When I start server it says something about "walking" resource but my english level is low and I can't understand that. What should I upgrade?

g3OiyzT.png

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