SA-MP Forums Archive
OnPlayerSelectObject - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: OnPlayerSelectObject (/showthread.php?tid=594891)



OnPlayerSelectObject - jeffery30162 - 25.11.2015

When using: public OnPlayerSelectObject(playerid, type, objectid, modelid, Float:fX, Float:fY, Float:fZ)

the objectid is not working correctly even when I 100% know it should.


Re: OnPlayerSelectObject - ATGOggy - 25.11.2015

No one's going to help you unless you give us your code.


Re: OnPlayerSelectObject - jeffery30162 - 25.11.2015

its not my code, used same piece onplayereditdynamicobject. The problem lies within the callback itself.
If you read here on the wiki: wiki

it says that the call back uses the parameters:
Код:
(playerid, type, objectid, modelid, Float:fX, Float:fY, Float:fZ)
but under neath that it says:
Код:
playerid	The ID of the player that selected an object
type	The type of selection
objectid	The ID of the selected object
Float:fX	The X position of the selected object
Float:fY	The Y position of the selected object
Float:fZ	The Z position of the selected object
it completely misses the modelid

either they do not have it correct on the website that I am using, or it is just buged


Re: OnPlayerSelectObject - ATGOggy - 25.11.2015

They missed modelid. modelid is actually one of the parameters of this callback. modelid is the id of the object model. You can use it in your code.