Alexander's ScriptHook:
char* hmodel = "A_C_Horse_TennesseeWalker_Chestnut";
DWORD model = GAMEPLAY::GET_HASH_KEY(hmodel);
if (STREAMING::IS_MODEL_IN_CDIMAGE(model) && STREAMING::IS_MODEL_VALID(model))
{
STREAMING::REQUEST_MODEL(model, FALSE);
while (!STREAMING::HAS_MODEL_LOADED(model))
WaitAndDraw(0); // WAIT(0);
Vector3 coords = ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(PLAYER::PLAYER_PED_ID(), 0.0, 3.0, -0.3);
Ped ped = PED::CREATE_PED(model, coords.x, coords.y, coords.z, static_cast<float>(rand() % 360), 0, 0, 0, 0);
PED::SET_PED_VISIBLE(ped, TRUE);
ENTITY::SET_PED_AS_NO_LONGER_NEEDED(&ped);
STREAMING::SET_MODEL_AS_NO_LONGER_NEEDED(model);
}
@LMS how use DISPLAY_ONSCREEN_KEYBOARD and GET_ONSCREEN_KEYBOARD_RESULT to set the char* hmodel, please?
I can't find a way to make it work. Ty!!!!