Hi,
Just a simple idea I had to help people who need to know their position in maps in case they wanna spawn something with a mod.
I used to use the print function to check my position every 0.1s and took screenshots of the values. I noticed some people here use the same method.
I created these huds to show the position in a more "comfortable" way.
1. Precache these strings
PHP Code:
game["labelx"] = &"^1X: ^7";
precacheString(game["labelx"]);
game["labely"] = &"^1Y: ^7";
precacheString(game["labely"]);
game["labelz"] = &"^1Z: ^7";
precacheString(game["labelz"]);
2. Call this function when the player spawns
PHP Code:
if(isdefined(self.hud_positionx))
self.hud_positionx destroy();
self.hud_positionx = newClientHudElem(self);
self.hud_positionx.x = -80;
self.hud_positionx.y = -15;
self.hud_positionx.alignx = "left";
self.hud_positionx.horzAlign = "right";
self.hud_positionx.vertAlign = "middle";
self.hud_positionx.fontScale = 1;
self.hud_positionx setValue(0);
self.hud_positionx.sort = 9986;
self.hud_positionx.label = game["labelx"];
if(isdefined(self.hud_positiony))
self.hud_positiony destroy();
self.hud_positiony = newClientHudElem(self);
self.hud_positiony.x = -80;
self.hud_positiony.y = 0;
self.hud_positiony.alignx = "left";
self.hud_positiony.horzAlign = "right";
self.hud_positiony.vertAlign = "middle";
self.hud_positiony.fontScale = 1;
self.hud_positiony setValue(0);
self.hud_positiony.sort = 9986;
self.hud_positiony.label = game["labely"];
if(isdefined(self.hud_positionz))
self.hud_positionz destroy();
self.hud_positionz = newClientHudElem(self);
self.hud_positionz.x = -80;
self.hud_positionz.y = 15;
self.hud_positionz.alignx = "left";
self.hud_positionz.horzAlign = "right";
self.hud_positionz.vertAlign = "middle";
self.hud_positionz.fontScale = 1;
self.hud_positionz setValue(0);
self.hud_positionz.sort = 9986;
self.hud_positionz.label = game["labelz"];
for(;;)
{
wait 0.1;
origin = self getOrigin();
self.hud_positionx setValue(origin[0]);
self.hud_positiony setValue(origin[1]);
self.hud_positionz setValue(origin[2]);
}