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)
+--- Thread: SetPlayerAttachedObject (
/showthread.php?tid=600140)
SetPlayerAttachedObject -
lutherfchen - 04.02.2016
Hi guys I'm having a problem with SetPlayerAttachedObject
when I use SetPlayerAttachedObject like:
first object = SetPlayerAttachedObject(...);
second object = SetPlayerAttachedObject(...);
It only attach the second object, Why?
Re: SetPlayerAttachedObject -
Rufio - 04.02.2016
Are you sure you are using different indexes and bone ids?
Re: SetPlayerAttachedObject -
lutherfchen - 04.02.2016
My code is like:
OnPlayerUpdate(playerid)
if(pWeapon[3] = 25 &&GetPlayerWeapon(playerid) != 25)
{
SetPlayerAttachedObject(...);//attach shotgun
}
if(pWeapon[4] = 29 &&GetPlayerWeapon(playerid) != 29)
{
SetPlayerAttachedObject(...);//attach mp5
}
but when I have both guns and not holding any of them... It only attach mp5.
Re: SetPlayerAttachedObject -
lutherfchen - 04.02.2016
Oh nothing is wrong now, Thanks Rufio I didn't notice of the indexes
Re: SetPlayerAttachedObject -
Rufio - 04.02.2016
You are welcome.