WaypointRP / wp-placeables

Waypoint Placeables - Framework for placing/picking up props in the world
GNU General Public License v3.0
59 stars 21 forks source link

expected options to have type 'array' (received mixed table) - when using ox_target #10

Closed ayatollah closed 11 months ago

ayatollah commented 11 months ago

Hi, the code for using ox_target is not quite right. For it to work with ox_target, the options-variable in placebales.lua row 329 needs to be removed and replaced with only targetOptions, as well as the distance-variable needs to be removed :) Oh! One more thing, you also need to remove the table-brackets for this. so the code should be: AddTargetModel(prop.model, targetOptions)

BackSH00TER commented 11 months ago

Hi @ayatollah, are you on the latest version of wp-placeables v1.0.6?

This issue should be fixed with this commit: https://github.com/WaypointRP/wp-placeables/commit/f8d4f076cd5b5e885f50039393b31539e23f3995

Framework specific changes are made in the framework.lua file, rather than in the main code itself, unless otherwise necessary. But yes your comments are correct that the issue is that we need to just pass the targetOptions and distance is added per option rather than as an additional argument as qb-target does.

BackSH00TER commented 11 months ago

Closing this, the above commit fixes it