31.08.2018, 15:07
When I command /startquest, I do not put my checkpoints on the mini-map, it's only the first one, I want it all.
https://pastebin.com/UbCpEeuP
https://pastebin.com/UbCpEeuP
//Declaring the array
new Float:Coords[5][3] = {
{1.0, 2.0, 3.0},
{1.0, 2.0, 3.0},
{1.0, 2.0, 3.0},
{1.0, 2.0, 3.0},
{1.0, 2.0, 3.0}
};
//Iteration
for(new i = 0; i < 5; i++)
quest_MapIcon[playerid][i] = SetPlayerMapIcon(playerid, i, Coords[i][0], Coords[i][1], Coords[i][2], 56, -1, MAPICON_GLOBAL);
The way you are using SetPlayerMapIcon is invalid, because you would set all map icon in each iteration.
First solution: - You can put all X, Y and Z data in one multidimensional array and use it in only one line of for loop. For example: PHP код:
- Forget the loop and create all lines with SetPlayerMapIcon and without i variable |