Black2 Posted January 14, 2016 Share Posted January 14, 2016 Hello mates,I have a problem here. I want the ped be frozen but the rotation does not apply to ped if it is frozen and kill him he still stands how i can fix it ?,Thx. function pedLoad () Ped1 = createPed ( 83, 2353, 2143, 11 ) setTimer(setPedRotation,5000,1,Ped1,270 ) setTimer(setPedAnimation,5000,1,Ped1,"DANCING","DAN_Right_A",-1,true,true,false,true ) setPedFrozen ( Ped1, true ) end addEventHandler ( "onResourceStart", getRootElement(), pedLoad ) Link to comment
ALw7sH Posted January 14, 2016 Share Posted January 14, 2016 Why you're setting the ped rotation with timer, is that necessary? if it is then unfreeze the ped change the rotation and freeze him again Link to comment
Enargy, Posted January 14, 2016 Share Posted January 14, 2016 This function is deprecated. This means that its use is discouraged and that it might not exist in future versions.Please use setElementRotationinstead. Link to comment
Mega9 Posted January 14, 2016 Share Posted January 14, 2016 This function is deprecated. This means that its use is discouraged and that it might not exist in future versions.Please use setElementRotationinstead. In addition to this, setPedFrozen is also deprecated, so use setElementFrozen instead. Also, createPed already has rotation argument: Link to comment
Black2 Posted January 14, 2016 Author Share Posted January 14, 2016 i packed,but he still does not give rotation if frozen and if addEventHandler ( "onResourceStart", getRootElement(), pedLoad ) the ped not run the animation function pedLoad () ped1 = createPed ( 83, 2353, 2143, 11, 90 ) setPedAnimation ( ped1,"DANCING","DAN_Right_A", -1, true, true, false, true ) setElementFrozen ( ped1, true ) end addEventHandler ( "onResourceStart", getRootElement(), pedLoad ) Link to comment
AMARANT Posted January 14, 2016 Share Posted January 14, 2016 That happens because you didn't set the right Z coordiante. Your ped needs to be on the gorund in order the rotation to be set correctly. Calculate the exact Z coordinate of the place where you need to create the ped. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now