Jump to content

[SOLVED] Can't set animation to Ped


HeK

Recommended Posts

Posted (edited)

I have been trying a lot of coding from the wiki and no success. I wanna set an "DEALER_IDLE" animation to the ped but no success, he just stands there.

function weapondealer1() 
    weapondealer1 = createPed ( 28, 1604.3000488281, -1721.0999755859, 6.3000001907349 ) 
    setPedAnimation ( weapondealer1, "DEALER", "DEALER_IDLE" ) 
    end 
     
addEventHandler ("onResourceStart", resourceRoot, weapondealer1) 

Edited by Guest

Zero is a number too.

Posted
function weapondealer1() 
    weapondealer1 = createPed ( 28, 1604.3000488281, -1721.0999755859, 6.3000001907349 ) 
    setTimer(setPedAnimation, 1000, 1, weapondealer1, "DEALER", "DEALER_IDLE" ) 
    end 
addEventHandler ("onResourceStart", resourceRoot, weapondealer1) 

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

Thanks it worked, But how do i make him in "god mode" or never dies and never gets moved?

- Happy New Year -

Zero is a number too.

Posted
setElementFrozen -- To froze the ped. 

I would set a element data to the ped, then check it onClientPedDamage and cancel it.

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

I tried that with "(weapondealer1, frozen) and without that. I think it's not working because he is doing the "DEALER_IDLE" animation and moving to the sides a little by steps..

EDIT: i fixed it by doing:

setElementFrozen ( weapondealer1, true ) 

Zero is a number too.

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