Jump to content

[SHOW] Horse


MrZsemle

Recommended Posts

Hi everyone :P I used animations from this mod: https://www.youtube.com/watch?v=2pf10A-_rS0. I loaded the animations with EngineLoadIFP (https://wiki.multitheftauto.com/wiki/EngineLoadIFP ). I replaced a skin with this horse, and i applied this animation to the skin. If you want to make this in serverside, trigger a serverevent which contains SetPedAnimation (https://wiki.multitheftauto.com/wiki/SetPedAnimation ). This is the full cleo script, you can see the horse animations in this file: https://pastebin.com/F6kiSxBp. Bind the animation functions to keys (for example w, a, s, d). You can rotate the horse with https://wiki.multitheftauto.com/wiki/SetElementRotation

Quote

its an simple skin? or its a nice coded script?

both :P

Quote

That setElementRotation

not only.

Quote

i want create one as this but how ?

You can find the reply above

Edited by MrZsemle
Link to comment
5 hours ago, MrZsemle said:

Hi everyone :P I used animations from this mod: https://www.youtube.com/watch?v=2pf10A-_rS0. I loaded the animations with EngineLoadIFP (https://wiki.multitheftauto.com/wiki/EngineLoadIFP ). I replaced a skin with this horse, and i applied this animation to the skin. If you want to make this in serverside, trigger a serverevent which contains SetPedAnimation (https://wiki.multitheftauto.com/wiki/SetPedAnimation ). This is the full cleo script, you can see the horse animations in this file: https://pastebin.com/F6kiSxBp. Bind the animation functions to keys (for example w, a, s, d). You can rotate the horse with https://wiki.multitheftauto.com/wiki/SetElementRotation

both :P

not only.

You can find the reply above

celeo has removed 

Link to comment
24 minutes ago, MrZsemle said:

Then, this is the animation list:

BLOCK NAME: HORSE_ANIMATION

  •  HORSE_RUN
  • HORSE_IDLE_1
  • SIT_RUN
  • HORSE_SPRINT
  • HORSE_WALK
  • SIT_WALK
  • HORSE_KICK_FORWARD
  •  

i do all things and now work

but how to move the hourse

i want when i press

w he move and when i hold up 

he stop how bro ??

Link to comment
22 minutes ago, MrKAREEM said:

i do all things and now work

but how to move the hourse

i want when i press

w he move and when i hold up 

he stop how bro ??

Create a function which contains setPedAnimation, and bind this function to a key. For example:

--this is a clientside code!

-- load custom animations
local customBlockName = "HORSE_ANIMATION"
local IFP = engineLoadIFP( "horse_animations.ifp", customBlockName )

-- create horse, and bind keys
horse = createPed(id, x, y, z)
bindKey ( "w", "down", moveHorseForward )
bindKey ( "w", "up", stopHorse )

-- set default animations, and attach
function setAnimations()
setPedAnimation( horse, customBlockName, "HORSE_IDLE" )
setPedAnimation( localPlayer, customBlockName, "SIT" )
attachElements ( localPlayer, horse, x, y, z )
end
addEventHandler("onClientResourceStart", resourceRoot, setAnimations)

-- move forward, and stop
function moveHorseForward()
setPedAnimation( horse, customBlockName, "HORSE_RUN" )
setPedAnimation( localPlayer, customBlockName, "SIT_RUN" )
end

function stopHorse()
setPedAnimation( horse, customBlockName, "HORSE_IDLE" )
setPedAnimation( localPlayer, customBlockName, "SIT" )
end

 

Edited by MrZsemle
Link to comment
24 minutes ago, MrZsemle said:

Create a function which contains setPedAnimation, and bind this function to a key. For example:


--this is a clientside code!

-- load custom animations
local customBlockName = "HORSE_ANIMATION"
local IFP = engineLoadIFP( "horse_animations.ifp", customBlockName )

-- create horse, and bind keys
horse = createPed(id, x, y, z)
bindKey ( "w", "down", moveHorseForward )
bindKey ( "w", "up", stopHorse )

-- set default animations, and attach
function setAnimations()
setPedAnimation( horse, customBlockName, "HORSE_IDLE" )
setPedAnimation( localPlayer, customBlockName, "SIT" )
attachElements ( localPlayer, horse, x, y, z )
end
addEventHandler("onClientResourceStart", resourceRoot, setAnimations)

-- move forward, and stop
function moveHorseForward()
setPedAnimation( horse, customBlockName, "HORSE_RUN" )
setPedAnimation( localPlayer, customBlockName, "SIT_RUN" )
end

function stopHorse()
setPedAnimation( horse, customBlockName, "HORSE_IDLE" )
setPedAnimation( localPlayer, customBlockName, "SIT" )
end

 

thnx bro sorry but i want to know how to let the horse back ward ??

Link to comment
  • 10 months later...
  • 3 weeks later...
On 17/08/2019 at 13:59, WIRECOM said:

Any how I can get this script? It is said in the video's description that the scripts are publicly released but i couldnt find anything around the community scripting section

Hi! I'm only posted a code snippet above. The script isn't ready to release, and i don't plan to continue in the future.

Link to comment

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