SA-MP Forums Archive
Editing this stock - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Editing this stock (/showthread.php?tid=346940)



Editing this stock - Face9000 - 30.05.2012

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.


Re: Editing this stock - MP2 - 30.05.2012

I don't think you understand how zones work. Do you mean you want to remove the Z height checks?


Re: Editing this stock - Face9000 - 30.05.2012

Quote:
Originally Posted by MP2
Посмотреть сообщение
I don't think you understand how zones work. Do you mean you want to remove the Z height checks?
I just wanna remove the max YXZ values.