02.08.2012, 10:02
Try something like
some name is the name of your zone, and the coords are { xmin, ymin, xmax, ymax }
There is a something you have to change though;
I don't know why, but there was unused index 2
pawn Код:
enum SAZONE {
SAZONE_NAME[64],
Float:SAZONE_AREA[4]
};
new gSAZones[1][SAZONE] = {
{
"Some name",
{ 0.0, 0.0, 0.0, 0.0 }
}
};
There is a something you have to change though;
pawn Код:
if(x >= gSAZones[i][SAZONE_AREA][0] && x <= gSAZones[i][SAZONE_AREA][3] && y >= gSAZones[i][SAZONE_AREA][1] && y <= gSAZones[i][SAZONE_AREA][4])
//change to
if(x >= gSAZones[i][SAZONE_AREA][0] && x <= gSAZones[i][SAZONE_AREA][2] && y >= gSAZones[i][SAZONE_AREA][1] && y <= gSAZones[i][SAZONE_AREA][3])