I have another question.
How would I go about getting the position of a brick I am looking at?
As in, type /getbrickposition and you will get the xyz coordinates of the brick that is in your direct line of sight.
Things I know:
I can't find a default function for this
The only thing close to it is /GetId, which is kind of what I want this to behave like
I know the final line has to be something like echo(id.getposition());
Things I don't know:
If I do use a combination of ServerCmdGetId and getWord, which string should I search in?
And basically everything else
Your going to need to make a copy of the insides of serverCmdGetID -- I dont know where you will find that.
but the concept is this:
player types: /getbrickposition
you write function serverCmdGetbrickposition(%client)
and inside you do this:
- do a "raycast" to findout the brick the player is looking at
that will eventually give you a brick.
- use: echo(%brick.getposition() ); or MessageClient( ) to display the position.
the raycast thing is used in several places... I use a copy in my own stuff, but I cant remember which mod I copied it from.