Invisible in C++?

Prefixobjekt

Active member
Joined
Aug 1, 2014
Messages
55
Reaction score
0
Hey guys

i have found a cleo code here

Code:
{$VERSION 3.1.1000}
{$CLEO .cs}

//-------------MAIN---------------
03A4: name_thread "OnfootData" 
0001: wait 3000 ms 

:OnfootData_19
0001: wait 0 ms 
00D6: if 
0AB0:   key_pressed 48 
004D: jump_if_false @OnfootData_19 

:OnfootData_38
0001: wait 0 ms 
8AB0:   not key_pressed 48 
004D: jump_if_false @OnfootData_38 
0AB1: call_scm_func @OnfootData_510 0 0@ 
000A: 0@ += 16864 
0A8D: 28@ = read_memory 0@ size 1 virtual_protect 1 
0A8C: write_memory 0@ size 1 value 195 virtual_protect 1 
00A0: store_actor $PLAYER_ACTOR position_to 25@ 26@ 27@ 
0ACD: show_text_highpriority "Invisible On." time 3000 
0002: jump @OnfootData_265 

:OnfootData_139
0001: wait 0 ms 
00A0: store_actor $PLAYER_ACTOR position_to 21@ 22@ 23@ 
0509: 20@ = distance_between_XY 21@ 22@ and_XY 25@ 26@ 
00D6: if 
8021:   not  20@ > 40.1 
004D: jump_if_false @OnfootData_265 
00D6: if 
0AB0:   key_pressed 48 
004D: jump_if_false @OnfootData_139 

:OnfootData_210
0001: wait 0 ms 
8AB0:   not key_pressed 48 
004D: jump_if_false @OnfootData_210 
0A8C: write_memory 0@ size 1 value 28@ virtual_protect 1 
0ACD: show_text_highpriority "Invisible Off." time 3000 
0002: jump @OnfootData_19 

:OnfootData_265
0001: wait 0 ms 
0A8C: write_memory 0@ size 1 value 28@ virtual_protect 1 
00A0: store_actor $PLAYER_ACTOR position_to 25@ 26@ 27@ 
02CE: 24@ = ground_z_at 25@ 26@ 27@ 
000F: 24@ -= 25.0 
0A96: 4@ = actor $PLAYER_ACTOR struct 
000A: 4@ += 20 
0A8D: 4@ = read_memory 4@ size 4 virtual_protect 0 
000A: 4@ += 48 
0A8C: write_memory 4@ size 4 value 25@ virtual_protect 0 
000A: 4@ += 4 
0A8C: write_memory 4@ size 4 value 26@ virtual_protect 0 
000A: 4@ += 4 
0A8C: write_memory 4@ size 4 value 24@ virtual_protect 0 
0001: wait 30 ms 
0A8C: write_memory 0@ size 1 value 195 virtual_protect 1 
0A96: 4@ = actor $PLAYER_ACTOR struct 
000A: 4@ += 20 
0A8D: 4@ = read_memory 4@ size 4 virtual_protect 0 
000A: 4@ += 48 
0A8C: write_memory 4@ size 4 value 25@ virtual_protect 0 
000A: 4@ += 4 
0A8C: write_memory 4@ size 4 value 26@ virtual_protect 0 
000A: 4@ += 4 
0A8C: write_memory 4@ size 4 value 27@ virtual_protect 0 
0002: jump @OnfootData_139 

:OnfootData_510
0AA2: 31@ = load_library "kernel32.dll" // IF and SET 
0AA4: 30@ = get_proc_address "GetModuleHandleA" library 31@ // IF and SET 
0AA7: call_function 30@ 1 pop 0 "samp.dll" 0@  
0AB2: ret 1 0@  :okey:

my question is this easy/possible to make in c++?

i will make this :D
 

P3ti

Active member
Joined
Feb 15, 2014
Messages
66
Reaction score
3
Yes, it's possible. The easiest way is to reduce Z coord in the outgoing sync data.

I made this code for you as an example, you can easily add this to FYP's s0beit release.
( https://code.google.com/p/mod-s0beit-sa/ )

Code:
bool HookedRakClientInterface::Send( BitStream * bitStream, PacketPriority priority, PacketReliability reliability, char orderingChannel )
{
	traceLastFunc( "HookedRakClientInterface::Send(BitStream)" );

	BYTE packetId;
	bitStream->Read(packetId);

	if(cheat_state->_generic.invisible)
	{
		if(packetId == ID_PLAYER_SYNC)
		{
			stOnFootData OutgoingOnFootData;

			bitStream->Read((PCHAR)&OutgoingOnFootData, sizeof(stOnFootData));

			OutgoingOnFootData.fPosition[2] -= 15.0f;

			bitStream->Reset();

			bitStream->Write((BYTE)ID_PLAYER_SYNC);
			bitStream->Write((PCHAR)&OutgoingOnFootData, sizeof(stOnFootData));
		}
		else if(packetId == ID_VEHICLE_SYNC)
		{
			stInCarData OutgoingInCarData;

			bitStream->Read((PCHAR)&OutgoingInCarData, sizeof(stInCarData));

			OutgoingInCarData.fPosition[2] -= 20.0f;

			bitStream->Reset();

			bitStream->Write((BYTE)ID_VEHICLE_SYNC);
			bitStream->Write((PCHAR)&OutgoingInCarData, sizeof(stInCarData));
		}
	}
	
	return g_RakClient->GetRakClientInterface()->Send( bitStream, priority, reliability, orderingChannel );
}

There are more advanced ways than this to make yourself invisible, but this is the easiest I think.
 
Top