10.02.2018, 20:46
This is a rewritten version of my old GetObjectOffset include. This should be more: optimized, user friendly, accurate. Unlike the old version, the two main functions are merged between regular & dynamic objects. For now, streamer must be accessible as an include. It will attempt to include and if the CreateDynamicObject function can not be found, give a compiler error. If dynamic functions aren't used, streamer won't need to run as a plugin. Simple, right?
Pull requests are welcome if you have something to contribute. At this time, rotation offsets aren't supported.
Functions:
Internal:
Pull requests are welcome if you have something to contribute. At this time, rotation offsets aren't supported.
Functions:
Internal:
- static stock GetPosOffset(Float: p_p_x, Float: p_p_y, Float: p_p_z, Float: p_c_x, Float: p_c_y, Float: p_c_z, &Float:p_n_x, &Float:p_n_y, &Float: p_n_z)
- stock IsObjectInRangeOfPlayer(playerid, bool: isdynamic, objectid, Float: radius)
- stock GetObjectOffsetFromPoint(objectid, bool: isdynamic, Float: cur_x, Float: cur_y, Float: cur_z, &Float: ret_x, &Float: ret_y, &Float: ret_z)
- stock GetObjectOffset(objectid, bool: isdynamic, extratype, extraid, &Float: obj_off_ret_x, &Float: obj_off_ret_y, &Float: obj_off_ret_z)
- #define OBJECT_EXTRA_TYPE_NONE (0)
- #define OBJECT_EXTRA_TYPE_PLAYER (1)
- #define OBJECT_EXTRA_TYPE_VEHICLE (2)
- #define OBJECT_EXTRA_TYPE_OBJECT (3)
- #define OBJECT_EXTRA_TYPE_DYNAMIC_OBJECT (4)