03.10.2017, 19:34
I wanted to change the color on weapons dropped on ground, how to do?
I've tried this, but the objects are invisible:
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);