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;
}
I'm trying to pick up the object nearest, I get a message on the server saying:

Код:
[02:12:28] AttachPlayerObjectToPlayer : removed in 0.3. I can only attach global objects.
It's not a player object and it is created when the server starts, as in loaded through mysql.
Reply
#2

Do you have the latest streamer version?
Reply
#3

Streamer Dynamic objects uses Player Object, AttachPlayerObjectToPlayer function was removed in SA-MP 0.3, so it does not work.

Alternatively, you can use SetPlayerAttachedObject, the different is the object position/rotation depends on the player's skin bone, it's non solid, scaleable, and visible by all players.

I'm not sure why AttachDynamicObjectToPlayer function existed in streamer though.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)