XYZ in HUD

Author Topic: XYZ in HUD  (Read 3998 times)

Is there a way to have your XYZ coordinates show up on your HUD?
And if so, is there a way to make it so you could type "/warp 4 7 54" and it take you to X:4 Y:7 Z:54? If the warp wont work idk. But the Coords would be nice. This would be nice for the space map. From what I see, it's gonna be a long flight. You would need the coords, but it would be faster and I bet the Rper's would like it.

You could put a MLText and then set text to the clients position every 100ms there might be a better way but i don't know much about what stuff gui's can do.

Warp:
Code: [Select]
function serverCmdWarp(%client, %xa, %ya, %za){
if(%client.isAdmin || %client.isSuperAdmin){
%xyz = %xa SPC %ya SPC %za;
%client.player.setTransform(%xyz);
}
}

Should work, I wrote it on my psp just now.

I had a talk with naes draw and he was fine with something much simpler, cleaner, compatible etc.

So... here it is! Stick in your add-ons folder like any other file.

Use /loc to see your location and /tp X Y Z to teleport to location X Y Z.

Open in notepad for instructions on how to make admin- or superadmin-only.

Testing now. You rlly should put this in add-ons. I bet the space map guy, Reactor Worker would get a kick out of it.

Testing now. You rlly should put this in add-ons. I bet the space map guy, Reactor Worker would get a kick out of it.

Ha ha,

Its an odd feeling being the subject of a conversation.

Anyway, location thing could be useful however I feel that the teleportation would ruin it. I do suggest one of those other teleport mods where you can make bricks into telepads.

I would like to see this 'technology' developed into some kind of artillery system. Perhaps so a person can command an artillery vehicle and recieve target coordinates for indirect fire.

I was just goofing with it, and I had a question. When you use F8 to drop player at camera, what code does that use? It's different then this.

And how do you bind commands to keys? /loc would be nice on a key.

I have
       
Code: [Select]
$remapDivision[$remapCount] = "Tp mod";
$remapName[$remapCount] = "Check Coords";
$remapCmd[$remapCount] = "serverCmdloc";
        $remapCount++;

And I get
       
Code: [Select]
Add-Ons/Script_Teleportationbeta.cs (24): Unable to find object: '' attempting to call function 'getTransform' when I hit the key.
/loc works just fine, but even though the key shows up in the bind list the command doesn't work.
« Last Edit: September 07, 2007, 10:58:12 AM by Naes Draw »

I was just goofing with it, and I had a question. When you use F8 to drop player at camera, what code does that use? It's different then this.

And how do you bind commands to keys? /loc would be nice on a key.

I have
       
Code: [Select]
$remapDivision[$remapCount] = "Tp mod";
$remapName[$remapCount] = "Check Coords";
$remapCmd[$remapCount] = "serverCmdloc";
        $remapCount++;

And I get
       
Code: [Select]
Add-Ons/Script_Teleportationbeta.cs (24): Unable to find object: '' attempting to call function 'getTransform' when I hit the key.
/loc works just fine, but even though the key shows up in the bind list the command doesn't work.
Instead of having the $remapCmd be "serverCmdLoc", try this:
Code: [Select]
$remapCmd[$remapCount] = commandtoserver('loc');

also: Any sort of pad-based TP mod is useless in the face of v9.


Testing now. You rlly should put this in add-ons. I bet the space map guy, Reactor Worker would get a kick out of it.

Ha ha,

Its an odd feeling being the subject of a conversation.

Anyway, location thing could be useful however I feel that the teleportation would ruin it. I do suggest one of those other teleport mods where you can make bricks into telepads.

I would like to see this 'technology' developed into some kind of artillery system. Perhaps so a person can command an artillery vehicle and recieve target coordinates for indirect fire.

Interplanetary warfare using massive artillery platforms and spies? :D

Testing now. You rlly should put this in add-ons. I bet the space map guy, Reactor Worker would get a kick out of it.

Ha ha,

Its an odd feeling being the subject of a conversation.

Anyway, location thing could be useful however I feel that the teleportation would ruin it. I do suggest one of those other teleport mods where you can make bricks into telepads.

I would like to see this 'technology' developed into some kind of artillery system. Perhaps so a person can command an artillery vehicle and recieve target coordinates for indirect fire.

Interplanetary warfare using massive artillery platforms and spies? :D

Definetly! >:)

Does any one know what code /fetch uses? And the keys not binding right.

serverCmdFetch(%client,%namestring)
{
     if(%client.isAdmin || %client.isSuperAdmin)
     {
          <%namestring to client name matching code, stores as %victim>

          %victim.Player.setTransform(%client.Player.getTransform());
     }
}
« Last Edit: September 10, 2007, 05:04:00 PM by Trader »

serverCmdFetch(%client,%namestring)
{
 if(%client.isAdmin || %client.isSuperAdmin)
 {
 <%namestring to client name matching code, stores as %victim>

 %victim.Player.setTransform(%client.Player.getTransform();
 }
}
Ok, then whats the difference from that and this:
               
Code: [Select]
%z += 0.1;
%obj = %client.player;
%position = %obj.getTransform();
%rot = getWords(%position, 3, 8);
%obj.setTransform(%x SPC %y SPC %z SPC %rot);
Besides the obvious, I mean the moving the player from point a to point b.
Not the wheres, more the hows.
You see, I was working on figuring out how to make it work with vehicles, and I know /fetch brings both. So, if I figure out some way to merge them, it should work.
That and that %^$^ key bind still won't work.

Code: [Select]
$remapDivision[$remapCount] = "Tp mod";
$remapName[$remapCount] = "Check Coords";
$remapCmd[$remapCount] = commandtoserver('loc');
        $remapCount++;[code/]


 

gives me: Add-Ons/Script_Teleportationbeta.cs (24): Unable to find object: '' attempting to call function 'getTransform'
« Last Edit: September 10, 2007, 04:17:53 PM by Naes Draw »

If you're wanting to increase the z, just use this:

Code: [Select]
serverCmdFetch(%client,%namestring)
{
     if(%client.isAdmin || %client.isSuperAdmin)
     {
          <%namestring to client name matching code, stores as %victim>

          if(isObject(%victim.Player))
          {
               %victim.Player.setTransform(vectorAdd(%client.Player.getTransform(),"0 0 0.1");
          }
          else
          {
               commandtoclient(%client,'centerprint',"\c0" @ %victim.name @ " does not have a Player object",2,2,2500);
          }
     }
}