Editing this stock
#1

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:

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;
}
Thanks.
Reply


Messages In This Thread
Editing this stock - by Face9000 - 30.05.2012, 17:43
Re: Editing this stock - by MP2 - 30.05.2012, 19:29
Re: Editing this stock - by Face9000 - 30.05.2012, 19:53

Forum Jump:


Users browsing this thread: 1 Guest(s)