Advanced RangeOfPoint!
#1

IsPlayerInRangeOfPoint function takes 1 range as a circle from the center of it.

I wonder if it's possible to make a function called:
pawn Код:
IsPlayerInRangeOfPointEx(playerid, width, height, Float:x, Float:y, Float:z);
to take 2 ranges "Width, Height" instead of one as default function does.

Picture:
Reply
#2

How are you getting the size of the object? I mean the length and breadth.
Reply
#3

IsPlayerInArea()will work for you.
https://sampforum.blast.hk/showthread.php?tid=222283
Reply
#4

Yes it's just a simple area check lol.
Reply
#5

Thanks for replying! Any other solution guys?
Reply
#6

If you are using the Streamer Plugin, you can easily use CreateDynamicRectangle or CreateDynamicPolygon, and if you need to check if they entered in the area, just use OnPlayerEnterDynamicArea. (also IsPlayerInDynamicArea for other things)
Reply
#7

An normal area would only work if the object is placed alongside the x or the y axis because the area created by IsPlayerInArea / CreateDynamicRectangle is always alongside the x and y axes

If you want to place your objects with different z-angles (not only 0, 90, 180 and 270) you should use CreateDynamicPolygon or IsPlayerInPerimeter
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)