Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Какая разница? Он использует функции GTA SA, а не SAMP'a.а с этого не прокатит, это с 0.3с версии аим
Какая разница? Он использует функции GTA SA, а не SAMP'a.а с этого не прокатит, это с 0.3с версии аим
struct stChatEntry
{
#pragma pack( 1 )
uint32_t SystemTime;
char szPrefix[28];
char szText[144];
uint8_t unknown[64];
int iType; // 2 - text + prefix, 4 - text (server msg), 8 - text (debug)
D3DCOLOR clTextColor;
D3DCOLOR clPrefixColor; // or textOnly colour
};
struct stChatInfo
{
#pragma pack( 1 )
int pagesize; // +0
void *pUnk; // +4
int iChatWindowMode; // +8 ( 2 - normal, 1 - light, 0 - disabled )
uint8_t bTimestamps; // +12
uint32_t iUnk; // + 13
char logFilePathChatLog[MAX_PATH+1]; // + 17
void *pChatbox_unknown[3]; // +288 // probably classes that handle fonts/sprites
D3DCOLOR clTextColor; // +290
D3DCOLOR clInfoColor; // + 294
D3DCOLOR clDebugColor; // +298
DWORD dwChatboxOffset; // +302
struct stChatEntry chatEntry[100]; // +306
DWORD dwChatLinesHeight; // +25506
DWORD dwDistanceTextToTimestamp; // 25510
};
:getChatEntryText
{
// call @getChatEntryText 1 id 0@ to 1@
1@ = samp.Base()
1@ += 0x212A24
0A8D: 1@ = read_memory 1@ size 4 virtual_protect 0
1@ += 0x132
0@ *= 252
005A: 1@ += 0@
1@ += 32
ret 1 1@
}
0AC8: 0@ = allocate_memory_size 1024
for 1@ = 97 to 99
0ab1: @getChatEntryText 1 1@ 2@
0AD3: string 0@ format "%s%c" 2@ 10
end
:getChatEntryText
1@ = samp.Base()
1@ += 0x212A24
0A8D: 1@ = read_memory 1@ size 4 virtual_protect 0
1@ += 0x132
0@ *= 252
005A: 1@ += 0@
1@ += 32
0ab2: ret 1 1@
/*
SA:MP Aimbot
Hold down fire & aim key
*/
if (cAimbot)
{
ReadProcessMemory(GetCurrentProcess(), (LPCVOID)0xB6F5F0, &gpoint, 4, 0);
if ((gpoint > 0) && (t == 0))
{
t = 1;
}
if (gpoint > 0)
{
pmtrx1 = gpoint + 0x14;
ReadProcessMemory(GetCurrentProcess(), (LPCVOID)pmtrx1, &pmtrx1, 4, 0);
xpos1 = pmtrx1 + 0x30;
ypos1 = pmtrx1 + 0x34;
ReadProcessMemory(GetCurrentProcess(), (LPCVOID)xpos1, &fxpos1, 4, 0);
ReadProcessMemory(GetCurrentProcess(), (LPCVOID)ypos1, &fypos1, 4, 0);
ReadProcessMemory(GetCurrentProcess(), (LPCVOID)0xB6F9CC, &fcxpos, 4, 0);
ReadProcessMemory(GetCurrentProcess(), (LPCVOID)0xB6F9D0, &fcypos, 4, 0);
ReadProcessMemory(GetCurrentProcess(), (LPCVOID)0xB6F3B8, &ptarget, 4, 0);
pped = ptarget + 0x79C;
ReadProcessMemory(GetCurrentProcess(), (LPCVOID)pped, &pped, 4, 0);
if (pped > 0)
{
pvectorx = pped + 0x44;
pvectory = pped + 0x48;
ReadProcessMemory(GetCurrentProcess(), (LPCVOID)pvectorx, &fpvectorx, 4, 0);
ReadProcessMemory(GetCurrentProcess(), (LPCVOID)pvectory, &fpvectory, 4, 0);
pmtrx2 = pped + 0x14;
ReadProcessMemory(GetCurrentProcess(), (LPCVOID)pmtrx2, &pmtrx2, 4, 0);
xpos2 = pmtrx2 + 0x30;
ypos2 = pmtrx2 + 0x34;
ReadProcessMemory(GetCurrentProcess(), (LPCVOID)xpos2, &fxpos2, 4, 0);
ReadProcessMemory(GetCurrentProcess(), (LPCVOID)ypos2, &fypos2, 4, 0);
php = pped + 0x540;
ReadProcessMemory(GetCurrentProcess(), (LPCVOID)php, &fphp, 4, 0);
if (fphp > 0)
{
fxpos2a = fxpos2;
fypos2a = fypos2; // до сюда дошел я, дальше хз
aa = fabs(fcxpos-fxpos2); // вот это че такое, как в клео эту херню преобразить
ab = fabs(fcypos-fypos2);
ac = sqrt(aa*aa+ab*ab); // это вроде корень квадратный или что хз
alpha = asin(aa/ac); // а эт синус, но я геометрию прогуливал, этo вроде
отношение углов треугольника, но я аим делаю епт, нах мне синусы и косинусы тут
нарисовались. Проясните ситуацию
beta = acos(aa/ac);
if ((fxpos1 > fxpos2)&&(fypos1 < fypos2))
{
beta = -beta;
}
if ((fxpos1 > fxpos2)&&(fypos1 > fypos2))
{
beta = beta;
}
if ((fxpos1 < fxpos2)&&(fypos1 > fypos2))
{
beta = (alpha + (3.14/2));
}
if ((fxpos1 < fxpos2)&&(fypos1 < fypos2))
{
beta = (-alpha - (3.14/2));
}
camxpos = beta+0.0389;
// Rotate camera
WriteProcessMemory(GetCurrentProcess(), (LPVOID)0xB6F258, (LPVOID)&camxpos, 4, NULL);
}
}
}
}
:aim_21
wait 0
0A8D: 1@ = read_memory 0xB6F5F0 size 4 virtual_protect 0 //ReadProcessMemory(GetCurrentProcess(), (LPCVOID)0xB6F5F0, &gpoint, 4, 0);
if
0019: 1@ > 0 //if (gpoint > 0)
jf @aim_21
:aim_23
wait 0
0A8E: 2@ = 1@ + 0x14 //pmtrx1 = gpoint + 0x14;
0A8D: 2@ = read_memory 2@ size 4 virtual_protect 0 //ReadProcessMemory(GetCurrentProcess(), (LPCVOID)pmtrx1, &pmtrx1, 4, 0);
0A8E: 3@ = 2@ + 0x30 //xpos1 = pmtrx1 + 0x30;
0A8E: 4@ = 2@ + 0x34 //ypos1 = pmtrx1 + 0x34;
0A8D: 5@ = read_memory 3@ size 4 virtual_protect 0 //ReadProcessMemory(GetCurrentProcess(), (LPCVOID)xpos1 (3@), &fxpos1 (5@), 4, 0);
0A8D: 6@ = read_memory 4@ size 4 virtual_protect 0 //ReadProcessMemory(GetCurrentProcess(), (LPCVOID)ypos1, &fypos1, 4, 0);
0A8D: 7@ = read_memory 0xB6F9CC size 4 virtual_protect 0 //ReadProcessMemory(GetCurrentProcess(), (LPCVOID)0xB6F9CC, &fcxpos, 4, 0);
0A8D: 8@ = read_memory 0xB6F9D0 size 4 virtual_protect 0 //ReadProcessMemory(GetCurrentProcess(), (LPCVOID)0xB6F9D0, &fcypos, 4, 0);
0A8D: 9@ = read_memory 0xB6F3B8 size 4 virtual_protect 0 //ReadProcessMemory(GetCurrentProcess(), (LPCVOID)0xB6F3B8, &ptarget, 4, 0);
0A8E: 10@ = 9@ + 0x79C // pped = ptarget + 0x79C;
0A8D: 10@ = read_memory 10@ size 4 virtual_protect 0 //ReadProcessMemory(GetCurrentProcess(), (LPCVOID)pped, &pped, 4, 0);
if
0019: 10@ > 0 //if (pped > 0)
jf @aim_23
:aim_25
wait 0
0A8E: 11@ = 10@ + 0x44 //pvectorx = pped + 0x44;
0A8E: 12@ = 10@ + 0x48 //pvectory = pped + 0x48;
0A8D: 13@ = read_memory 11@ size 4 virtual_protect 0 //ReadProcessMemory(GetCurrentProcess(), (LPCVOID)pvectorx, &fpvectorx, 4, 0);
0A8D: 14@ = read_memory 12@ size 4 virtual_protect 0 //ReadProcessMemory(GetCurrentProcess(), (LPCVOID)pvectory, &fpvectory, 4, 0);
0A8E: 15@ = 10@ + 0x14 //pmtrx2 = pped + 0x14;
0A8D: 15@ = read_memory 15@ size 4 virtual_protect 0 //ReadProcessMemory(GetCurrentProcess(), (LPCVOID)pmtrx2, &pmtrx2, 4, 0);
0A8E: 16@ = 15@ + 0x30 //xpos2 = pmtrx2 + 0x30;
0A8E: 17@ = 15@ + 0x34 //ypos2 = pmtrx2 + 0x34;
0A8D: 18@ = read_memory 16@ size 4 virtual_protect 0 //ReadProcessMemory(GetCurrentProcess(), (LPCVOID)xpos2, &fxpos2, 4, 0);
0A8D: 19@ = read_memory 17@ size 4 virtual_protect 0 //ReadProcessMemory(GetCurrentProcess(), (LPCVOID)ypos2, &fypos2, 4, 0);
0A8E: 20@ = 10@ + 0x540 // php = pped + 0x540;
0A8D: 21@ = read_memory 20@ size 4 virtual_protect 0 //ReadProcessMemory(GetCurrentProcess(), (LPCVOID)php, &fphp, 4, 0);
if
0019: 21@ > 0 //if (fphp > 0)
jf @aim_25
:aim_27
wait 0
22@ = 18@ //fxpos2a = fxpos2;
23@ = 19@ //fypos2a = fypos2;
// ДАЛЬШЕ ХЗ =( =( =(
ну в первой части две последние строки можно этим заменить - 0AD2: $actor = player $PLAYER_CHAR targeted_actor //IF and SETМного лишнего кода.
Там можно пару строк снести, некоторые заменить опкодами SB.
этого не хватит, там есть функция fabs это в с++ получение модуля числа, а в клео нет опкода чтоб модуль получитьИспользуй:
Код:01FB: 10@ = square_root 10@ 0C04: math 12@ = arcsine 11@ 0C06: math 13@ = arccosine 11@
этого не хватит, там есть функция fabs это в с++ получение модуля числа, а в клео нет опкода чтоб модуль получить
if 0@<0
then
0@ *= -1
end
ок спасибо, но я в принципе догадывался что можно и так сделать=)Вот тебе модульКод:if 0@<0 then 0@ *= -1 end
модуль эт расстояние от числа до нуля (положительный всегда типо он)Насколько я помню алгебру, то любое число в модуле будет выше нуля. Могу ошибаться.
ок спасибо, но я в принципе догадывался что можно и так сделать=)
Но, теперь мне не найти опкод для вычитания переменных. 0A8E: 4@ = 5@ + 6@ вот сложение есть, вычитание не найти
var
1@ : float
2@ : float
end
1@ += 2@
ок, а это все переменные тогда в скрипте должны быть float?Код:var 1@ : float 2@ : float end 1@ += 2@