28.10.2010, 20:13
First of all a little array explanation
Now if we call Array[0] we get the array {5, 8, 3}, so if you call Bombenpkt[0] you get an array but we need a float => Argument type mistake
And if we want it for all mines we need to loop through all cords
And I suggest to use a timer for all players, not one for each
pawn Код:
new Array[][] =
{ // |0||1||2|
/* 0 */ {5, 8, 3}, //5 = Array[0][0], 8 = Array[0][1], 3 = Array[0][2]
/* 1 */ {7, 4, 9} //7 = Array[1][0], 4 = Array[1][1], 9 = Array[1][2]
}
And if we want it for all mines we need to loop through all cords
pawn Код:
public MineExplode(playerid)
{
for(new i; i < sizeof Bombenpkt; i++)
{
if(IsPlayerInRangeOfPoint(playerid, 5, Bombenpkt[i][0], Bombenpkt[i][1], Bombenpkt[i][2])) //Radius changed to 5
{
SendClientMessage(playerid, COLOR_RED, "Du bist in eine Mine geraten. Die Mainbase ist ein gefдhrlicher Ort! Halte dich fern!");
return CreateExplosion(Bombenpkt[i][0], Bombenpkt[i][1], Bombenpkt[i][2], 2, 10); //The mine should explode where it is
}
}
}

