18.08.2011, 11:58
You are using GetPlayerDistanceToPoint which is 2D. That means it isn't using the z-float
If you want to use the z-float, you need to get GetPlayerDistanceToPointEx
So I fixed it
If you still get a tag mismatch, remove &Float:z in OnBombExplode
Or if you use GetPlayerDistanceToPointEx, you can simply edit the line to
If you want to use the z-float, you need to get GetPlayerDistanceToPointEx
So I fixed it
pawn Код:
public OnBombExplode(playerid, num, Float:x, Float:y, &Float:z)
{
//is called everytime a bomb explodes
for(new i = 0; i < MAX_PLAYERS; i ++) {
if(GetPlayerDistanceToPoint(i, x, y) < 2 * gBombTypes[btype[playerid][num]][2]) {
SetPVarInt(i, "nearExp", playerid);
SetTimerEx("ResetNearExp", 15000, 0, "i", i);
}
}
return 1;
}
Or if you use GetPlayerDistanceToPointEx, you can simply edit the line to
pawn Код:
if(GetPlayerDistanceToPointEx(i, x, y) < 2 * gBombTypes[btype[playerid][num]][2]) {