06.01.2015, 18:14
Good!
Here's a little tip to make it a bit more efficient:
This is what you currently have:
But you don't need to create all these extra variables because you can store them in the players' variables right away:
Here's a little tip to make it a bit more efficient:
This is what you currently have:
pawn Код:
new Float:X, Float:Y, Float:Z; //variable to find player's X Y Z position.
GetPlayerPos(playerid, X, Y, Z); // Getting the player's X Y Z position.
PosX[playerid] = X; //assigning the players position we got to a different player variable.
PosY[playerid] = Y; //assigning the players position we got to a different player variable.
PosZ[playerid] = Z; //assigning the players position we got to a different player variable.
pawn Код:
GetPlayerPos(playerid, PosX[playerid], PosY[playerid], PosZ[playerid]);