Quote:
Originally Posted by Robo_N1X
pawn Code:
#define MAX_FISHING_AREA 3 // change this if you are going to have more fishing area new Float:fishingspots[MAX_FISHING_AREA][3] = // 3 means there are 3 floating points (for the coordinates: x,y,z) { // x = 0 | y = 1 | z = 2 {-1874.6598, -1670.0956, 0.9824}, // fishing area 1 (0) {x, y, z}, // fishing area 2 (1), change the x, y, z to your coordinates (floating points) {x, y, z} // fishing area 3 (2), notice there is no comma for last area }; // loop the array number from 0 to 2 (the number in brackets of each fishing area) for(new i = 0; i < MAX_FISHING_AREA; i++) { Create3DTextLabel("Fishing area.\n/fish ", 0x008080FF,fishingspots[i][0], fishingspots[i][1], fishingspots[i][2], 20.0, 0, 0); }
|
You said that there's 3 floating points, yet we're declaring 2 in the creation of the label. Couldn't we change [3] to [2] since they start at 0?
pawn Code:
new Float:fishingspots[MAX_FISH_AREAS][2] // starting from 0 <--