Script Name: InPoly
Script Description: Just checks whether the player is inside a polygon or not. Returns true, if player is inside, else false.
Original Author(s): Railor
Core Version: 2.6.3
Code:
function InPoly(ID: byte): boolean;
var
Dist,x,y: Single;
begin
x := GetPlayerStat(ID,'x');
y := GetPlayerStat(ID,'y');
case RayCast(x,y,x,y,Dist,10) of
true: Result := false;
false: Result := true;
end
end;