Index in SetPlayerAttachedObject - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Index in SetPlayerAttachedObject (
/showthread.php?tid=194486)
Index in SetPlayerAttachedObject -
Flyfishes - 29.11.2010
What does the index thing mean in SetPlayerAttachedObject?
- Thanks!
Re: Index in SetPlayerAttachedObject -
Fj0rtizFredde - 29.11.2010
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..
Re: Index in SetPlayerAttachedObject - [03]Garsino - 29.11.2010
It means the slot you're going to attach the object to (valid slots is 0-4)
Re: Index in SetPlayerAttachedObject -
[NeS]Justin - 29.11.2010
just use 0-4 per player
Re: Index in SetPlayerAttachedObject -
Flyfishes - 29.11.2010
Ahh so it's like when you create like an object?
pawn Код:
new object;
object = createobject(blablabla);
Thanks for the information
Re: Index in SetPlayerAttachedObject - [03]Garsino - 29.11.2010
No you use it with SetPlayerAttachedObject, RemovePlayerAttachedObject and IsPlayerAttachedObjectSlotUsed
Re: Index in SetPlayerAttachedObject -
Flyfishes - 29.11.2010
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?
Re: Index in SetPlayerAttachedObject - [03]Garsino - 29.11.2010
You can also see it
This forum requires that you wait 120 seconds between posts. Please try again in 67 seconds.
ffs, so annoying!
Re: Index in SetPlayerAttachedObject -
Flyfishes - 29.11.2010
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;
}
Re: Index in SetPlayerAttachedObject -
Memoryz - 29.11.2010
Index = ID of the slot.
So like you create an object on each slot, and that's its unique ID.