26.04.2009, 01:48
Well I don't really get what you mean, but in your code I see
if(PlayerToPoint(4.0, i, X, Y, Z))
{
idd2 = i; // Why do this code return evry connected id? when it shuld be in the area?
BombTimer3(playerid);
}
else
{
if(PlayerToPoint(4.0, i, XX, YY, ZZ))
{
idd2 = i; // Why do this code return evry connected id? when it shuld be in the area?
BombTimer3(playerid);
}
Comments asking something.
In the for loop it loops through each player, and just sets idd2 to their ID. So only the highest ID within the 4.0 range will be in idd2.
I just having like "new Bombed[MAX_PLAYERS];" at the top of your script.
And do Bombed[i] == 1; inside the check if they are in the range.
Then at the detonator bit loop through all players and if their Bombed is 1, explode them.
if(PlayerToPoint(4.0, i, X, Y, Z))
{
idd2 = i; // Why do this code return evry connected id? when it shuld be in the area?
BombTimer3(playerid);
}
else
{
if(PlayerToPoint(4.0, i, XX, YY, ZZ))
{
idd2 = i; // Why do this code return evry connected id? when it shuld be in the area?
BombTimer3(playerid);
}
Comments asking something.
In the for loop it loops through each player, and just sets idd2 to their ID. So only the highest ID within the 4.0 range will be in idd2.
I just having like "new Bombed[MAX_PLAYERS];" at the top of your script.
And do Bombed[i] == 1; inside the check if they are in the range.
Then at the detonator bit loop through all players and if their Bombed is 1, explode them.

