You are not logged in.
@CrazyDude69 -
.data:00969130 _cheatEnabled db 5Ch dup(?) ; 0 ; DATA XREF: _sub_407400+4r .data:00969130 ; _cheatEnableLegimate:loc_438381r .data:00969130 ; _cheatEnableLegimate+1Cw .data:00969130 ; _initCheats+8o ...
Это не функция что бы ее вызывать. Тебе скорее всего нужно вот это:
.text:00438370 _cheatEnableLegimate proc near ; CODE XREF: _opcode_handler_26+510p
var g: procedure (Value: Integer); cdecl; begin @g := Pointer($00438370); end.
С наступающим Новым Годом!
А не проще ли вызывать функцию сохранения в коде асма.
@CraZZZy-GameRRR -
0AD9: write_formatted_text "aaa%c%cbbb" in_file $hFile 13 10
@Wire - там есть.
Посмотри как выглядит экспортируемая функция, если как-то так: ?plus@@YAHHH@Z, то сделал что-то не то.
Прикрепил готовую dll и скрипт для примера.
@Wire - В свойствах проекта посмотри Соглашение о вызовах если __cdecl (/Gd), то pop 2, если __stdcall (/Gz), то pop 0.
@Wire - просто добавь к проекту.
Файл определения модуля (.def) Visual C++
@Wire -
mydll.cpp
__declspec(dllexport) int plus (int a, int b) {
return a + b;
}mydll.def
EXPORTS plus
{$CLEO}
0000:
while true
wait 0
if
0AB0: key_pressed 0x73
then
if
0AA2: 0@ = load_library "CLEO\mydll.dll" // IF and SET
then
if
0AA4: 1@ = get_proc_address "plus" library 0@ // IF and SET
then
0AA7: call_function 1@ num_params 2 pop 0 1 2 2@
0ACE: show_formatted_text_box "%d" 2@
end
0AA3: free_library 0@
end
end
end---
__cdecl (/Gd) pop 2 __stdcall (/Gz) pop 0
@mr.Andrei - может конфликтует с другими скриптами?
@mr.Andrei -
{$CLEO}
var
0@: Float = 1.0
1@: Float = 1.0
33@: Integer = 0
end
while true
wait 0
if and
0AB0: key_pressed 0x73
33@ > 150
then
0@ -= 0.01
if
0@ < 0.0
then
0@ = 0.0
end
33@ = 0
end
if and
0AB0: key_pressed 0x74
33@ > 150
then
0@ += 0.01
if
0@ > 1.0
then
0@ = 1.0
end
33@ = 0
end
if
1@ <> 0@
then
0ACE: show_formatted_text_box "%.2f" 0@
01EB: set_traffic_density_multiplier_to 0@
1@ = 0@
end
end
[youtube]http://www.youtube.com/watch?v=nCgQDjio … r_embedded[/youtube]
[youtube]http://www.youtube.com/watch?v=zaT7thTx … r_embedded[/youtube]
{$CLEO}
31@ = 0
0AC6: 0@ = label @lbl offset
0A8C: write_memory 0x469E2C size 4 value 0@ virtual_protect 1
0AC7: 1@ = var 31@ offset
0@ += 2
0A8C: write_memory 0@ size 4 value 1@ virtual_protect 0
while true
wait 0
if
31@ == 1
then
while true
wait 0
if and
$ONMISSION == 0
not Actor.Driving($PLAYER_ACTOR)
then
Break
end
end
0AA5: call 0x619060 num_params 1 pop 0 2
0ACE: show_formatted_text_box "SAVE OK"
31@ = 0
end
end
:lbl
hex
C705 00000000 01000000 // MOV DWORD PTR DS:[00000000], 1
B8 9B9A4600 // MOV EAX,00469A9B
FFE0 // JMP EAX
endПроверил все работает. Осталось добавить различных проверок:
0256: player $PLAYER_CHAR defined 0AA9: is_game_version_original
{$CLEO}
0AC6: 0@ = label @lbl offset
0A8C: write_memory 0x00469E2C size 4 value 0@ virtual_protect 1
0AC7: 1@ = var 31@ offset
0@ += 2
0A8C: write_memory 0@ size 4 value 1@ virtual_protect 0
while true
wait 0
{if
0AB0: key_pressed 0x73
then
0112: wasted_or_busted // mission only
if
31@ == 1
then
Player.Money($PLAYER_CHAR) += 1
31@ = 0
end
end}
end
// 0A93: end_custom_thread
:lbl
hex
C705 00000000 01000000 // MOV DWORD PTR DS:[00000000], 1
B8 9B9A4600 // MOV EAX,00469A9B
FFE0 // JMP EAX
end@Sergey81 - ну, как вариант:
0A8C: write_memory 0x0061907A size 4 value 0x90909090 virtual_protect 1 0A8C: write_memory 0x0061907E size 1 value 0x90 virtual_protect 1
@Sergey81 -
{$CLEO}
0AC6: 0@ = label @lbl offset
0A8C: write_memory 0x00469E2C size 4 value 0@ virtual_protect 1
0A93: end_custom_thread
:lbl
hex
B8 9B9A4600 // MOV EAX,00469A9B
FFE0 // JMP EAX
end
В цикле прочитать файл по одному знаку.
#include <iostream>
#include <fstream>
using namespace std;
int main (int argc, char *argv[])
{
char ch;
if (argc != 2)
{
cout << "Usage: <filename>\n";
return 1;
}
ifstream in(argv[1], ios::in | ios::binary);
if (!in)
{
cout << "Cannot open file.\n";
return 1;
}
while (in.get(ch))
cout << ch;
in.close();
return 0;
}
@fighter390 - в справке все есть.
Для 00E1: Документация по SCM -> GTA SA -> Номера клавиш.
Для 0AB0: CLEO 3 Code Library -> Список значений кнопок для 0AB0.
@Kostyan -
EVENT_SHOT_FIRED 15 EVENT_SHOT_FIRED_WHIZZED_BY 49
@BoPoH - извратский метод с помощью 0AC8\0AC9:
{$CLEO}
0000:
while true
wait 0
if
0AB0: key_pressed 0x73
then
if
0AA2: 0@ = load_library "msvcrt.dll" // IF and SET
then
if
0AA4: 1@ = get_proc_address "_ultoa" library 0@ // IF and SET
then
0AC8: 10@ = allocate_memory_size 16
0AA5: call 1@ num_params 3 pop 3 10 10@ 12345
0ACA: show_text_box 10@
0AC9: free_allocated_memory 10@
end
0AA3: free_library 0@
end
end
endили тоже извратский, но буфером служит локальная переменная:
{$CLEO}
0000:
while true
wait 0
if
0AB0: key_pressed 0x73
then
if
0AA2: 0@ = load_library "msvcrt.dll" // IF and SET
then
if
0AA4: 1@ = get_proc_address "_ultoa" library 0@ // IF and SET
then
11@ = 0
12@ = 0
13@ = 0
14@ = 0
0AC7: 10@ = var 11@ offset
0AA5: call 1@ num_params 3 pop 3 10 10@ 12345
0ACA: show_text_box 11@v
end
0AA3: free_library 0@
end
end
end
в особняке появляются телохранители
За это отвечает поток @GANGMEM
create_thread @GANGMEM
бесконечное оружие и т.д.
переменная $102
:MAIN_5391 if 100.0 > $102 // floating-point values else_jump @MAIN_5424 058C: $102 = percentage_completed jump @MAIN_5526 :MAIN_5424 if $91 == 0 // integer values else_jump @MAIN_5526 055B: $1352 = create_clothes_pickup 12 at -382.6 -585.9 25.3 03E5: text_box 'CUNTY' // ?o˜a® o?e??a ?ocya˜?e?a ˜ ?o ecy?e ?epceyy?! 055E: set_player $player_char max_health += 50 055F: set_player $player_char max_armour += 50 035E: set_player $player_char armour_to 200 0222: set_player $player_char health_to 200 wait 5000 03E5: text_box 'HELP61' // Te?ep? ? ˜ac ?eo?pa??¦e??oe ¦?c?o ?aypo? ? ?˜o??o? ?a?ac ?po¦?ocy? ? ˜cex yp.cpe?cy˜. $91 = 1 // integer values :MAIN_5526
@MB116 - из-за
jump @MAN
у тебя скрипт выполняется постоянно, ты его зациклил. Используй
0A93: end_custom_thread
, чтобы завершить скрипт:
{$CLEO}
#FAM1.Load
while not #FAM1.Available
wait 0
end
0@ = Actor.Create(CivMale, #FAM1, 2494.4622,-1680.92,13.3385)
#FAM1.Destroy
0A93: end_custom_thread
Было бы отлично если бы кто нибудь подсказал анимацию, как к примеру в департаменте полиции LV, где офицер сидит на одном колене и что-то ищет в выдвижной полке.
cop_ambient.ifp Copbrowse_in Copbrowse_loop Copbrowse_nod Copbrowse_out Copbrowse_shake