Jump to content

Can't Change Player Model


Marshh
 Share

Recommended Posts

You are doing everything correctly, but the model change is detected by a game script and reverted. I think it is medium_update, but not entirely sure. A common way to solve this is to set the global that holds the model the player is supposed to have to your new model, so that the game does not detect any change. Below you can find an example from Alexander Blade's trainer. Please note that the global is outdated, however, and I doubt it works on the current version. You would find a more up to date script with the current version of look through the decompiled medium_update source yourself to locate the new global address.

 

DWORD model = GAMEPLAY::GET_HASH_KEY(const_cast<char *>(m_model.c_str()));
if (STREAMING::IS_MODEL_IN_CDIMAGE(model) && STREAMING::IS_MODEL_VALID(model))
{
    UINT64 *ptr1 = getGlobalPtr(0x28) + 0x27;
    UINT64 *ptr2 = getGlobalPtr(((DWORD)7 << 18) | 0x1890C) + 2;
    UINT64 bcp1 = *ptr1;
    UINT64 bcp2 = *ptr2;
    *ptr1 = *ptr2 = model;			
    WaitAndDraw(1000);
    Ped playerPed = PLAYER::PLAYER_PED_ID();
    PED::SET_PED_VISIBLE(playerPed, TRUE);
    if (ENTITY::GET_ENTITY_MODEL(playerPed) != model)
    {
        *ptr1 = bcp1;
        *ptr2 = bcp2;
    }
}

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...