GetPlayerSurfingDynamicObjectID ??
#1

Is there any way to detect if a player is surfing a dynamic object?

OR

Is there any way to set a virtual world & interior on a normal create object so I can use the normal GetPlayerSurfingObjectID?

The reason being is because I have tried absolutely everything to prevent people surfing on objects whilst editing them. None of them are sufficient.
Reply
#2

You could use GetObjectPos and IsPlayerInRangeOfPoint, I guess...If they are like within 0.5 of it then freeze them for a few seconds and print a warning. It would make people not do it
Reply
#3

Here's what I would do, when they start editing an object, check if they're surfing. If they are, then cancel editing mode. If they're not surfing the object, attach a dynamic area to it, when OnPlayerEnterDynamicArea is called, cancel editing. Seems easy enough.
Reply
#4

The problem is that sa-mp does not have GetPlayerSurfingPlayerObject.
Reply
#5

Who said it was a player object?
Reply
#6

Quote:
Originally Posted by BenzoAMG
Посмотреть сообщение
Who said it was a player object?
Dynamic objects ARE per-player objects and indeed a function as Richie said would be useful.
Reply
#7

Oh, Dynamic object.. didn't see it.
Reply
#8

Quote:
Originally Posted by BenzoAMG
Посмотреть сообщение
Oh, Dynamic object.. didn't see it.
Lol as I've put in my other posts I have the solution to check if the player is surfing the object but OnPlayerEditDynamicObject does not update the objects position quick enough. Check my other topics as I had to make another topic with a better title.
Reply
#9

Quote:
Originally Posted by Richie©
Посмотреть сообщение
The problem is that sa-mp does not have GetPlayerSurfingPlayerObject.
He could use a regular createobject then just destroy it and swap for a dynamic object when he's done editing.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)