Get radius ? - 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: Get radius ? (
/showthread.php?tid=473751)
Get radius ? -
Saw® - 04.11.2013
Hey , I'm making a zombie bot system for my server , so I wanna make a radius around the player of for exemple 10 meters , & spawn randomly the npc zombie , the problem is I don't know how to get that radius... any ideas ?
Re: Get radius ? -
AlonzoTorres - 04.11.2013
Get the player's position and then spawn a zombie with a random (max + 10) on the Y-axis and then a random X.
Re: Get radius ? -
zT KiNgKoNg - 04.11.2013
This seams like a request, i suggest you post in the script request thread #6/7
Re: Get radius ? -
AlonzoTorres - 04.11.2013
You could do something like this:
pawn Код:
new pos[3];
GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
SpawnZombie(pos[0] + random(10), pos[1] + random(10), pos[2]);
Re: Get radius ? -
Saw® - 04.11.2013
Quote:
Originally Posted by AlonzoTorres
Get the player's position and then spawn a zombie with a random (max + 10) on the Y-axis and then a random X.
|
Thanks man ! Great way to get it
Quote:
Originally Posted by zT KiNgKoNg
This seams like a request, i suggest you post in the script request thread #6/7
|
No i just wanted the way how to do it
thank u all