IMG

 
IMG
IMG   IMG
  Welcome to GTAForums! Be sure to check out the Grand Theft Auto V Forum.

You are not registered! (If you are, click here to login) Registering is fast, free and easy and allows you to instantly reply to any topic on GTAForums.
Why wait? Click here to register your own unique username and become part of the ever-growing community!


( Log In | Register | Revalidate Validation E-mail )
Quick Log-In:
  IMG
       
>
Forum Rules Attention:

The Mod Showroom is only for posting previews/downloads of completed or near finished mods.
All help topics should be posted in the Editing Discussion forums. Help topics and mod requests posted here will be locked or binned. Thank you.
GTAGarage.com : Free mod hosting, attach your files and screenshots to your topics
GTAModding.com : A wiki for everything related to GTA modding, including documentation and tutorials

  Reply to this topicStart new topicStart Poll

 [REL|SA|CLEO] Cop Bikers Overhaul

 Unique cop biker for each city!
 
SilentPL  
Posted: Thursday, Feb 24 2011, 12:58
Quote Post


Senior File Manager
Group Icon
Group: Members
Joined: Feb 1, 2010

pl.gif

Member Award




Cop Bikers Overhaul 1.0



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 smile.gif


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:

CODE
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:

user posted image
Two SF bikers.

user posted image
Annoyed LV biker chases poor taxi driver (running on GTA: The '95 Story mod).


Mirror download:

GTA Gangstas mirror


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, 1.0 EU is possibly compatible too). Contact me if you have any problems with it.


Too lazy to download whole package just to see the source?

Here it is, then.

CODE
{$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


This post has been edited by SilentPL on Sunday, Jan 1 2012, 21:16

O This mod is hosted at GTAGarage.com

Screenshots:
GTAGarage screenshot GTAGarage screenshot

Downloads:
Download Cop Bikers Overhaul 1.0 - 0.008MB, uploaded on Feb 24 2011, downloaded 2039 times

Click here to view the mod at GTAGarage

Users WebsitePMMSNXbox Live
  Top
 

 
ThePixel  
Posted: Thursday, Feb 24 2011, 13:50
Quote Post


Please Check My Primary Account
Group Icon
Group: Members
Joined: Feb 24, 2011

cw.gif

XXXXX



Wow! Just wow! Keep up the good work...I will download this for sure.

Have some cookie.gif cookie.gif cookie.gif
PM
  Top
 

 
Bandiits  
Posted: Thursday, Mar 3 2011, 19:18
Quote Post


Mats
Group Icon
Group: Members
Joined: Feb 22, 2007

lt.gif

XXXXX



Nice! Keep up the good work! icon14.gif
PM
  Top
 

 

1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)

0 Members:

Topic Options Reply to this topicStart new topicStart Poll
Search topic for posted by (exact match)



 
IMG IMG