02.10.2018, 16:37
It's possibile to convert this stock:
To return the zone name of the player? Currently it works only with x, y and z floats, but i need it for the player pos.
I could add GetPlayerPos then use that stocks but is stupid...is there a way to convert it?
pawn Код:
stock GetZoneName(Float: x, Float: y, Float: z)
{
new zone[28];
for(new i = 0; i < sizeof(SAZones); i++)
{
if(x >= SAZones[i][SAZONE_AREA][0] && x <= SAZones[i][SAZONE_AREA][3] && y >= SAZones[i][SAZONE_AREA][1] && y <= SAZones[i][SAZONE_AREA][4] && z >= SAZones[i][SAZONE_AREA][2] && z <= SAZones[i][SAZONE_AREA][5])
{
strcat(zone, SAZones[i][SAZONE_NAME]);
return zone;
}
}
strcat(zone, "Unknown");
return zone;
}
I could add GetPlayerPos then use that stocks but is stupid...is there a way to convert it?