I want to run a specific function when two players have a certain distance between them.
PHP Code:
new Float:g_flScreamDistance = 15.0
new szPlayers[32], flOrigin[3], flOrigin2[3], iPnum, iPlayer
get_players(szPlayers, iPnum, "ae", "CT")
pev(id, pev_origin, flOrigin)
for(new i = 0; i < iPnum; i++)
{
szPlayers[i] = iPlayer
pev(iPlayer, pev_origin, flOrigin2)
if(get_distance_f(flOrigin, flOrigin2) <= g_flScreamDistance)
player_stealhealth(id, iPlayer)
}
This doesn't work. I also get a tag mismatch in the "get_distance_f" function.