30.05.2012, 17:43
Hello,i've this stock,it gets the 3d zone where the player is.
The problem is,this stock also search for the X,Y and Z MAX values,i wanna edit it just for MIN values:
Thanks.
The problem is,this stock also search for the X,Y and Z MAX values,i wanna edit it just for MIN values:
pawn Код:
stock GetPlayer3DZone(playerid, zone[], len)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
for(new i = 0; i != sizeof(gSAZones); i++ )
{
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] && z >= gSAZones[i][SAZONE_AREA][2] && z <= gSAZones[i][SAZONE_AREA][5])
{
return format(zone, len, gSAZones[i][SAZONE_NAME], 0);
}
}
return 0;
}