private static bool DrawMaterialPrimitiveWithMaterial(PrimitiveType primitiveType, dynamic pathOrMaterial, List <Vertice> vertices, bool postGui = false) { List <Vector2> vectors = new List <Vector2>(); List <int> colors = new List <int>(); List <Vector2> topLefts = new List <Vector2>(); foreach (Vertice vertice in vertices) { vectors.Add(vertice.Position); colors.Add(vertice.Color.Hex); topLefts.Add(vertice.TopLeft); } return(MtaClient.DxDrawMaterialPrimitive(primitiveType.ToString().ToLower(), pathOrMaterial, postGui, vertices.Count, vectors, colors, topLefts)); }