Author Topic: InPoly  (Read 2072 times)

0 Members and 3 Guests are viewing this topic.

Offline Railor

  • Major(1)
  • Posts: 16
InPoly
« on: March 04, 2008, 02:28:25 pm »
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:
Code: [Select]
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;

Offline Horve

  • Flagrunner
  • ****
  • Posts: 692
  • Vig
Re: InPoly
« Reply #1 on: March 04, 2008, 08:03:26 pm »
why would a player be inside a polygon?
How ------ -------------------------------------?

Offline Iq Unlimited

  • Flagrunner
  • ****
  • Posts: 864
  • mr. foobar2000
Re: InPoly
« Reply #2 on: March 04, 2008, 08:29:07 pm »
#1: hacks
#2: scripts
#3: bugs


Offline chutem

  • Veteran
  • *****
  • Posts: 1119
Re: InPoly
« Reply #3 on: March 04, 2008, 11:07:04 pm »
#4: explosions from m79's
#5: explosions from M72 LAW
#6: F**ked polygon
1NK3FbdNtH6jNH4dc1fzuvd4ruVdMQABvs

Offline Horve

  • Flagrunner
  • ****
  • Posts: 692
  • Vig
Re: InPoly
« Reply #4 on: March 05, 2008, 09:41:07 am »
you can't be inside "hard" polygons, you can be between polygons. And if I'm inside a doesn't collide polygon...

Offline Railor

  • Major(1)
  • Posts: 16
Re: InPoly
« Reply #5 on: March 05, 2008, 12:33:13 pm »
You're right. The script just checks if you are surrounded by polygons.

Offline Banksey

  • Major
  • *
  • Posts: 95
  • Proud smoker of Marlboro Reds
Re: InPoly
« Reply #6 on: March 13, 2008, 09:30:46 am »
This is great for Spasmans Zombie Server....