asm problem

Posts 18 of 8 · Page 1 of 1
Code:
teleport proc x:word y:word z:word
pushad
mov eax, player1 ; player1 is the address
mov edx, dword ptr ds:[eax]
add edx, dword ptr ofs_new_x
mov [edx], word ptr x
add edx, 4h
mov [edx], word ptr y
add edx, 4h
mov [edx], word ptr z
popad
ret
teleport endp
im trying to make a teleport hack in asm for a game. but it will not work. in c++, i would do this, and it would work:
Code:
void teleport(float x, float y, float z)
{
	local = *(cPlayer**)(0x004E4DBC);
	local->pos.x = x;
	local->pos.y = y;
	local->pos.z = z;
}
can anyone help?

@.::SCHiM::.
@Void
Quote Originally Posted by kibbles18 View Post
Code:
teleport proc x:word y:word z:word
pushad
mov eax, player1 ; player1 is the address
mov edx, dword ptr ds:[eax]
add edx, dword ptr ofs_new_x
mov [edx], word ptr x
add edx, 4h
mov [edx], word ptr y
add edx, 4h
mov [edx], word ptr z
popad
ret
teleport endp
im trying to make a teleport hack in asm for a game. but it will not work. in c++, i would do this, and it would work:
Code:
void teleport(float x, float y, float z)
{
	local = *(cPlayer**)(0x004E4DBC);
	local->pos.x = x;
	local->pos.y = y;
	local->pos.z = z;
}
can anyone help?

@.::SCHiM::.
@Void

what game , decent games usually keep your pos server side.
Quote Originally Posted by SNal2F View Post
what game , decent games usually keep your pos server side.
Yeah, your local position is server sided but your local Camera position is not. PlayerMgr points to its object.
Quote Originally Posted by CAFlames View Post


Yeah, your local position is server sided but your local Camera position is not. PlayerMgr points to its object.

in asm for a game, he didnt say what game. Ya you can move your camera but it doesnt mean u can kill someone if the game handles bullet flight pattern from the server.......lithtech is a shit engine try that crap on a decent game.......
assualtcube lol... i made an aimbot in c++ and im converting it to asm so i did this for a test because i found the position i can write to
Well ASM wont work in c++ unless you tell it when your gonna start and end the code, and is the hack 100% ASM? if not, your making it harder for yourself, And you code looks fine.
Code:
void ASM_Teleport(float x, float y, float z)//or what ever the data type is
{
     _asm
    {
        mov eax, player1 ; player1 is the address
        mov edx, dword ptr ds:[eax]
        add edx, dword ptr ofs_new_x
        mov [edx], word ptr x
        add edx, 4h
        mov [edx], word ptr y
        add edx, 4h
        mov [edx], word ptr z
    }
}
Im converting to 100% asm and compiling in masm if that helps

And when is it appropriate to use ds: ?
Quote Originally Posted by kibbles18 View Post
Im converting to 100% asm and compiling in masm if that helps

And when is it appropriate to use ds: ?
Normally the compiler understands that the first operand is the destination (ds) operand, and the second operand is the source operand (ss). Older compilers may complain about that if you simply do:

Code:
mov ebx, dword ptr[eax]
so instead you do:

Code:
mov ebx, dword ptr ds:[eax]
It's just to make things clearer. MASM can handle code both with and without the ds: or ss: prefix.
Posts 18 of 8 · Page 1 of 1

Post a Reply

Tags for this Thread

None

Need help?