PDA

View Full Version : Tint object ground


binnyl
03/10/2017, 07:34 PM
I wanted to change the color on weapons dropped on ground, how to do?

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


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);