pawn Код:
public IsPlayerInTurf(playerid, turfid)
{
if(!IsPlayerConnected(playerid))
return 0;
if(turfid == -1 || turfid >= 37)
return 0;
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid,x,y,z);
if(x >= TurfInfo[turfid][zMinX] && x < TurfInfo[turfid][zMaxX] && y >= TurfInfo[turfid][zMinY] && y < TurfInfo[turfid][zMaxY])
return 1;
}
All i did was added check if turfid is greater or equal to 37 (that is if is out of bounds)
I wold recommend you to change these 37 with macro like MAX_TURFS or something similar