Advanced RangeOfPoint! - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Advanced RangeOfPoint! (
/showthread.php?tid=531035)
Advanced RangeOfPoint! -
Juvanii - 10.08.2014
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:
Re: Advanced RangeOfPoint! -
Faisal_khan - 10.08.2014
How are you getting the size of the object? I mean the length and breadth.
Re: Advanced RangeOfPoint! -
Faisal_khan - 10.08.2014
IsPlayerInArea()will work for you.
https://sampforum.blast.hk/showthread.php?tid=222283
Re: Advanced RangeOfPoint! -
Pottus - 10.08.2014
Yes it's just a simple area check lol.
Re: Advanced RangeOfPoint! -
Juvanii - 10.08.2014
Thanks for replying! Any other solution guys?
Re: Advanced RangeOfPoint! -
IstuntmanI - 10.08.2014
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)
Respuesta: Advanced RangeOfPoint! -
Nero_3D - 11.08.2014
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