09.12.2011, 03:49
Im trying to verify if a player is near a point from a list and then do some things with that. this is my list :
My verification code :
when i want to see if the vehicle is near, i do this :
but it always return false (zero)
Код:
enum eZone { Float:x, Float:y, Float:z, } new ZoneInfo[][eZone] = { //COORDONЙE DU POINT CENTRAL DE L'ENDROIT {1411.0,-2408.8,17.379}, {1411.0,-2408.8,17.379} };
Код:
public isin(playerid) { new var = 0; for(new i = 0; i <= 1; i++) { if (IsPlayerInRangeOfPoint(playerid, 45.0, ZoneInfo[i][0], ZoneInfo[i][1], ZoneInfo[i][2])) { var = 1; } } return var; }
Код:
if(isin(playerid)) {