Posted July 15Jul 15 Hello! I'm very new to modding and programming in general.I'm trying to make a spawned ped automatically mount my horse when I mount up. However, I can't seem to get it to work properly. The ped just stands there and does nothing. Sometimes, they mount the horse only after I dismount.Here's the code I'm using:Ped playerPed = PLAYER::PLAYER_PED_ID(); if (PED::IS_PED_ON_MOUNT(playerPed)) { Entity playerHorse = PED::GET_MOUNT(playerPed); if (companionPed && ENTITY::DOES_ENTITY_EXIST(companionPed) && !ENTITY::IS_ENTITY_DEAD(companionPed)) { if (!PED::IS_PED_ON_MOUNT(companionPed) || PED::GET_MOUNT(companionPed) != playerHorse) { TASK::CLEAR_PED_TASKS(companionPed, false, false); TASK::TASK_MOUNT_ANIMAL(companionPed, playerHorse, -1, 0, 2.0f, 0, 0, 0); PED::SET_PED_KEEP_TASK(companionPed, true); } } }I also tried setting the seat index to 1, but it didn’t work either.If anyone can help me figure out what I’m doing wrong, I’d really appreciate it!
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.