19.01.2015, 17:28
Just created this function for you:
You only have to enter the coordinates of the 2 gangzones. The parameters are in the same order as in GangZoneCreate so you can just copy/paste them.
It returns '1' if the zones do overlap and '0' if the zones do not overlap.
You only have to enter the coordinates of the 2 gangzones. The parameters are in the same order as in GangZoneCreate so you can just copy/paste them.
It returns '1' if the zones do overlap and '0' if the zones do not overlap.
pawn Код:
stock DoZonesOverlap(Float:aminx, Float:aminy, Float:amaxx, Float:amaxy, Float:bminx, Float:bminy, Float:bmaxx, Float:bmaxy)
{
if(!(aminx > bmaxx) && !(amaxx < bminx) && !(amaxy < bminy) && !(aminy > bmaxy)) return 1;
return 0;
}