GetClosestObjectOfType Issues?

RegisterCommand(‘object’, function(source, args, rawCommand)
local prop2 = GetClosestObjectOfType(GetEntityCoords(aPlayerPedId()), 1000.0, GetHashKey(prop_palm_fan_03_b), false, false, false)
local prop1 = GetClosestObjectOfType(GetEntityCoords(PlayerPedId()), 100.0, GetHashKey(prop_plant _group_02), false, false, false)
print(prop1)
print(prop2)
local NEWE = GetClosestObjectOfType(257.16, 219.51, 106.29, 50.01, GetHashKey(v_5_btable1), 0,0,0)
print(NEWE … ’ : ')
end, false)

I can change that GetHashKey() to any prop and go near it. It always returns 0. Am I doing something wrong? I have tried many different ways to get it to work… All return 0 (false).

Hey is ur prop u trying to find not Mission entity?

1 Like

I am not sure I am trying to find bank vault doors. I dont remember it being so bad last time i did this lol. specifically v_ilev_bk_gate that gate

I was getting the wrong prop id… Can we close/delete this thread as it was just a mistake on my part.