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