X,Y,Z around player
#1

How to get random X,Y,Z around player in for example 5 X radius ?
Reply
#2

There you go.
pawn Код:
new Float: sfx; //Your X cordinates
    new Float: sfy; //Your Y cordinates
    new Float: sfz; //Your Z cordinates
    GetPlayerPos(playerid, sfx, sfy, sfz); // Gets the random player position you are at.
Reply
#3

Quote:
Originally Posted by Benne
There you go.
pawn Код:
// Gets the random player position you are at.
No, that will give the exact player position, not the random one.
Reply
#4

To be more exact:

Reply
#5

You could get their position, and add (or subtract) a random value?
Reply
#6

Use floatcos, floatsin in the x,y position.
Reply
#7

why r wrong for u to get positions in the square around the player? It would be simple.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)