SA-MP Forums Archive
Having issues with AttachDynamicObjectToPlayer... - 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: Having issues with AttachDynamicObjectToPlayer... (/showthread.php?tid=573040)



Having issues with AttachDynamicObjectToPlayer... - Dokins - 04.05.2015

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?


Re: Having issues with AttachDynamicObjectToPlayer... - Gammix - 04.05.2015

Use SetPlayerAttachedObject. This function is separate from CreateObject / CreatePlayerObject.


Re: Having issues with AttachDynamicObjectToPlayer... - Ballu Miaa - 04.05.2015

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


Re: Having issues with AttachDynamicObjectToPlayer... - ChromeAmazing - 04.05.2015

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


Re: Having issues with AttachDynamicObjectToPlayer... - Dokins - 04.05.2015

Thanks. Will this work for dynamic objects?


Re: Having issues with AttachDynamicObjectToPlayer... - Gammix - 04.05.2015

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!


Re: Having issues with AttachDynamicObjectToPlayer... - Dokins - 04.05.2015

Thank you very much!
<3