for(new i; i < MAX_PLAYERS; i++) { if(IsPlayerInRangeOfPoint(i, 5, x[playerid], y[playerid], z[playerid])) { if(i != playerid) { GetPlayerPos(i, x2, y2, z2); PlayerPlaySound(i, 1159, x, y, z); SetPlayerHealth(i, health-10); } } else if(IsPlayerInRangeOfPoint(i, 10, x[playerid], y[playerid], z[playerid])) { if(i != playerid) { GetPlayerPos(i, x2, y2, z2); PlayerPlaySound(i, 1159, x, y, z); } } }
GetPlayerHealth(playerid, health);SetPlayerHealth(playerid, health);
GetPlayerHealth(i, health);SetPlayerHealth(i, health - 10);