Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    2. News

    1. Red Dead Redemption 2

      1. News
      2. Red Dead Online
    1. GTA Online

      1. After Hours
      2. Find Lobbies & Players
      3. Guides & Strategies
      4. Vehicles
      5. Content Creator
      6. Help & Support
    2. Crews

      1. Events
      2. Recruitment
    1. Grand Theft Auto Series

    2. GTA Next

    3. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    4. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    5. GTA Chinatown Wars

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    9. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    12. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Forum Support

    2. Site Suggestions

Sign in to follow this  
Dyabda

[SA]Police Maverics

Recommended Posts

Dyabda

How to make sure that every city has its own police maverik?

The list of mouverics I added and their spawn place:


497, polmav = Countryside and desert


1206, polmav_ls = Los Santos



1326, polmav_sf = San Fierro


1573, polmav_lv = Las Venturas

42a9c4cded05.png

Edited by Dyabda

Share this post


Link to post
Share on other sites
Dyabda

You can help me? I just do not quite understand what to prescribe.

Share this post


Link to post
Share on other sites
Jack

Have you tried with Wanted Level Editor?

 

I assume you trying to build up your own code.

Stuff you're going to need:

GET_CITY_PLAYER_IS_IN //  0842: [email protected] = player $PLAYER_CHAR town_number0   //  outside the cities1   //  Los Santos2   //  San Fierro3   //  Las Venturas

There could be higher values if the level limit is increased with the fla like in the GTA Underground:
4    //  Liberty City5   //  Vice City6   //  Atlantis7   //  Bullworth8   //  Main Land Liberty

 

Memory addresses for the MODEL_POLMAV.

Edited by Jack

Share this post


Link to post
Share on other sites
Dyabda

Have you tried with Wanted Level Editor?

 

I assume you trying to build up your own code.

 

Stuff you're going to need:

GET_CITY_PLAYER_IS_IN //  0842: [email protected] = player $PLAYER_CHAR town_number0   //  outside the cities1   //  Los Santos2   //  San Fierro3   //  Las Venturas
There could be higher values if the level limit is increased with the fla like in the GTA Underground:

 

4    //  Liberty City5   //  Vice City6   //  Atlantis7   //  Bullworth8   //  Main Land Liberty

Memory addresses for the MODEL_POLMAV.

Thank you.

But what to do next?
I have very little experience with this, please tell me what to do next.
I'm not very good at memory addresses.
Edited by Dyabda

Share this post


Link to post
Share on other sites
Jack

Download WL Editor - Police Helis
Put Wanted Level Editor.cs and Wanted Level Editor.ini inside the cleo folder of gta sa directory.

 

The helicopters should match the city they belong to.

Edited by Jack

Share this post


Link to post
Share on other sites
Dyabda

Delete Post

Edited by Dyabda

Share this post


Link to post
Share on other sites
Jack

As far as I know the main part of the GTA Underground is an asi file which uses the ASI Loader (a plugin) just like CLEO and my mod is nothing else then a CLEO code which is functional through ASI Loader (most of the players {including me} use Silent's ASI Loader which comes with the cleo setup too).

Why is building a CLEO or asi code better then scm editing?
Save games will not be destroyed.
On the other hand if you modify main.scm the save games will be destroyed in most cases.

About your wl editor questions:
There are 6 diferent models for motorbike cops (as well as the rest of the stuff with the models):

BIKEPED1 = 284BIKEPED2 = 284BIKEPED3 = 284BIKEPED4 = 284BIKEPED5 = 284BIKEPED6 = 284

and Los Santos is ZONE1
ZONE1___BIKEPED1 = 284ZONE1___BIKEPED2 = 284ZONE1___BIKEPED3 = 284ZONE1___BIKEPED4 = 284ZONE1___BIKEPED5 = 284ZONE1___BIKEPED6 = 284

so if we want for example to have 284 (MODEL_LAPDM1) and 165 (MODEL_WMOMIB) at the same time:
ZONE1___BIKEPED1 = 284ZONE1___BIKEPED2 = 165ZONE1___BIKEPED3 = 284ZONE1___BIKEPED4 = 165ZONE1___BIKEPED5 = 284ZONE1___BIKEPED6 = 165

or:
ZONE1___BIKEPED1 = 165ZONE1___BIKEPED2 = 284ZONE1___BIKEPED3 = 165ZONE1___BIKEPED4 = 284ZONE1___BIKEPED5 = 165ZONE1___BIKEPED6 = 284

In order to speed things up a little bit:

Open Wanted Level Editor.ini with the Sanny Builder:
- search for ENABLE_GENERAL_SETTINGS and set it to 0,
- go to the begining of the file,
- press left CTRL and R,
- in the upper field put ZONE1___BIKEPED1 = 284
- in the lower field put ZONE1___BIKEPED1 = 165
- press ENTER and click Yes to all

- go to the begining of the file again,
- press left CTRL and R,
- in the upper field put ZONE1___BIKEPED3 = 284
- in the lower field put ZONE1___BIKEPED3 = 165
- press ENTER and click Yes to all

- go to the begining of the file again,
- press left CTRL and R,
- in the upper field put ZONE1___BIKEPED6 = 284
- in the lower field put ZONE1___BIKEPED6 = 165
- press ENTER and click Yes to all

SAVE the settings!!!

Pilots on the other hand can use only default models per star:
stars 0123 - cops
star4 - SWAT
star5 - FBI
stars6789... - Army

BUT you'll have to set Z1___ENABLE_JURI = 1 to Z1___ENABLE_JURI = 0:
- go to the begining of the file,
- press left CTRL and R,
- in the upper field put Z1___ENABLE_JURI = 1
- in the lower field put Z1___ENABLE_JURI = 0
- press ENTER and click Yes to all

SAVE the settings!!!

Pilots use cop models and if ENABLE_JURI is set to 1 their models constantly change according to ground vehicles in pursuit (I'll fix that stuff later).

Share this post


Link to post
Share on other sites
Dyabda

Delete post.

Edited by Dyabda

Share this post


Link to post
Share on other sites
Jack
But if they use your mod, why could not I find the .ini file with the settings?

 

You misunderstood what I said. Wl editor is not the part of GTA Underground.

Wl editor is another mod which works along with the current version of GTA Underground.

 

 

And is it possible to make sure that the file was in the data folder?

 

It's possible but there's no point - I won't do it.

 

 

Ped 6014 Will not spawn.

 

How can I remove the flasher from the military transport?

How to make the military go to the patriot?

 

 

Wl editor can not be used to create the new model (skin).

 

I think this topic has gone in the wrong direction. It should be about the police helicopters only...

Memory addresses for the MODEL_POLMAV:

0040B840    //  ; CStreaming::RequestModel(MODEL_POLMAV, true);      006C7A98    //  ; if (CStreaming::ms_aInfoForModel[MODEL_POLMAV].m_loadState == LOADSTATE_LOADED) {}006C6589    //  ; heli = CHeli::CHeli(MODEL_POLMAV, 4);0040B890    //  ; CStreaming::SetModelIsDeletable(MODEL_POLMAV);

If you have more questions about the wl editor then you should go to the appropriate mod showroom topic.

Edited by Jack

Share this post


Link to post
Share on other sites
Dyabda

I think this topic has gone in the wrong direction.

 

 

Sorry, just got carried away by studying your script.

 

0040B840 // ; CStreaming::RequestModel(MODEL_POLMAV, true);
006C7A98 // ; if (CStreaming::ms_aInfoForModel[MODEL_POLMAV].m_loadState == LOADSTATE_LOADED) {}
006C6589 // ; heli = CHeli::CHeli(MODEL_POLMAV, 4);
0040B890 // ; CStreaming::SetModelIsDeletable(MODEL_POLMAV);

 

What is this code?

 

And yet, how can I add a police maverick without your mod, as GTA UNDEHROUND did, I'm interested and I want to try to add it myself, but just how?

Share this post


Link to post
Share on other sites
Dyabda

Please help, I really want to know how to do this myself, without the help of the Wanted Level Editor

Share this post


Link to post
Share on other sites
Jack

Start with the tutorials.
Also use Sanny Builder (click Help, Contents, coding).
There's also Help, contents, articles, coding bible I and II.

Learn about the loops, conditional checks and variable types...

Don't study huge scripts. Read the smaller ones or even better - make a few simple cleo codes by yourself.

Learn how to use the opcode databases:
- Sanny Builder, IDE Tools, Opcode Search,
- Opcode Database with the descriptions.

Search for the words that match to your ideas in the opcode databases. For example model, heli, town, zone, memory...
That's for the CLEO code.

For an ASI code you need experience in building codes and the basic c++ knowladge:
plugin SDK by DK22Pac

How it was done in GTA Underground?
Well I don't know exactly, but I'm pretty sure that those memory addresses were used for each town.

 

What is this code?

It's not a code. That's just the stuff you're going to need to build up a code.
And the description on the right is just my interpretation of what the memory address stands for (description was written in c++).

scm description (partial code):

0247: load_model 497    //  ; CStreaming::RequestModel(MODEL_POLMAV, true);     038B: load_requested_models:ModelCheck00D6: if    0248:   model 497 available //  CStreaming::ms_aInfoForModel[MODEL_POLMAV].m_loadState == LOADSTATE_LOADED004D: jump_if_false @ModelCheck//  now replace the helicopter model with the appropriate memory address and then0249: release_model 497 //  CStreaming::SetModelIsDeletable(MODEL_POLMAV);

Build your code, test it then post it here if you have any problems.


Edited by Jack

Share this post


Link to post
Share on other sites
Dyabda

Start with the tutorials.

Also use Sanny Builder (click Help, Contents, coding).

There's also Help, contents, articles, coding bible I and II.

 

Learn about the loops, conditional checks and variable types...

 

Don't study huge scripts. Read the smaller ones or even better - make a few simple cleo codes by yourself.

 

Learn how to use the opcode databases:

- Sanny Builder, IDE Tools, Opcode Search,

- Opcode Database with the descriptions.

 

Search for the words that match to your ideas in the opcode databases. For example model, heli, town, zone, memory...

That's for the CLEO code.

 

For an ASI code you need experience in building codes and the basic c++ knowladge:

plugin SDK by DK22Pac

 

How it was done in GTA Underground?

Well I don't know exactly, but I'm pretty sure that those memory addresses were used for each town.

 

 

What is this code?

 

It's not a code. That's just the stuff you're going to need to build up a code.

And the description on the right is just my interpretation of what the memory address stands for (description was written in c++).

 

scm description (partial code):

0247: load_model 497    //  ; CStreaming::RequestModel(MODEL_POLMAV, true);     038B: load_requested_models:ModelCheck00D6: if    0248:   model 497 available //  CStreaming::ms_aInfoForModel[MODEL_POLMAV].m_loadState == LOADSTATE_LOADED004D: jump_if_false @ModelCheck//  now replace the helicopter model with the appropriate memory address and then0249: release_model 497 //  CStreaming::SetModelIsDeletable(MODEL_POLMAV);

Build your code, test it then post it here if you have any problems.

 

 

 

Thank you, I will not choose the best answer so that the topic will not be closed. If I have any problems, I will publish my code here.

Share this post


Link to post
Share on other sites
Dyabda

Hi.

I wrote a test CLEO script to replace the model police helicopter, but I get crash game. Why?

{$CLEO}0000::TESTthread 'TEST'model.Load(487)038B: load_requested_models:TEST_1wait 0ifmodel.Available(487)jf @TEST_10A8C: write_memory 0x6C6589 size 4 value 487 virtual_protect 0model.Destroy(487)0A93: end_custom_thread

Share this post


Link to post
Share on other sites
Jason Statham
Posted (edited)
0A8C: write_memory 0x6C6589 size 4 value 487 virtual_protect 0

 

Since the original code looks like:

.text:006C6589 028 68 F1 01 00 00 push 1F1h

Now should work:

0A8C: write_memory 0x6C658A size 4 value 487 virtual_protect 1

Edit:

Should work clear without reqesting model via CLEO:

0A8C: write_memory 0x40B841 size 4 value 487 virtual_protect 1 //  CStreaming::RequestModel(MODEL_POLMAV, true);0A8C: write_memory 0x6C658A size 4 value 487 virtual_protect 1 //  heli = CHeli::CHeli(MODEL_POLMAV, 4);0A8C: write_memory 0x40B891 size 4 value 487 virtual_protect 1 //  CStreaming::SetModelIsDeletable(MODEL_POLMAV);0A8C: write_memory 0x6C79CF size 4 value 487 virtual_protect 1 //  CHeli::pHelis->auto.vehicle.physical.entity.m_wModelIndex == MODEL_POLMAV

with this, is much more complicated

if (CStreaming::ms_aInfoForModel[MODEL_POLMAV].m_loadState == LOADSTATE_LOADED) {}
0A8C: write_memory 0x6C7A98 size 4 value 0x8E72DC virtual_protect 1 // 0x8E4CC0(CStreaming::ms_aInfoForModel)  + ( 487 * 20) + 10(m_loadStatus)
Edited by juarez

Share this post


Link to post
Share on other sites
Dyabda

Now should work:

0A8C: write_memory 0x6C658A size 4 value 487 virtual_protect 1

 

 

Thanks, it works.
One more question, what memory address is responsible for the flash at night?
36827434a5d5.png

Share this post


Link to post
Share on other sites
Jason Statham
Posted (edited)

For remove use:

0A8C: write_memory 0x6C54F7 size 2 value 0x9090 virtual_protect 10A8C: write_memory 0x6C54F9 size 2 value 0x9090 virtual_protect 10A8C: write_memory 0x6C54FB size 1 value 0x90 virtual_protect 1
Edited by juarez

Share this post


Link to post
Share on other sites
Dyabda

 

For remove use:

0A8C: write_memory 0x6C54F7 size 2 value 0x9090 virtual_protect 10A8C: write_memory 0x6C54F9 size 2 value 0x9090 virtual_protect 10A8C: write_memory 0x6C54FA size 1 value 0x90 virtual_protect 1

 

 

No, I want to add them for new helicopters

Share this post


Link to post
Share on other sites
Jason Statham

Found something else, maybe useful, increasing numcops in player range in function: CWanted::WorkOutPolicePresence

0A8C: write_memory 0x5626D5 size 2 value 487 virtual_protect 1
No, I want to add them for new helicopters
0A8C: write_memory 0x6C7176 size 2 value 487 virtual_protect 1

Share this post


Link to post
Share on other sites
Dyabda
Posted (edited)

Thanks.

I added this effect to 487, but in 497 it disappeared, can this effect be made to several helicopters?

Edited by Dyabda

Share this post


Link to post
Share on other sites
Jack
Posted (edited)

Use some imagination.
Whenever the player enters the specific helicopter model - the value of mem address will change to that model.
The simple game of loop and cond. checks can do a lot of stuff. I would have done it like this (c++):

#include "plugin.h"#include "common.h"#include "CVehicle.h"using namespace plugin;class heliModel {public:    heliModel() {        Events::gameProcessEvent += [] {  //  loop start            CVehicle *veh = FindPlayerVehicle(-1, true);            if (veh) {   //  if (player vehicle exists) {                if (veh->m_nModelIndex == MODEL_MAVERICK || veh->m_nModelIndex == MODEL_POLMAV) {   if or () {                    unsigned short heliModelID = plugin::patch::GetUShort(0x6C7172 + 4); //  read value from memory [WORD]                    if (veh->m_nModelIndex != heliModelID) {                        plugin::patch::SetUShort(0x6C7172 + 4, veh->m_nModelIndex);   //  write value to memory [WORD]                    }                }            }        };    //  loop end    }} _heliModel;
Edited by Jack

Share this post


Link to post
Share on other sites
Dyabda
Posted (edited)

Thanks, I wrote a little script and it works.

:Helithread 'Heli'wait 0if oractor.DrivingVehicleType($PLAYER_ACTOR,487)actor.DrivingVehicleType($PLAYER_ACTOR,497)jf @Heli03C0: [email protected] = actor $PLAYER_ACTOR car      0441: [email protected] = car [email protected] model   0A8C: write_memory 0x6C7176 size 2 value [email protected] virtual_protect 1jump @Heli
Are there any other questions:
1) What memory address is responsible for the key (Caps Lock) which includes a spotlight?
2) What memory address is responsible for disabling it in the daytime?
3) What memory address is responsible for the inclusion of auto in the list for the opcode: 056C: actor $PLAYER_ACTOR driving_police_car?
Edited by Dyabda

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.