AttachObjectToPlayer() - Drop object at sprunk machine..
#1

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...
Reply
#2

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.
Reply
#3

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...
Reply
#4

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

Image
Reply
#5

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

im glad i reported it on here
Reply
#6

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.
Reply
#7

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...
---
Reply
#8

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
Reply
#9

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)