03.10.2015, 02:35
Use this:
PHP код:
//Useage in the format:
format (string,sizeof ( string ), "( ! ) HINT : Un dovleac a fost spawnat in zona %s.",GetPumpkinZone(p));
//The function:
stock GetPumpkinZone(p)
{
static const null[] = "null";
for(new i,Float:x = pumpkins[p][0],Float:y = pumpkins[p][1],Float:z = pumpkins[p][2]; 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 gSAZones[i][SAZONE_NAME];
}
}
return null;
}