ɪʟ_Duca Posted February 15, 2022 Share Posted February 15, 2022 (edited) Hey there, i've done this rudimental mod (still WIP) just with a simple flowchart and copying around code lines. It's purpose is to add not one but two extra gangs around the city in both day and nigth but expecially at night time, so it's to be used with a custom pedgrp.dat and default.ide i edited to correspond with. This script however doesn't load the exact peds when needed without the Model.Load(#XYZ) lines but at the same time these code lines creates audio and video stutters (like 2/3 skips per second) and slows the game down a bit only in the custom gang models zones, in the untouched zones the FPS is ok. Have you more advanced solutions to this script made with sticks and ropes? // This file was decompiled using VCSCM.ini published on 2021-01-30 {$CLEO .cs} 0000: NOP :NONAME_2 wait 0 if Player.Defined($PLAYER_CHAR) jf @NONAME_2 jump @NONAME_21 :NONAME_21 wait 0 if 0583: player $PLAYER_CHAR in_zone 'STREET1' jf @NONAME_39 jump @NONAME_712 :NONAME_39 wait 0 if 0583: player $PLAYER_CHAR in_zone 'STREET2' jf @NONAME_42 jump @NONAME_712 :NONAME_42 wait 0 if 0583: player $PLAYER_CHAR in_zone 'STREET3' jf @NONAME_58 jump @NONAME_401 :NONAME_58 wait 0 if 0583: player $PLAYER_CHAR in_zone 'STREET4' jf @NONAME_63 jump @NONAME_934 :NONAME_63 wait 0 if 0583: player $PLAYER_CHAR in_zone 'STREET5' jf @NONAME_77 jump @NONAME_712 :NONAME_77 wait 0 if 0583: player $PLAYER_CHAR in_zone 'BUSINES' jf @NONAME_84 jump @NONAME_823 :NONAME_84 wait 0 if 0583: player $PLAYER_CHAR in_zone 'BIKAREA' jf @NONAME_96 jump @NONAME_934 :NONAME_96 wait 0 if 0583: player $PLAYER_CHAR in_zone 'DOCKS' jf @NONAME_107 jump @NONAME_934 :NONAME_107 wait 0 if 0583: player $PLAYER_CHAR in_zone 'CONSTRU' jf @NONAME_113 jump @NONAME_823 :NONAME_113 wait 0 if 0583: player $PLAYER_CHAR in_zone 'TOUR1' jf @NONAME_128 jump @NONAME_401 :NONAME_128 wait 0 if 0583: player $PLAYER_CHAR in_zone 'TOUR2' jf @NONAME_132 jump @NONAME_712 :NONAME_132 wait 0 if 0583: player $PLAYER_CHAR in_zone 'STREET6' jf @NONAME_149 jump @NONAME_934 :NONAME_149 wait 0 if 0583: player $PLAYER_CHAR in_zone 'RICH1' jf @NONAME_151 jump @NONAME_401 :NONAME_151 wait 0 if 0583: player $PLAYER_CHAR in_zone 'RICH2' jf @NONAME_168 jump @NONAME_401 :NONAME_168 wait 0 if 0583: player $PLAYER_CHAR in_zone 'RICH3' jf @NONAME_172 jump @NONAME_401 :NONAME_172 wait 0 if 0583: player $PLAYER_CHAR in_zone 'SHOP1' jf @NONAME_189 jump @NONAME_823 :NONAME_189 wait 0 if 0583: player $PLAYER_CHAR in_zone 'SHOP2' jf @NONAME_193 jump @NONAME_712 :NONAME_193 wait 0 if 0583: player $PLAYER_CHAR in_zone 'SHOP3' jf @NONAME_205 jump @NONAME_712 :NONAME_205 wait 0 if 0583: player $PLAYER_CHAR in_zone 'SHOP4' jf @NONAME_214 jump @NONAME_401 :NONAME_214 wait 0 if 0583: player $PLAYER_CHAR in_zone 'SHOP5' jf @NONAME_225 jump @NONAME_401 :NONAME_225 wait 0 if 0583: player $PLAYER_CHAR in_zone 'GOLF1' jf @NONAME_236 jump @NONAME_401 :NONAME_236 wait 0 if 0583: player $PLAYER_CHAR in_zone 'GOLF2' jf @NONAME_244 jump @NONAME_401 :NONAME_244 wait 0 if 0583: player $PLAYER_CHAR in_zone 'BEACH1' jf @NONAME_257 jump @NONAME_401 :NONAME_257 wait 0 if 0583: player $PLAYER_CHAR in_zone 'BEACH2' jf @NONAME_266 jump @NONAME_934 :NONAME_266 wait 0 if 0583: player $PLAYER_CHAR in_zone 'BEACH3' jf @NONAME_278 jump @NONAME_603 :NONAME_278 wait 0 if 0583: player $PLAYER_CHAR in_zone 'AIRPORT' jf @NONAME_285 jump @NONAME_934 :NONAME_285 wait 0 if 0583: player $PLAYER_CHAR in_zone 'TERMINL' jf @NONAME_289 jump @NONAME_401 :NONAME_289 wait 0 if 0583: player $PLAYER_CHAR in_zone 'CLUB1' jf @NONAME_296 jump @NONAME_401 :NONAME_296 wait 0 if 0583: player $PLAYER_CHAR in_zone 'CLUB2' jf @NONAME_299 jump @NONAME_934 :NONAME_299 wait 0 if 0583: player $PLAYER_CHAR in_zone 'GHETTO1' jf @NONAME_304 jump @NONAME_934 :NONAME_304 wait 0 if 0583: player $PLAYER_CHAR in_zone 'GHETTO2' jf @NONAME_317 jump @NONAME_934 :NONAME_317 wait 0 if 0583: player $PLAYER_CHAR in_zone 'OCEAND1' jf @NONAME_323 jump @NONAME_401 :NONAME_323 wait 0 if 0583: player $PLAYER_CHAR in_zone 'OCEAND2' jf @NONAME_338 jump @NONAME_934 :NONAME_338 wait 0 if 0583: player $PLAYER_CHAR in_zone 'ARMYBAS' jump @NONAME_551 :NONAME_401 wait 0 Model.Destroy(#HFOTR) Model.Destroy(#WMOCA) Model.Destroy(#VICE8) 009b: destroy_actor_instantly #HFOTR 009b: destroy_actor_instantly #WMOCA 009b: destroy_actor_instantly #VICE8 0235: set_gang 6 models_to #PGA #PGB 0235: set_gang 2 models_to #SGA #SGB 0235: set_gang 3 models_to #CLA #CLB 0236: set_gang 2 car_to #GANGBUR 0236: set_gang 3 car_to #COACH 0237: set_gang 6 primary_weapon_to 23 secondary_weapon_to 17 0237: set_gang 2 primary_weapon_to 17 secondary_weapon_to 6 0237: set_gang 3 primary_weapon_to 17 secondary_weapon_to 23 03F2: pedgroup 10 remove_threat 2048 //Diaz's gang stop attacking P.I.Gs 03F1: pedtype 10 add_threat 8192 //Diaz's gang hate Vercetti's gang jump @NONAME_2 :NONAME_551 wait 0 0235: set_gang 2 models_to #ARMY #ARMY 0237: set_gang 2 primary_weapon_to 26 secondary_weapon_to 26 jump @NONAME_2 :NONAME_603 //Wouldn't you rather see the final version? jump @NONAME_2 Edited February 15, 2022 by ɪʟ_Duca Post too long Link to comment Share on other sites More sharing options...
Jack Posted February 15, 2022 Share Posted February 15, 2022 - The opcodes for gang vehicle, ped models and their weapons (0235, 0236 and 0237) don't require model loading since they automaticly load them. - The purpose of the opcode 009B is to destroy the actors handle - not its model. Since no actor is created in your code - you don't have to use it at all. - Also you have multiple conditional checks with the same purpose. That's not really a problem but you should consider using "if or". An example: :mainLoop wait 0 if or 0583: player $PLAYER_CHAR in_zone 'BUSINES' 0583: player $PLAYER_CHAR in_zone 'CONSTRU' 0583: player $PLAYER_CHAR in_zone 'SHOP1' jf @NONAME_84 jump @NONAME_823 :NONAME_84 jump @mainLoop - For learning purposes (not needed for your code): The opcode 038B should not be used in a loop to avoid frame drop. So it's better to load the models before the loop. And try The Opcode Database since there's a description for each opcode. Good luck. Wanted Level Editor Gore Level Effect [III] My YouTube Channel Link to comment Share on other sites More sharing options...
ɪʟ_Duca Posted February 15, 2022 Author Share Posted February 15, 2022 Link to comment Share on other sites More sharing options...