[Help?] Get Player Position
I am working on my first hack useing my own base, but that is not what I'm actually here to ask, I want to add a teleport feature and i was wondering if there is a way to get the player position like something like:
Code:
PushToConsole("PlayerPositionX 0");
PushToConsole("PlayerPositionY 0");
PushToConsole("PlayerPositionZ 0");
Is there even a ptc command for this, or is there a different way?
If so how would I "Get" the value and save it to an intiger or float?
ptc haha
u need to do its with player pointer look into solifys thread in eu section theres a sample u just need to change the pp
anyway pm me and ill give you a example how to save the values into a text file
Ok, I'll try that, thank you.
saving the position in a textfile is easy maybe you can do it on your own with solifys example
I did not mean in a texr file nessesarilly, just for the current game.
I know I saw something on how to get the position of a player then display it...
I think what I have now wil work just fine, what I mean by teleport hack is save your position and then teleport to it, cause what you are talking about sounds like telekill, that not what I looking for. Correct me if that's not what you're saying.
just use codedemons teleport
I tested my teleport method and it works, so I do not need much help on this, But i do have one more question.
I am trying to add a help menu to the hack that you can hide or show, but i can't find a decent way to print text on the screen. Can someone help me?
[php]
void PrintText(LPD3DXFONT Font, long x, long y, D3DCOLOR fontColor, char *text, ...)//Draw Text Function
{
RECT rct;
rct.left = x - 1;
rct.right = x + 1;
rct.top = y - 1 ;
rct.bottom = y + 1;
if(!text) { return; }
va_list va_alist;
char logbuf[256] = {0};
va_start (va_alist, text);
_vsnprintf (logbuf+strlen(logbuf), sizeof(logbuf) - strlen(logbuf), text, va_alist);
va_end (va_alist);
RECT FontRect = { x, y, x, y };
pFont->DrawText(NULL, logbuf, -1, &rct, DT_NOCLIP, fontColor);
}
[/php]
For this you would need Popfromconsole or popconsole made by mmbob
lol, yeah I not need a drawbox yet... I not working on a menu. I only want to make it so tapping Numbar pad 0 will toggle some help text, thank you, what do I put in for the D3DColor and font?