SA-MP Forums Archive
random positions from an point - 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: random positions from an point (/showthread.php?tid=617313)



random positions from an point - OTACON - 19.09.2016

Hello...

I need to do the following, could help me ?.

sorry for example xD



From already thank you very much.



Re: random positions from an point - AbyssMorgan - 19.09.2016

Can use one of the functions:
PHP код:
GetRandomClockPos(Float:x,Float:y,Float:z,Float:radius,&Float:tx,&Float:ty,&Float:tz,&Float:trz,Float:rz INVALID_ROTATION);

GetRandomPointInCircle(Float:x,Float:y,Float:radius,&Float:tx,&Float:ty);
GetRandomPointInCylinderEx(Float:x,Float:y,Float:minz,Float:maxz,Float:radius,&Float:tx,&Float:ty,&Float:tz);
GetRandomPointInSphere(Float:x,Float:y,Float:z,Float:radius,&Float:tx,&Float:ty,&Float:tz);
GetRandomPointInRectangle(Float:minx,Float:miny,Float:maxx,Float:maxy,&Float:tx,&Float:ty);
GetRandomPointInCube(Float:minx,Float:miny,Float:minz,Float:maxx,Float:maxy,Float:maxz,&Float:tx,&Float:ty,&Float:tz);

GetRandomPointOnSphere(Float:x,Float:y,Float:z,Float:radius,&Float:tx,&Float:ty,&Float:tz); 
3DTryg:
https://sampforum.blast.hk/showthread.php?tid=591010