[Resolved] [C#] Create a prop

What’s the correct way to spawn a prop?
I’ve tried this so far but the returned handle is always 0

  private async Task<Prop> createProp(Model model, Vector3 pos)
        {
            int hash = model.Hash;
            Function.Call(Hash.REQUEST_MODEL, hash);
            while (!Function.Call<bool>(Hash.HAS_MODEL_LOADED, hash))
            {
                await Delay(1);
            }
            int propID = Function.Call<int>(Hash.CREATE_OBJECT, hash, pos.X, pos.Y, pos.Z, true, true, true);
            CitizenFX.Core.UI.Screen.ShowNotification("handle : " + propID.ToString());
            return new Prop(propID);
        }

        Prop _item = await createProp("prop_test_elevator", _ped.Position);

Am I missing something?

createProp?

CreateObject?

function Global.CreateObject(modelHash, x, y, z, isNetwork, p5, dynamic)
	return _in(0x509D5878EB39E842, modelHash, x, y, z, isNetwork, p5, dynamic, _r, _ri)
end

it is exactly what I’m doing with int propID = Function.Call<int>(Hash.CREATE_OBJECT, hash, pos.X, pos.Y, pos.Z, true, true, true); but for some reason it doesn’t seem to be processed at all.

Prop is already an object class but it isn’t called Object to simply avoid confusion with System.Object (exactly like in SHVDN)

All right, I got it working now.
As I initially suspected it, it was not my method that didn’t work, nor the native calls.
In C#, you have to use await Task.FromResult(0); at the bottom of an async method.