SA-MP Forums Archive
AttachObjectToPlayer() - Drop object at sprunk machine.. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP (https://sampforum.blast.hk/forumdisplay.php?fid=3)
+--- Forum: Bug Reports (https://sampforum.blast.hk/forumdisplay.php?fid=20)
+--- Thread: AttachObjectToPlayer() - Drop object at sprunk machine.. (/showthread.php?tid=184191)



AttachObjectToPlayer() - Drop object at sprunk machine.. - DarrenReeder - 18.10.2010

Hello,

After thinking to myself when does the normal GTA SA game ever actually attach objects to players, i thought of sprunk machines... I went to use to just to see myself hold the object... then i noticed the M4 on my back fell off :S

I tried it a few times just to make sure it wasnt a 1 time thing... but yeah.. its bugged..

*If this problem gets fixed, then maybe it will be possible to hold two objects at once? That would be cool!

--

SUMMARY:

IF you use the sprunk machine while having a object attached to yourself, the object falls off the player...


Re: AttachObjectToPlayer() - Drop object at sprunk machine.. - ••• ĤБĶБM ••• - 18.10.2010

I'm not sure if it falls over, but I'm thinking that it'll still be considered in your back but you cannot see it because you're basically putting a sprunk machine over it, and not near it.


Re: AttachObjectToPlayer() - Drop object at sprunk machine.. - DarrenReeder - 18.10.2010

I dont understand what you saying, lol..

But i testing it with a suitcase in my hand aswell, but the suitcase just falls on the floor (and you can actually see the suitcase on the floor)..

Ill make a video tomorrow just to show people what i mean...


Respuesta: AttachObjectToPlayer() - Drop object at sprunk machine.. - MrDeath537 - 19.10.2010

Yeah, I confirmed it, when you drink sprunk and holding objects, you will stop holding the object:

Image


Re: AttachObjectToPlayer() - Drop object at sprunk machine.. - DarrenReeder - 19.10.2010

Yeah, it sucks... i knew about this quite a while ago.. but I asumed everyone already knew..

im glad i reported it on here


Re: AttachObjectToPlayer() - Drop object at sprunk machine.. - Rac3r - 19.10.2010

SA-MP devs said you can only have ONE object attached to a player. Single player Sprunk machines would probably share the same limit, thus switching your player object with the Sprunk machines object.

Not sure on the single player SCM code, but it would flow like this (I imagine).
Code:
IsPlayerInRangeOfPoint() - Check if player is at a sprunk machine
ApplyAnimation() - animation for inserting money in to sprunk machine
SetPlayerHoldingObject() - attach sprunk can to player
ApplyAnimation() - drink sprunk
StopPlayerHoldingObject() - remove sprunk can
This is probably obvious, but even so, when dealing with multiplayer coding, you still have to take into account the single player (client side) code.

Bug? I honestly don't think it is.
It would be like saying, "my animations stop when I use a Sprunk Machine fix it"
A bit silly really.


Re: AttachObjectToPlayer() - Drop object at sprunk machine.. - DarrenReeder - 19.10.2010

Its still a bug though,

The fact you can only attach one object is understandable.. But the fact that by using a sprunk it cancels out the object you attached in the script makes it a bug (it stopped holding the object even though i didnt tell it to)..

A bug is a bug, weather it is because of the client code or the pawn code...
---


Re: AttachObjectToPlayer() - Drop object at sprunk machine.. - rbN. - 19.10.2010

Lol.. If you attach a sprunk to you first, and afterwards you attach your own object, the sprunk goes away but when you press mouseclick the sprunk animation still starts


AW: AttachObjectToPlayer() - Drop object at sprunk machine.. - GooMan - 21.10.2010

well it would be even if you could check whether someone has an object holding.


Re: AttachObjectToPlayer() - Drop object at sprunk machine.. - CracK - 21.10.2010

OnObjectAttachedToPlayer would be the best solution here. Though not the easiest I guess