samp-incognito / samp-streamer-plugin

Streamer Plugin for SA-MP (San Andreas Multiplayer)
Apache License 2.0
229 stars 90 forks source link

Update AttachPlayerObjectToPlayer parameters #154

Closed ghost closed 7 years ago

ghost commented 7 years ago

I would be very happy if you was added plus one parameter with value 1 to AttachPlayerObjectToPlayer's end when object already created just streams in.

There were problems with AttachPlayerObjectToPlayer implementation what I made. I was forced to add a bit delay to object creation & attach after player streams in, since if I attached it immendiately it crashed.

This parameter what I would like from you, it was fix this problem. You just need to know with YSF that object already created, now server just need to re-stream it and ysf will take care of everything.

For more info, see:

https://github.com/kurta999/YSF/blob/YSF_/src/Scripting.cpp#L4129

samp-incognito commented 7 years ago

So the last parameter will always be 1?

ghost commented 7 years ago

Not really, only when object streams in, not when you create it. https://github.com/samp-incognito/samp-streamer-plugin/blob/master/src/streamer.cpp#L836

samp-incognito commented 7 years ago

It will always be 1, then, if the object needs to be attached right after it's been created?

Here, for example, the last parameter should be 0 since the object is already visible for the player?

ghost commented 7 years ago

Yes.