Jump to content

Help- Ped Animation [Solved]


Mateo_Strahm

Recommended Posts

Posted (edited)

I write this script but when I start server and write command /peds, ped doesn't create...please tell me where is code wrong

function makePed() 
    local ped1 = createPed(299, -1629, -167.89999389648, 17.60000038147) 
    setPedAnimation( ped1, "DANCING", "dnce_M_c") 
end 
addCommandHandler ( "peds", makeped ) 

Edited by Guest
Posted (edited)
function makePed( ) 
    local ped1 = createPed( 299, -1629, -167.89999389648, 17.60000038147 ) 
    setTimer( setPedAnimation, 50, 1, ped1, "DANCING", "dnce_M_c" ) 
end 
addCommandHandler ( "peds", makePed ) 

Edited by Guest

╔═╦╦╦╗╔╦═╦═╦═╦═╦╦╦╦╦╦╦═╦╦╦╦╗

║║║║║╠╝║║╚╣║║║║║║║║║║║║║║║║║

║║║║║╚╦╦═╦╦╦╦╣║║║║║║║║║║║║║║

║║║║╠═╣╠╝╔══╝║║║║║╟╢║║║║║╟╢║

╚╩══╩══╩═╩═══╩╩══╩╩═╩╩╩═╩╩═╝

«سبحانك اللهم وبحمدك أشهد أن لا إله إلا أنت أستغفرك وأتوب إليك»

M7mdAl7arthy : لتواصل سكايب

Posted

You should try the command debugscript 3 to see every error that Lua interface will report you. This going to help us (and you) to find the mistake.

I bet that you should write "makeped" exactly how is your function name is (with uppercase in P), because addCommandHandler is case sensitive by default. So the correct is:

function makePed() 
    local ped1 = createPed(299, -1629, -167.89999389648, 17.60000038147) 
    setPedAnimation( ped1, "DANCING", "dnce_M_c") 
end 
addCommandHandler ( "peds", makePed ) 
  

RaceXtreme

Posted
I need that ped all-time do animation... This create ped but he doesn't have animation

try this:

setPedAnimation( ped1, "DANCING", "dnce_M_c",-1,true,false,false) 

Owner of [HUN]Magyar Play Szerver 1.4, IP: 31.220.43.153:22003

Posted
function makePed() 
    local ped1 = createPed(299, -1629, -167.89999389648, 17.60000038147) 
    setPedAnimation( ped1, "DANCING", "dnce_M_c",-1,true,false,false) 
end 
addCommandHandler ( "peds", makePed ) 

I tried it, it's working for me...

Owner of [HUN]Magyar Play Szerver 1.4, IP: 31.220.43.153:22003

Posted

Maybe somewhere else is a problem in your script... And is everything in your meta.xml correct?

Owner of [HUN]Magyar Play Szerver 1.4, IP: 31.220.43.153:22003

Posted
function makePed ( ) 
    local ped1 = createPed(299, -1629, -167.89999389648, 17.60000038147) 
    setPedAnimation( ped1, "DANCING", "dnce_M_c",-1,true,false,false) 
    if ( ped1 ) then 
        outputChatBox ( "PED WAS CREATED!" ) 
    end 
end 
addCommandHandler ( "peds", makePed ) 

Try that and see if it says "PED WAS CREATED" on your chat.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Are you sure that the resource is actually started? see if this says that it was executed:

function makePed ( ) 
    outputChatBox ( "Command executed!" ) 
    local ped1 = createPed(299, -1629, -167.89999389648, 17.60000038147) 
    setPedAnimation( ped1, "DANCING", "dnce_M_c",-1,true,false,false) 
end 
addCommandHandler ( "peds", makePed ) 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

That's right, this line:

"peds.lua" dimension="0">

Should be:


San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

You're welcome.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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