Chupakabra549 Posted July 18, 2013 Share Posted July 18, 2013 I want to make animation for player, who will seat on Moto function getPedAnimation(ped, thePed) -- The Command Function if thePlayer then -- If a player name entered then thePlayerToCopyFrom = addHelmetOnEnter -- get player from his name CLO_Pose_Hat, Anim = getPedAnimation(thePlayerToCopyFrom) -- get the player animation if CLO_Pose_Hat then -- if got the animation successfully then setPedAnimation(localPlayer, CLO_Pose_Hat, Anim) -- set my animation the same outputChatBox("* Copied Successfully !") -- output chat message end else outputChatBox("* Please Enter a Player Name To Copy From !") -- if you didnt entered a player name , then output a chat box message end end addCommandHandler("copyanim", CopyAnimation) -- adding the Command Handler addEventHandler ( "onVehicleStartEnter", getRootElement(), enterVehicle ) --add an event handler for onVehicleStartEnter function addHelmetOnEnter ( thePlayer, seat, jacked ) if ( getElementModel ( source ) == 522 ) then -- if its a nrg addPedClothes ( thePlayer, "moto", "moto", 16 ) -- add the helmet end end addEventHandler ( "onVehicleEnter", getRootElement(), addHelmetOnEnter ) function removeHelmetOnExit ( thePlayer, seat, jacked ) if ( getElementModel ( source ) == 522 ) then -- if its a nrg removePedClothes ( thePlayer, 16 ) -- remove the helmet end end addEventHandler ( "onVehicleExit", getRootElement(), removeHelmetOnExit ) Link to comment
Castillo Posted July 18, 2013 Share Posted July 18, 2013 getPedAnimation is a client side only function, and your script is server side. 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