[Include] GetObjectOffset!
#1

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:
  • 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)
External:
  • 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)
Definitions:
  • #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)
Download: GitHub
Reply


Messages In This Thread
GetObjectOffset! - by Abagail - 10.02.2018, 20:46
Re: GetObjectOffset! - by RogueDrifter - 10.02.2018, 20:54
Re: GetObjectOffset! - by Eoussama - 10.02.2018, 22:25
Re: GetObjectOffset! - by NaS - 12.02.2018, 12:06
Re: GetObjectOffset! - by Abagail - 17.02.2018, 16:05
Re: GetObjectOffset! - by Abagail - 14.02.2019, 21:14
Re: GetObjectOffset! - by Pottus - 14.02.2019, 22:11
Re: GetObjectOffset! - by IllidanS4 - 14.02.2019, 23:23
Re: GetObjectOffset! - by Pottus - 14.02.2019, 23:49

Forum Jump:


Users browsing this thread: 1 Guest(s)