Having issues with AttachDynamicObjectToPlayer...
#1

pawn Код:
CMD:steal(playerid, params[])
{
    new furni;
    for(new o = 1; o < MAX_FURNI; o++)
    {
        if(IsPlayerInRangeOfPoint(playerid, 3, FurniX[o], FurniY[o], FurniZ[o]))
        {
            furni = o;
            printf(" ID %d" , o);
           
        }
    }
    printf("Furni Picked %d", FurniObject[furni]);
    AttachDynamicObjectToPlayer(FurniObject[furni], playerid,0.1,0.2,0.1,0.1,0.1,0.1);
    SetPlayerSpecialAction(playerid, 25);
    return 1;
}
It does not work and returns this:

Код:
AttachPlayerObjectToPlayer : removed in 0.3. I can only attach global objects.
I use a streamer for the objects, is there a way to make it work so I can 'carry' objects?
Reply
#2

Use SetPlayerAttachedObject. This function is separate from CreateObject / CreatePlayerObject.
Reply
#3

Yes that was removed in 0.3. I think now you can only attach global objects to a player.
Reply
#4

It was not removed, it was rather added in SA-MP 0.3c and still works now.
https://sampwiki.blast.hk/wiki/SetPlayerAttachedObject
Reply
#5

Thanks. Will this work for dynamic objects?
Reply
#6

No dude. SetPlayerAttachedObject uses its own object sets; it have no relation with dynamic, global or player objects.

I already provided you the link in my previous post!
Reply
#7

Thank you very much!
<3
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)