Random spawn in a square area
#1

Sup guys, i'm starting to make a GameMode but i'm stuck in this thing: I need to know how to create a random spawn in a square area, no saved positions but a square where random x,y and z are generated. So how can i do this ?
Reply
#2

This is pretty simple, you can just

PHP код:
SetPlayerPos(playerid,X+random(X1),Y+random(Y1),z
Where X and Y is the starting point of your desired square and where (X + X1) and (Y + Y1) results in the ending point of your desired square.
Reply
#3

Oh, thank you very much
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)