05.04.2016, 12:01
IsPlayerInRangeOfPoint has only 5 arguments and not 7!:
You've declared the array to have an unknown amount of indexes (you resolve the unknown part by creating the indexes yourself) and with an unknown amount of sub-indexes. This seems very redundant since the purpose limits you to have only 3 values. Thus, gRange can only have 3 values:
A player's position can have 4 coordinates (including facing angle):
But why would you need the facing angle for IsPlayerInRangeOfPoint? The function doesn't even accept it as an argument. So, to fix your problem:
PHP код:
IsPlayerInRangeOfPoint(playerid, Float:radius, Float:x, Float:y, Float:z);
Код:
X-coordinate Y-coordinate Z-coordinate
Код:
X-coordinate Y-coordinate Z-coordinate A-coordinate
PHP код:
new Float:gRange[][3] =
{
{141.04659,1970.46704,21.30360},
{141.89529,1963.32434,18.85600},
{213.60159,1850.90369,12.89270},
{256.99011,1845.92261,9.53800},
{248.82294,1842.09045,9.00760}
};
// This has to be in your loop:
if(IsPlayerInRangeOfPoint(playerid, 5.0, gRange[i][0], gRange[i][1], gRange[i][2]))