-50.63083, 1639.23315, 19.29217
160.12793, 1183.91272, 13.94220
200.24226, 1048.96497, 20.80203
352.39798, 1062.13977, 26.79083
if(IsPlayerInRangeOfPoint(playerid, 40.0, 300.91959, 1949.00452, 16.60519,))
{
print("Voce esta em uma das coords !")
return 1;
}
//4 й o numero total dos conjuntos os quais possuem 3 coordenadas dentro new Float:Coords[4][3] = { {-50.63083, 1639.23315, 19.29217}, {160.12793, 1183.91272, 13.94220}, {200.24226, 1048.96497, 20.80203}, {352.39798, 1062.13977, 26.79083}}; for(new i = 0; i < sizeof(Coords); i++) //Iniciamos um loop de 0 atй 3 se baseando no sizeof de Coords que й o numero total dos conjuntos (4) { if(IsPlayerInRangeOfPoint(playerid, 40.0, Coords[i][0], Coords[i][1], Coords[i][2])) { print("Voce esta em uma das coords !") return 1; } }
for(new i = 0; i < sizeof(Coords); i++)
if(IsPlayerInRangeOfPoint(playerid, 40.0, Coords[0][0], Coords[0][1], Coords[0][2])) { print("Voce esta em uma das coords !") return 1; } if(IsPlayerInRangeOfPoint(playerid, 40.0, Coords[1][0], Coords[1][1], Coords[1][2])) { print("Voce esta em uma das coords !") return 1; } if(IsPlayerInRangeOfPoint(playerid, 40.0, Coords[2][0], Coords[2][1], Coords[2][2])) { print("Voce esta em uma das coords !") return 1; } if(IsPlayerInRangeOfPoint(playerid, 40.0, Coords[3][0], Coords[3][1], Coords[3][2])) { print("Voce esta em uma das coords !") return 1; }
for(new Aleatorio = 0; i < 30; Aleatorio++)
entгo eu posso colocar
Код:
for(new Aleatorio = 0; i < 30; Aleatorio++) |
public OnGameModeInit() { for(new Aleatorio = 0; Aleatorio < 30; Aleatorio++) { printf("Loop aleatorio: %d", Aleatorio); } return 1; }
public OnGameModeInit() { for(new Aleatorio = 5; Aleatorio < 21; Aleatorio++) { printf("Loop aleatorio: %d", Aleatorio); } return 1; }