22.09.2017, 08:46
Hello guys I have got function to check Is Player Is between two points (x,y - x,y), but it doesn't works.
Here is the function:
And here is how I'm checking it (using CMD):
Here is the function:
Quote:
forward IsPlayerInGangZone(playerid, Float:min_x, Float:min_y, Float:max_x, Float:max_y); public IsPlayerInGangZone(playerid,Float:min_x,Float:min_ y,Float:max_x,Float:max_y) { new Float:X1,Float:Y1,Float:Z1; GetPlayerPos(playerid, X1, Y1, Z1); if((X1 <= max_x && X1 >= min_x) && (Y1 <= max_y && Y1 >= min_y)) return 1; return 0; } |
Quote:
if(IsPlayerInGangZone(playerid, 2539.976074,-1629.067382, 2504.410400,-1667.414062)) return SendClientMessage(playerid,COLOR_RED,"I'm here"); |