Quote:Code:void AttachMurderer(Hash model)
{
int onped = PLAYER::GET_PLAYER_PED(selectedPlayer);
Vector3 pedcoords = ENTITY::GET_ENTITY_COORDS(onped, true);
int head65 = PED::GET_PED_BONE_INDEX(PLAYER::GET_PLAYER_PED(PLAYER::PLAYER_ID()), 31086);
int PedHash = (model);
if (STREAMING::IS_MODEL_IN_CDIMAGE(PedHash))
{
if (STREAMING::IS_MODEL_VALID(PedHash))
{
STREAMING::REQUEST_MODEL(PedHash);
if (STREAMING::HAS_MODEL_LOADED(PedHash))
{
int ped = PED::CREATE_PED(21, PedHash, pedcoords.x, pedcoords.y, pedcoords.z, 0.0f, true, false);
ENTITY::ATTACH_ENTITY_TO_ENTITY(ped, onped, head65, pedcoords.x, pedcoords.y, pedcoords.z, 0.0f, 0.0f, 0.0f, true, true, true, false, 1, false);
ENTITY::ATTACH_ENTITY_TO_ENTITY_PHYSICALLY(ped, onped, pedcoords.x, pedcoords.y, pedcoords.x, pedcoords.y, pedcoords.z, pedcoords.x, pedcoords.y, pedcoords.z, 0.0f, 0.0f, 0.0f, true, true, true, false, true, true);
ENTITY::SET_ENTITY_PROOFS(ped, true, true, true, false, true, true, true, true);
WEAPON::GIVE_DELAYED_WEAPON_TO_PED(ped, 0x63AB0442, 9999, true);
WEAPON::SET_PED_INFINITE_AMMO_CLIP(ped, true);
AI::TASK_SHOOT_AT_ENTITY(ped, onped, 5000, 0xC6EE6B4C);
NETWORK::NETWORK_REQUEST_CONTROL_OF_ENTITY(ped);
}
}
}
}
This is what i've gotten so far. It spawns the ped on the player coords BUT it will not attach. what am I missing?