samp-incognito / samp-streamer-plugin

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

AttachDynamicObjectToPlayer #238

Closed m1n1vv closed 6 years ago

m1n1vv commented 6 years ago

AttachDynamicObjectToPlayer crash the game?

samp-incognito commented 6 years ago

You need YSF loaded to use that.

m1n1vv commented 6 years ago

I know. The crash was after the entrance of a new player.

IstuntmanI commented 6 years ago

Client crash ? That may be due to YSF. Try the AttachPlayerObjectToPlayer function and see if it crashes too, if it does then it is a YSF bug.

Romz24 commented 6 years ago

@samp-incognito Why make dependency on third-party plugins? Make the streamer independent of third-party plugins.

IstuntmanI commented 6 years ago

Streamer Plugin shouldn't do memory hacking. A third party plugin for that is the best option. Also, it actually prints a warning each time you use a function that requires YSF but YSF isn't loaded: https://github.com/samp-incognito/samp-streamer-plugin/blob/22b90fd17a6f8e1e95947b8a619bee1f125ad942/src/natives/objects.cpp#L425-L430

m1n1vv commented 6 years ago

And what about AttachDynamicObjectToVehicle?

samp-incognito commented 6 years ago

That works without YSF. AttachPlayerObjectToVehicle is an SA-MP native. AttachDynamicObjectToObject requires YSF as well.

Anyway, this isn't being caused by the streamer plugin. If you think there's a bug in YSF, try contacting kurta999 about it.

m1n1vv commented 6 years ago

He had to create a record.

AttachDynamicObjectToPlayer won't work, not going to describe why because I'm lazy, I'll create an issue at GitHub in streamer-plugin, Incognito have to change a bit in his code.

IstuntmanI commented 6 years ago

He did: https://github.com/samp-incognito/samp-streamer-plugin/issues/154 . What you are talking about may be another issue which should be reported to YSF, if there's indeed a problem with AttachPlayerObjectToPlayer.