LoadRobberies()
{
RobberyP[0] = CreateDynamicSphere(2065.439453125, -1897.5510253906, 13.19670009613, 3.0);
RobberyP[1] = CreateDynamicSphere(1497.7467041016, -1749.8747558594, 15.088212013245, 3.0);
//And so on...
return 1;
}
for(new i = 0; i < sizeof(Coords); i ++) { CreateDynamicObject(model, Coords[i][0], Coords[i][1], Coords[i][2], Coords[i][3], Coords[i][4], Coords[i][5], ...); }
new const RobOjbects[][RobIcons] =
{
{2067.4,-1831.2,13.5},
{488.0,-1734.0,34.4},
{720.016,-454.625,15.328}
};
enum RobIcons
{
Float:XXX,
Float:YYY,
Float:ZZZ
}
for(new i = 0; i < sizeof(AtmObjects); i ++)
{
CreateDynamicObject(19324, RobOjbects[i][XXX], RobOjbects[i][YYY], RobOjbects[i][ZZZ], 0.0, 0.0, 0.0, 100);
}
for(new i = 0; i < sizeof(AtmObjects); i ++)
{
CreateDynamicObject(19324, AtmObjects[i][XXX], AtmObjects[i][YYY], AtmObjects[i][ZZZ], 0.0, 0.0, 0.0, 100);
CreateDynamicMapIcon(AtmObjects[i][XXX][0], AtmObjects[i][YYY][1], AtmObjects[i][ZZZ][2], 15, 0, 0, .streamdistance = 200.0);
}
error 001: expected token: ",", but found "[" error 029: invalid expression, assumed zero warning 215: expression has no effect error 001: expected token: ";", but found "]" fatal error 107: too many error messages on one line |
`AtmObjects[i][XXX]` is enough, you don't need to add an additional dimension.
|
for(new i = 0; i < sizeof(AtmObjects); i ++)
{
CreateDynamicObject(19324, AtmObjects[i][XXX], AtmObjects[i][YYY], AtmObjects[i][ZZZ], AtmObjects[i][XXX][0], AtmObjects[i][YYY][1], AtmObjects[i][ZZZ][2]);
CreateDynamicMapIcon(AtmObjects[i][XXX], AtmObjects[i][YYY], AtmObjects[i][ZZZ], 15, 0);
}
new const AtmObjects[][AtmIcons] =
{
{2065.439453125, -1897.5510253906, 13.19670009613},
{1497.7467041016, -1749.8747558594, 15.088212013245},
{2093.5124511719, -1359.5474853516, 23.62727355957},
{1155.6235351563, -1464.9141845703, 15.44321346283},
{1482.7761230469, -1010.3353881836, 26.48664855957},
{2139.4487304688, -1164.0811767578, 23.63508605957}
};
enum AtmIcons
{
Float:XXX,
Float:YYY,
Float:ZZZ
}
error 001: expected token: ",", but found "[" error 029: invalid expression, assumed zero warning 215: expression has no effect error 001: expected token: ";", but found "]" fatal error 107: too many error messages on one line