SA-MP Forums Archive
Tint object ground - 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: Tint object ground (/showthread.php?tid=642628)



Tint object ground - binnyl - 03.10.2017

I wanted to change the color on weapons dropped on ground, how to do?

I've tried this, but the objects are invisible:

Code:
DropObject[i] = CreateDynamicObject(GetGunObjectID(GunID), X, Y, Z-1, 80.0, 0.0, 0.0, world);
if(DropInfo[i][DropGunColor] == 2) SetDynamicObjectMaterial(DropObject[i], 0, GetGunObjectID(GunID), "none", "none", WPCOLOR_LSPD);
else if(DropInfo[i][DropGunColor] == 3) SetDynamicObjectMaterial(DropObject[i], 0, GetGunObjectID(GunID), "none", "none", WPCOLOR_ARMY);
else if(DropInfo[i][DropGunColor] == 4) SetDynamicObjectMaterial(DropObject[i], 0, GetGunObjectID(GunID), "none", "none", WPCOLOR_PINK);
else if(DropInfo[i][DropGunColor] == 5) SetDynamicObjectMaterial(DropObject[i], 0, GetGunObjectID(GunID), "none", "none", WPCOLOR_RED);