SA-MP Forums Archive
Attached Object Invisible - 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: Attached Object Invisible (/showthread.php?tid=613779)



Attached Object Invisible - GoldenLion - 31.07.2016

Hi, I changed the accessory system in my script today, added two more slots. All slots work except mask and hat. The problem is when I equip any of them the object is invisible, the object id is valid that is stored in pHat or pMask, I checked it with a command. The only problem is that they are invisible.
Here's the code for wearing a mask:
Код:
	            if (!IsPlayerAttachedObjectSlotUsed(playerid, 2))
	            {
	                PlayerData[playerid][pToggleMask] = 0;
	                SetPlayerAttachedObject(playerid, 2, PlayerData[playerid][pMask], PlayerData[playerid][pMaskBone], AccessoryData[playerid][2][0], AccessoryData[playerid][2][1], AccessoryData[playerid][2][2], AccessoryData[playerid][2][3], AccessoryData[playerid][2][4], AccessoryData[playerid][2][5], AccessoryData[playerid][2][6], AccessoryData[playerid][2][7], AccessoryData[playerid][2][8]);
	                ShowPlayerFooter(playerid, "You have ~g~attached~w~ your mask.");
		    }