Random Location - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Random Location (
/showthread.php?tid=250353)
Random Location -
Lorenc_ - 23.04.2011
Hai! I'm wondering about something if its possible, Is it possible to have a player spawn at a circumference of a certain co-ordinate, although at random positions inside that circumference? Examples would be great.
EDIT: PIC:
Re: Random Location -
Skylar Paul - 23.04.2011
Maybe a random integer would work? I'm not quite sure, it seems like you'd need an algorithm to make sure users don't spawn inside of the ground.
Re: Random Location -
Lorenc_ - 23.04.2011
Still don't get how to get that random integer inside that circumference. There must be a function around.
Re: Random Location -
Tee - 23.04.2011
There are some functions in pawno that should be able to do this. They are in the float.inc. There is one that might help: floatround (
Read wiki) I am not familiar with it, I just remembered it since you posted this. Hope it helped.
Re: Random Location -
Lorenc_ - 23.04.2011
Yes, though i don't really know how to get a random co-ordinate inside that float.