samp-streamer-plugin icon indicating copy to clipboard operation
samp-streamer-plugin copied to clipboard

AttachDynamicObjectToPlayer

Open NexiusTailer opened this issue 3 years ago • 1 comments

AttachDynamicObjectToPlayer was done like AttachDynamicObjectToObject, but seems it wasn't tested enough like the second function

First of all, there is a mistake in the error messages: https://github.com/samp-incognito/samp-streamer-plugin/blob/49f9f165ebb017405d5e3dfdcd07d6f3c21bf172/src/natives/objects.cpp#L415 (must be "AttachDynamicObjectToPlayer: YSF plugin (a version having the AttachPlayerObjectToPlayer function) must be loaded to attach objects to players.")

Secondly (the main reason why this issue created), base native is disabled in YSF now: https://github.com/IllidanS4/YSF/blob/master/sampsvr_files/pawno/include/YSF.inc#L278 thus AttachDynamicObjectToPlayer just doesn't work even if YSF is included

NexiusTailer avatar Nov 02 '21 18:11 NexiusTailer

At one time, YSF did support AttachPlayerObjectToPlayer (at least I think so). Anyway, this isn't a native SA-MP provides, so this check is needed. The error message could be changed, I guess.

samp-incognito avatar Feb 20 '22 23:02 samp-incognito