Index in SetPlayerAttachedObject
#1

What does the index thing mean in SetPlayerAttachedObject?

- Thanks!
Reply
#2

Its like a slot like you set an object to index 1 with bone id 2 (head) and something else on index 2 and bone id 5 (hand) then you can delete index 1 (the object at your head) etc..
Reply
#3

It means the slot you're going to attach the object to (valid slots is 0-4)
Reply
#4

just use 0-4 per player
Reply
#5

Ahh so it's like when you create like an object?
pawn Код:
new object;
object = createobject(blablabla);
Thanks for the information
Reply
#6

No you use it with SetPlayerAttachedObject, RemovePlayerAttachedObject and IsPlayerAttachedObjectSlotUsed
Reply
#7

Nevermind my post above. Btw, can you as the player see your own attached object on your character? I mean can only other players see the object attached on me or can I also see it?
Reply
#8

You can also see it

This forum requires that you wait 120 seconds between posts. Please try again in 67 seconds.

ffs, so annoying!
Reply
#9

Is it possible to use the SetPlayerAttachedObject under OnPlayerStateChange or OnPlayerSpawn? Because it doesn't work for me.
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_SPAWNED)
    {
        SetPlayerAttachedObject(playerid, 0, 18749, 2, 0.0, 0.0, 0.0, 90.0, 0.0, 0.0, 0.0, 0.0, 0.0);
    }
    return 1;
}
Reply
#10

Index = ID of the slot.

So like you create an object on each slot, and that's its unique ID.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)