B1ack_Wh1te Posted August 9, 2017 Share Posted August 9, 2017 (edited) 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 Edited August 10, 2017 by Dyabda Link to comment Share on other sites More sharing options...
B1ack_Wh1te Posted August 10, 2017 Author Share Posted August 10, 2017 You can help me? I just do not quite understand what to prescribe. Link to comment Share on other sites More sharing options...
Jack Posted August 10, 2017 Share Posted August 10, 2017 (edited) 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 August 10, 2017 by Jack B1ack_Wh1te 1 Tank Fire [SA] New Police Helicopter [VC & III] My YouTube Channel Link to comment Share on other sites More sharing options...
B1ack_Wh1te Posted August 10, 2017 Author Share Posted August 10, 2017 (edited) 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 VenturasThere 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. I not have Wanted Level Editor. Edited August 10, 2017 by Dyabda Link to comment Share on other sites More sharing options...
Jack Posted August 10, 2017 Share Posted August 10, 2017 (edited) Download WL Editor - Police HelisPut 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 August 10, 2017 by Jack B1ack_Wh1te 1 Tank Fire [SA] New Police Helicopter [VC & III] My YouTube Channel Link to comment Share on other sites More sharing options...
B1ack_Wh1te Posted August 10, 2017 Author Share Posted August 10, 2017 (edited) Delete Post Edited August 12, 2017 by Dyabda Link to comment Share on other sites More sharing options...
Jack Posted August 10, 2017 Share Posted August 10, 2017 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 ZONE1ZONE1___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 allSAVE the settings!!!Pilots on the other hand can use only default models per star:stars 0123 - copsstar4 - SWATstar5 - FBIstars6789... - ArmyBUT 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 allSAVE 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). B1ack_Wh1te 1 Tank Fire [SA] New Police Helicopter [VC & III] My YouTube Channel Link to comment Share on other sites More sharing options...
B1ack_Wh1te Posted August 11, 2017 Author Share Posted August 11, 2017 (edited) Delete post. Edited August 12, 2017 by Dyabda Link to comment Share on other sites More sharing options...
Jack Posted August 11, 2017 Share Posted August 11, 2017 (edited) 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 August 11, 2017 by Jack B1ack_Wh1te 1 Tank Fire [SA] New Police Helicopter [VC & III] My YouTube Channel Link to comment Share on other sites More sharing options...
B1ack_Wh1te Posted August 11, 2017 Author Share Posted August 11, 2017 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? Link to comment Share on other sites More sharing options...
B1ack_Wh1te Posted August 12, 2017 Author Share Posted August 12, 2017 Please help, I really want to know how to do this myself, without the help of the Wanted Level Editor Link to comment Share on other sites More sharing options...
Jack Posted August 12, 2017 Share Posted August 12, 2017 (edited) 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 DK22PacHow 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 August 12, 2017 by Jack B1ack_Wh1te 1 Tank Fire [SA] New Police Helicopter [VC & III] My YouTube Channel Link to comment Share on other sites More sharing options...
B1ack_Wh1te Posted August 12, 2017 Author Share Posted August 12, 2017 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. Link to comment Share on other sites More sharing options...
B1ack_Wh1te Posted May 2, 2018 Author Share Posted May 2, 2018 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 Link to comment Share on other sites More sharing options...
Juarez Posted May 2, 2018 Share Posted May 2, 2018 (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 May 2, 2018 by juarez B1ack_Wh1te 1 Link to comment Share on other sites More sharing options...
B1ack_Wh1te Posted May 2, 2018 Author Share Posted May 2, 2018 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? Link to comment Share on other sites More sharing options...
Juarez Posted May 2, 2018 Share Posted May 2, 2018 (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 May 2, 2018 by juarez B1ack_Wh1te 1 Link to comment Share on other sites More sharing options...
B1ack_Wh1te Posted May 2, 2018 Author Share Posted May 2, 2018 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 Link to comment Share on other sites More sharing options...
Juarez Posted May 2, 2018 Share Posted May 2, 2018 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 B1ack_Wh1te 1 Link to comment Share on other sites More sharing options...
B1ack_Wh1te Posted May 2, 2018 Author Share Posted May 2, 2018 (edited) Thanks. I added this effect to 487, but in 497 it disappeared, can this effect be made to several helicopters? Edited May 2, 2018 by Dyabda Link to comment Share on other sites More sharing options...
Jack Posted May 2, 2018 Share Posted May 2, 2018 (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 May 2, 2018 by Jack B1ack_Wh1te 1 Tank Fire [SA] New Police Helicopter [VC & III] My YouTube Channel Link to comment Share on other sites More sharing options...
Juarez Posted May 2, 2018 Share Posted May 2, 2018 (edited) Tested in-game and it's working Should work on several models (only the searchlight) if not PM me: https://drive.google.com/open?id=1XHlPqq5rtjBb0d4V6SpRJWDUmDzpZtSd Edited May 2, 2018 by juarez B1ack_Wh1te 1 Link to comment Share on other sites More sharing options...
B1ack_Wh1te Posted May 2, 2018 Author Share Posted May 2, 2018 (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 May 3, 2018 by Dyabda Link to comment Share on other sites More sharing options...
jojo05 Posted July 15, 2021 Share Posted July 15, 2021 On 5/3/2018 at 5:59 AM, B1ack_Wh1te said: 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: 0@ = actor $PLAYER_ACTOR car 0441: 1@ = car 0@ model 0A8C: write_memory 0x6C7176 size 2 value 1@ 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? According to this situation, this searchlight will act as normal. How about heli searchlight that player use on police maverick is tracking an entity around searchlight like NPC Police maverick? is this possible? thanks. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now