You are not logged in.
ok, works now, thanks
does adding extra info normally make sense by cleo scripts?
IMO it never makes sense as you shouldn't decompile your own scripts... ever
Before creating opcodes you must have basic knowledges on how opcode-handler works.
But, as seen on GTAF, he doesn't even know the basics of SCM, so it would be only a waste of time
Провери етий код:
:SEASIDE_CITY_86 wait 0 if and Model.Available(#GREENWOO) Model.Available(#FAM1) Model.Available(#FAM2) else_jump @SEASIDE_CITY_86 Actor.PutAt($PLAYER_ACTOR, 1004.04, -1822.31, 14.4453) fade 0 2000
Я давно не писаль по-русски
@up
Ах, я забыль етого.
Name is too long. 7 chars is max.
Looks like the CLEO 4.1.1.30f corrupts car_generators which generate newly added vehicles. For me, it keeps crashing at 0x0047BA64 (mov [eax+CParkedGenerator.field_D], cl at 0A17 opcode handler) with added some vehicles and incerased limit using SALA. With 4.1.1.30 it works fine.
Also, some other people reports this bug aswell.
It does not exist. Unless you have 64GB RAM to store whole SA map in it.
Cool, but mod that you've linked controls it via CLEO script. Mine injects some ASM codes and just shuts down.
[center][large]Cop Bikers Overhaul 1.0[/large][/center]
Overhaul? Huh?
By default, GTA SA has unique cop model for each city. However, there's only one cop biker for whole state. It has a bit of nonsense, as his model name apparently tells that is a LS biker. Also, Rockstar left in gta3.img two fully usable models of bikers for SF and LV.
Why not make them usable? This mod (or rather, this plugin) adds them to the city, as they should be placed, according to their names.
Believe me or not, that mod doesn't spawn cops by itself, only hacks the EXE routines. However, you even don't have to believe me, as mod is open sourced
This mod is compatible with the CLEO 3/4 Libraries found here:
http://cleo.sannybuilder.com/
Put cbo.cs in GTA San Andreas\CLEO directory and peds.ide in GTA San Andreas\data directory to install the mod.
If your peds.ide file is modified, add mod lines by yourself by pasting them below #---ADD NEW PEDS HERE line. You have to paste these two lines:
272, sfpdm1, sfpdm1, COP, STAT_COP, swat, 1FFF, 0, null, 9,9, PED_TYPE_EMG,VOICE_EMG_MCOP1 ,VOICE_EMG_MCOP6 273, lvpdm1, lvpdm1, COP, STAT_COP, swat, 1FFF, 0, null, 9,9, PED_TYPE_EMG,VOICE_EMG_MCOP1 ,VOICE_EMG_MCOP6
You don't have to worry about cop models, as they are in all SA copies in gta3.img archive, just unused.
Screenshots:
Annoyed LV biker chases poor taxi driver (running on GTA: The '95 Story mod).
Download:
Known bugs:
As mod modifies several hardcoded routines, it might crash on some EXE versions (1.0 US HOODLUM and Compact are tested and bug free). Contact me if you have any problems with it.
Too lazy to download whole package just to see the source?
Here it is, then.
{$CLEO} { Cop Bikers Overhaul 1.0 Created by Silent } 0A9F: 0@ = current_thread_pointer 000A: 0@ += 0x10 0A8D: 0@ = read_memory 0@ size 4 virtual_protect 0 0A8F: 3@ = 0@ - @_copBikerModelsByTown 0A8F: 2@ = 0@ - @CCopPed__getBikerModel 000A: 2@ += 0x8 0A8C: write_memory 2@ size 4 value 3@ virtual_protect 0 // mov eax, _copBikerModelsByTown[eax*4] 000A: 2@ += 0x1A 0A8C: write_memory 2@ size 4 value 3@ virtual_protect 0 // mov eax, _copBikerModelsByTown[ecx*4] 000A: 2@ += 0x1E 0A8C: write_memory 2@ size 4 value 3@ virtual_protect 0 // mov eax, _copBikerModelsByTown[ecx*4] 0A8F: 2@ = 0@ - @_checkBikerModel 000A: 2@ += 0x3 0A8C: write_memory 2@ size 4 value 3@ virtual_protect 0 // mov eax, _copBikerModelsByTown[ecx*4] 000A: 2@ += 0x10 0A8E: 1@ = 2@ + 0x4 0A8F: 1@ = 0x407C8D - 1@ 0A8C: write_memory 2@ size 4 value 1@ virtual_protect 0 // jnz loc_407C8D 000A: 2@ += 0x15 0A8E: 1@ = 2@ + 0x4 0A8F: 1@ = 0x407CFE - 1@ 0A8C: write_memory 2@ size 4 value 1@ virtual_protect 0 // jz loc_407CFE 000A: 2@ += 0x5 0A8E: 1@ = 2@ + 0x4 0A8F: 1@ = 0x407CB3 - 1@ 0A8C: write_memory 2@ size 4 value 1@ virtual_protect 0 // jmp loc_407CB3 0A8F: 2@ = 0@ - @_reloadCopModels 000A: 2@ += 0x1B 0A8E: 1@ = 2@ + 0x4 0A8F: 1@ = 0x56E230 - 1@ 0A8C: write_memory 2@ size 4 value 1@ virtual_protect 0 // call _getPlayerCWanted 000A: 2@ += 0x12 0A8E: 1@ = 2@ + 0x4 0A8F: 1@ = 0x56E230 - 1@ 0A8C: write_memory 2@ size 4 value 1@ virtual_protect 0 // call _getPlayerCWanted 000A: 2@ += 0x45 0A8E: 1@ = 2@ + 0x4 0A8F: 1@ = 0x407180 - 1@ 0A8C: write_memory 2@ size 4 value 1@ virtual_protect 0 // call _random 000A: 2@ += 0x41 0A8C: write_memory 2@ size 4 value 3@ virtual_protect 0 // mov eax, _copBikerModelsByTown[edi*4] 000A: 2@ += 0x45 0A8E: 1@ = 2@ + 0x4 0A8F: 1@ = 0x409C10 - 1@ 0A8C: write_memory 2@ size 4 value 1@ virtual_protect 0 // call CStreaming__releaseModel 000A: 2@ += 0x1E 0A8E: 1@ = 2@ + 0x4 0A8F: 1@ = 0x409C10 - 1@ 0A8C: write_memory 2@ size 4 value 1@ virtual_protect 0 // call CStreaming__releaseModel 000A: 2@ += 0xA 0A8C: write_memory 2@ size 4 value 3@ virtual_protect 0 // mov edx, _copBikerModelsByTown[esi*4] 000A: 2@ += 0x6 0A8E: 1@ = 2@ + 0x4 0A8F: 1@ = 0x409C10 - 1@ 0A8C: write_memory 2@ size 4 value 1@ virtual_protect 0 // call CStreaming__releaseModel 000A: 2@ += 0x7 0A8C: write_memory 2@ size 4 value 3@ virtual_protect 0 // mov eax, _copBikerModelsByTown[esi*4] 000A: 2@ += 0x17 0A8E: 1@ = 2@ + 0x4 0A8F: 1@ = 0x409C10 - 1@ 0A8C: write_memory 2@ size 4 value 1@ virtual_protect 0 // call CStreaming__releaseModel 000A: 2@ += 0x10 0A8E: 1@ = 2@ + 0x4 0A8F: 1@ = 0x409C10 - 1@ 0A8C: write_memory 2@ size 4 value 1@ virtual_protect 0 // call CStreaming__releaseModel 000A: 2@ += 0x1E 0A8E: 1@ = 2@ + 0x4 0A8F: 1@ = 0x409C10 - 1@ 0A8C: write_memory 2@ size 4 value 1@ virtual_protect 0 // call CStreaming__releaseModel 000A: 2@ += 0x1C 0A8E: 1@ = 2@ + 0x4 0A8F: 1@ = 0x4087E0 - 1@ 0A8C: write_memory 2@ size 4 value 1@ virtual_protect 0 // call CStreaming__requestModel 000A: 2@ += 0x7 0A8C: write_memory 2@ size 4 value 3@ virtual_protect 0 // mov eax, _copBikerModelsByTown[edi*4] 000A: 2@ += 0x8 0A8E: 1@ = 2@ + 0x4 0A8F: 1@ = 0x4087E0 - 1@ 0A8C: write_memory 2@ size 4 value 1@ virtual_protect 0 // call CStreaming__requestModel 000A: 2@ += 0xF 0A8E: 1@ = 2@ + 0x4 0A8F: 1@ = 0x4087E0 - 1@ 0A8C: write_memory 2@ size 4 value 1@ virtual_protect 0 // call CStreaming__requestModel 0A8F: 1@ = 0@ - @_checkBikerModel 000E: 1@ -= 0x407C70 0A8C: write_memory 0x407C6B size 1 value 0xE9 virtual_protect 1 0A8C: write_memory 0x407C6C size 4 value 1@ virtual_protect 1 // jmp _checkBikerModel 0A8F: 1@ = 0@ - @CCopPed__getBikerModel 000E: 1@ -= 0x5DDD8A 0A8C: write_memory 0x5DDD85 size 1 value 0xE8 virtual_protect 1 0A8C: write_memory 0x5DDD86 size 4 value 1@ virtual_protect 1 // call CCopPed__getBikerModel 0A8C: write_memory 0x5DDD8B size 1 value 0x1E virtual_protect 1 // jmp loc_5DDCAD 0A8F: 1@ = 0@ - @_reloadCopModels 000E: 1@ -= 0x40A155 0A8C: write_memory 0x40A150 size 1 value 0xE9 virtual_protect 1 0A8C: write_memory 0x40A151 size 4 value 1@ virtual_protect 1 // jmp _reloadCopModels 0A8F: 1@ = 0@ - @_patchCopModelIDSwitch 0A8C: write_memory 0x464F58 size 1 value 0xF0 virtual_protect 1 // add ecx, -272 0A8C: write_memory 0x464F5E size 1 value 0x10 virtual_protect 1 // cmp ecx, 10h 0A8C: write_memory 0x464F64 size 4 value 1@ virtual_protect 1 // jmp ds:_patchCopModelIDSwitch[ecx*4] 0A8C: write_memory 0x8A5AB0 size 4 value 0x0 virtual_protect 1 0A93: end_custom_thread :_checkBikerModel hex 8B048D00000000 // mov eax, _copBikerModelsByTown[ecx*4] 8D0480 // lea eax, [eax+eax*4] 381C85D04C8E00 // cmp _loadedObjectInfo.bLoaded[eax*4], bl 0F8500000000 // jnz loc_407C8D A19C5A8A00 // mov eax, _copBikeModel 8D1480 // lea edx, [eax+eax*4] 381C95D04C8E00 // cmp _loadedObjectInfo.bLoaded[edx*4], bl 0F8400000000 // jz loc_407CFE E900000000 // jmp loc_407CB3 end :CCopPed__getBikerModel hex A11867BA00 // mov eax, _playerTownNumber 8B048500000000 // mov eax, _copBikerModelsByTown[eax*4] 8D0C80 // lea ecx, [eax+eax*4] 53 // push ebx 8A1C8DD04C8E00 // mov bl, _loadedObjectInfo.bLoaded[ecx*4] B201 // mov dl, 1 38D3 // cmp bl, dl 741E // jz short CCopPed__getBikerModel+3C 33C9 // xor ecx, ecx {CCopPed__getBikerModel+1F} 8B048D00000000 // mov eax, _copBikerModelsByTown[ecx*4] 8D0480 // lea eax, [eax+eax*4] 381485D04C8E00 // cmp _loadedObjectInfo.bLoaded[eax*4], dl 740B // jz short CCopPed__getBikerModel+3E 41 // inc ecx 83F904 // cmp ecx, 4 7CE7 // jl short CCopPed__getBikerModel+1F 83C8FF // or eax, 0FFFFFFFFh {CCopPed__getBikerModel+3C} 5B // pop ebx C3 // ret {CCopPed__getBikerModel+3E} 8B048D00000000 // mov eax, _copBikerModelsByTown[ecx*4] 5B // pop ebx C3 // ret end :_reloadCopModels hex 83FF04 // cmp edi, 4 0F8FAC010000 // jg _reloadCopModels+1B5 A11429B700 // mov eax, _activeInterior 85C0 // test eax, eax 0F859F010000 // jnz _reloadCopModels+1B5 56 // push esi 57 // push edi 6AFF // push 0FFFFFFFFh E800000000 // call _getPlayerCWanted 8B7C2410 // mov edi, [esp+0Ch+arg_0] 83C404 // add esp, 4 85C0 // test eax, eax 7466 // jz short _reloadCopModels+90 6AFF // push 0FFFFFFFFh E800000000 // call _getPlayerCWanted 8B482C // mov ecx, [eax+CWanted.currentWantedLevel] 83C404 // add esp, 4 83F903 // cmp ecx, 3 7D54 // jge short _reloadCopModels+90 85FF // test edi, edi 7450 // jz short _reloadCopModels+90 A0BF549600 // mov al, _disablePoliceBikes 84C0 // test al, al 7547 // jnz short _reloadCopModels+90 8B3584CBB700 // mov esi, _currentTime 3935C0549600 // cmp dword_9654C0, esi 7329 // jnb short _reloadCopModels+80 8A15BE549600 // mov dl, byte_9654BE 84D2 // test dl, dl 0F94C0 // setz al 6850C30000 // push C350h 6830750000 // push 7530h A2BE549600 // mov byte_9654BE, al E800000000 // call _random 83C408 // add esp, 8 03C6 // add eax, esi A3C0549600 // mov dword_9654C0, eax {_reloadCopModels+80} A0BE549600 // mov al, byte_9654BE 84C0 // test al, al 740E // jz short _reloadCopModels+97 BF04000000 // mov edi, 4 EB07 // jmp short _reloadCopModels+97 {_reloadCopModels+90} C605BE54960000 // mov byte_9654BE, 0 {_reloadCopModels+97} 8B04BDA05A8A00 // mov eax, _copModelsByTown[edi*4] 8D1480 // lea edx, [eax+eax*4] B101 // mov cl, 1 380C95D04C8E00 // cmp _loadedObjectInfo.bLoaded[edx*4], cl 0F85D3000000 // jnz _reloadCopModels+183 8B04BD00000000 // mov eax, _copBikerModelsByTown[edi*4] 8D1480 // lea edx, [eax+eax*4] 380C95D04C8E00 // cmp _loadedObjectInfo.bLoaded[edx*4], cl 0F85BC000000 // jnz _reloadCopModels+183 8B04BD8C5A8A00 // mov eax, _copcarModelsByTown[edi*4] 8D0480 // lea eax, [eax+eax*4] 380C85D04C8E00 // cmp _loadedObjectInfo.bLoaded[eax*4], cl 0F85A5000000 // jnz _reloadCopModels+183 33F6 // xor esi, esi 8BFF // mov edi, edi {_reloadCopModels+E2} 3BF7 // cmp esi, edi 0F848F000000 // jz _reloadCopModels+179 83FF04 // cmp edi, 4 745C // jz short _reloadCopModels+14B 8B0CB5A05A8A00 // mov ecx, _copModelsByTown[esi*4] 51 // push ecx E800000000 // call CStreaming__releaseModel 8B14B5A05A8A00 // mov edx, _copModelsByTown[esi*4] 8B0495C8B0A900 // mov eax, _modelPtrs[edx*4] 0FBF480A // movsx ecx, word ptr [eax+0Ah] 81C1204E0000 // add ecx, 4E20h 51 // push ecx E800000000 // call CStreaming__releaseModel 83C408 // add esp, 8 8B14B500000000 // mov edx, _copBikerModelsByTown[esi*4] 52 // push edx E800000000 // call CStreaming__releaseModel 8B04B500000000 // mov eax, _copBikerModelsByTown[esi*4] 8B0C85C8B0A900 // mov ecx, _modelPtrs[eax*4] 0FBF510A // movsx edx, word ptr [ecx+0Ah] 81C2204E0000 // add edx, 4E20h 52 // push edx E800000000 // call CStreaming__releaseModel 83C408 // add esp, 8 {_reloadCopModels+14B} 8B14B58C5A8A00 // mov edx, _copcarModelsByTown[esi*4] 52 // push edx E800000000 // call CStreaming__releaseModel 8B04B58C5A8A00 // mov eax, _copcarModelsByTown[esi*4] 8B0C85C8B0A900 // mov ecx, _modelPtrs[eax*4] 0FBF510A // movsx edx, word ptr [ecx+0Ah] 81C2204E0000 // add edx, 4E20h 52 // push edx E800000000 // call CStreaming__releaseModel 83C408 // add esp, 8 {_reloadCopModels+179} 46 // inc esi 83FE04 // cmp esi, 4 0F8C5FFFFFFF // jl _reloadCopModels+E2 {_reloadCopModels+183} 8B0CBDA05A8A00 // mov ecx, _copModelsByTown[edi*4] 6A02 // push 2 51 // push ecx E800000000 // call CStreaming__requestModel 8B04BD00000000 // mov eax, _copBikerModelsByTown[edi*4] 6A02 // push 2 50 // push eax E800000000 // call CStreaming__requestModel 8B0CBD8C5A8A00 // mov ecx, _copcarModelsByTown[edi*4] 6A02 // push 2 51 // push ecx E800000000 // call CStreaming__requestModel 83C418 // add esp, 18h 5F // pop edi 5E // pop esi {_reloadCopModels+1B5} C3 // ret end :_patchCopModelIDSwitch hex 684F4600 // loc_464F68 684F4600 // loc_464F68 B54F4600 // locret_464FB5 B54F4600 // locret_464FB5 B54F4600 // locret_464FB5 B54F4600 // locret_464FB5 B54F4600 // locret_464FB5 B54F4600 // locret_464FB5 684F4600 // loc_464F68 684F4600 // loc_464F68 684F4600 // loc_464F68 A84F4600 // loc_464FA8 684F4600 // loc_464F68 784F4600 // loc_464F78 884F4600 // loc_464F88 984F4600 // loc_464F98 684F4600 // loc_464F68 end :_copBikerModelsByTown hex 20010000 // 288 Cop for countryside 1C010000 // 284 Cop for LS 10010000 // 272 Cop for SF 11010000 // 273 Cop for LV 00000000 // Align end
Здесь отдельный скрипт ненужный
if
1@ >= 2
jump @NONAME_6
Это плохой провер, и я думаю что он тоже ненужный.
А как сделать что бы на этоже кнопку он выключался
Попробуй этого скрипта:
0000: NOP :NONAME wait 0 if 0256: player 0 defined else_jump @NONAME if 0AB0: key_pressed 106 else_jump @NONAME :NONAME_1 wait 0 03F0: enable_text_draw 1 0226: 0@ = actor $PLAYER_ACTOR health 03E4: enable_text_draw_align_right 1 033F: set_text_draw_letter_size 0.2 0.5 0340: set_text_draw_RGBA 255 250 250 255 081C: draw_text_outline 1 RGBA 0 0 0 0 045A: draw_text_1number 582.0 69.0 GXT 'NUMBER' number 0@ if 8AB0: not key_pressed 106 // это выклюуатся скрипт else_jump @NONAME jump @NONAME_1
Is this possible to fix CLEO4 incompatibility with this Ryosuke's plugin?
http://hotmist.ddo.jp/beta/VirtualIMG.rar
With CLEO4, plugin just can't replace models, as it does.
Edit:
Heard that Alexander's GTA IV HUD isn't working with CLEO4 too.
No. I switched it in CLEO. Does 3d-sound still work unnormally?
Yep
Edit: Lowered hardware sound acceleration value in dxdiag from 4 to 3 and it works now
Ohwow, ASI now became huge. Any updates apart fron this?
And how about that sound bug (posted ages ago)?
Maybe you should try "wt+"? I can't understand a difference between at and wt
Edit: You've selected 'As is' case converting in SB option? 'cos I've had the same problem when my case converting was set to 'uppercase' - "AT+" =/= "at+"
GTAG v2 (all about modding) - Coming Soon.
Any terms on when it will happen?
I believe that Deji will open v2 when he'll finish some things and additional languages translations. However v1 has many modding infos also
Я думаю уто етот опкод будет хороший - мой руский язык может "переводить" твой вопрос плохо, извините если это не то
0491: actor $PLAYER_ACTOR has_weapon 46
Are you sure that you've followed this color format?
HealthBar.Color=$FF1D19B4
Color is in ARGB format, means that in that example:
A == 0xFF
R == 0x1D
G == 0x19
B == 0xB4
That example will give you blue health bar.
Попробой етот скрипт, потому уто твой скрипт может дать 'Jump to 0 offset' ошибку:
Скрипт сделаный в высокопоставленней конструкций ('high-level construct', может быть плохо писаный )
0000: NOP while true wait 0 0470: 0@ = actor $PLAYER_ACTOR current_weapon 041A: 1@ = actor $PLAYER_ACTOR weapon 0@ ammo if or 0@ == 16 0@ == 17 0@ == 18 then if 1@ > 25 then 017B: set_actor $PLAYER_ACTOR weapon 0@ ammo_to 25 end end if or 0@ == 22 0@ == 23 0@ == 24 then if 1@ > 325 then 017B: set_actor $PLAYER_ACTOR weapon 0@ ammo_to 325 end end if or 0@ == 25 0@ == 26 0@ == 27 then if 1@ > 100 then 017B: set_actor $PLAYER_ACTOR weapon 0@ ammo_to 100 end end if or 0@ == 28 0@ == 29 0@ == 32 then if 1@ > 1200 then 017B: set_actor $PLAYER_ACTOR weapon 0@ ammo_to 1200 end end if or 0@ == 30 0@ == 31 then if 1@ > 600 then 017B: set_actor $PLAYER_ACTOR weapon 0@ ammo_to 600 end end if or 0@ == 33 0@ == 34 then if 1@ > 100 then 017B: set_actor $PLAYER_ACTOR weapon 0@ ammo_to 100 end end end
И как реализовать, когда покупаешь оружие в амуниции, чтоб выводилось на экран сообщение, что достигнут максимум патронов и не снимались деньги при дальнейшей покупке?
Все ammunation скрипт должны быть изменение.
Извините за мой плохой язык!
start_mission @FIRST
Ты замениш етот линию на:
start_mission 0
и всё будет хорошо
Но толко зто, что миссий должны иметь такой формат:
http://www.gtamodding.com/index.php?tit … _a_mission
мой первый пост в русском языке!
Method 2 and 3 make me confused. Where the game stores variables higher than 33? I believe, it goes forward to the next thread.
No - method 2 and 3 uses thread memory to store higher variables
:Variables hex 00 00 00 00 // 34@ 00 00 00 00 // 35@ 00 00 00 00 // 36@ 00 00 00 00 // 37@ 00 00 00 00 // 38@ 00 00 00 00 // 39@ 00 00 00 00 // 40@ end
Array is calculated to point this label
Also, if you using non-standart name for you FXT file, use 054C opcode to set gxt file as default gxt-table.
054C: use_GXT_table 'your filename here'
No, it isn't requested for FXT's ;P
if 4@ <> -1 then if 056E: car 4@ defined then
Both checks in fact do the same action, so you can remove '4@ <> -1'
Alien, how about that possible bug, which I've posted above?
I've told him that already at gtaforums
Deji, ini reading is not a problem, that's working fine. The problem is on chdir 0 - script can't go back to San Andreas directory to read main.scm size (and other files also). Without chdirs (and ini reading, cause gta_95.set is in GTA SA User Files) it works.
@down
I know this technicue too, but with this I can check only one conditional ;P
Yes, Sanny supports 'jf break'. This loop isn't a problem, because after commenting ini loads and both chdirs everything works fine.
And, while mission 0 is executed, game is fully loaded - about 4-5 second after full game load.
Hm, some bugs or my mistake?
In my mod I'm going to check main.scm size. At the end of mission 0 I've pasted:
0A99: chdir 1 // Reading some values from GTA SA User Files 0AF0: $KEY_TRUNKKEY = get_int_from_ini_file "gta_95.set" section "controls" key "trunkkey" 0AF0: $KEY_AIMKEY = get_int_from_ini_file "gta_95.set" section "controls" key "aimkey" 0A99: chdir 0 while true if 8A9A: not 1@ = openfile "data\script\main.scm" mode 0x6272 // IF and SET jf break wait 0 end 0A9C: 2@ = file 1@ size 01E5: show_text_1number_highpriority GXT 'NUMBER' number 2@ time 5000 flag 1 0A9B: closefile 1@ end_thread
The game reads values from gta_95.set without problems, but looks like it doesn't go back to SA directory. Checking main.scm size with reading integers (and both chdirs) commented works, adding waits don't make a difference.
Plus, game reads main.scm in that opcode format, but when I've used:
8A9A: not 1@ = openfile "data\script\main.scm" mode "rb" // IF and SET
game crashed.
Edit: I'm using the newest CLEO4 version, 4.1.1.25.