Crspy Posted July 9, 2017 Share Posted July 9, 2017 (edited) Since this wasn't done before and i would love to do it actually since i like Saints row style , decided to make all the gangs car colors ( even the unused gangs ) completely customizable including the primary and secondary color with a simple INI file. just like that : ;--------------------; Configuration file for mod Gangs CarColor Customizer created by Crspy;; you can check the color ids here : http://wiki.sa-mp.com/wiki/Vehicle_Color_IDs;; just put the id of your desired color ;;--------------------;[ballas]Primary = 85Secondary = 85;[Grove]Primary = 86Secondary = 86;[Vagos]Primary = 6Secondary = 6;[sFRifa]Primary = 2Secondary = 2;[DaNangBoys]Primary = 69Secondary = 69;[italianMafia]Primary = 127Secondary = 127;[Triads]Primary = 17Secondary = 17;[Aztecas]Primary = 2Secondary = 2;[RussianMafia]Primary = 118Secondary = 118;[bikers]Primary = 0Secondary = 0; Source: {$cleo} 0000: if 8AAB: not file_exists "CLEO\GANGSCC.INI" then 0ACD: show_text_highpriority "UNABLE TO LOAD ~B~'CLEO/GANGSCC.INI'" time 4000 0A93: end_custom_thread end if 8AF0: not [email protected] = get_int_from_ini_file "CLEO\GANGSCC.INI" section "BALLAS" key "PRIMARY" then [email protected] = -1 end if 8AF0: not [email protected] = get_int_from_ini_file "CLEO\GANGSCC.INI" section "BALLAS" key "SECONDARY" then [email protected] = -1 end if 8AF0: not [email protected] = get_int_from_ini_file "CLEO\GANGSCC.INI" section "GROVE" key "PRIMARY" then [email protected] = -1 end if 8AF0: not [email protected] = get_int_from_ini_file "CLEO\GANGSCC.INI" section "GROVE" key "SECONDARY" then [email protected] = -1 end if 8AF0: not [email protected] = get_int_from_ini_file "CLEO\GANGSCC.INI" section "VAGOS" key "PRIMARY" then [email protected] = -1 end if 8AF0: not [email protected] = get_int_from_ini_file "CLEO\GANGSCC.INI" section "VAGOS" key "SECONDARY" then [email protected] = -1 end if 8AF0: not [email protected] = get_int_from_ini_file "CLEO\GANGSCC.INI" section "SFRIFA" key "PRIMARY" then [email protected] = -1 end if 8AF0: not [email protected] = get_int_from_ini_file "CLEO\GANGSCC.INI" section "SFRIFA" key "SECONDARY" then [email protected] = -1 end if 8AF0: not [email protected] = get_int_from_ini_file "CLEO\GANGSCC.INI" section "DaNangBoys" key "PRIMARY" then [email protected] = -1 end if 8AF0: not [email protected] = get_int_from_ini_file "CLEO\GANGSCC.INI" section "DaNangBoys" key "SECONDARY" then [email protected] = -1 end if 8AF0: not [email protected] = get_int_from_ini_file "CLEO\GANGSCC.INI" section "ITALIANMAFIA" key "PRIMARY" then [email protected] = -1 end if 8AF0: not [email protected] = get_int_from_ini_file "CLEO\GANGSCC.INI" section "ITALIANMAFIA" key "SECONDARY" then [email protected] = -1 end if 8AF0: not [email protected] = get_int_from_ini_file "CLEO\GANGSCC.INI" section "TRIADS" key "PRIMARY" then [email protected] = -1 end if 8AF0: not [email protected] = get_int_from_ini_file "CLEO\GANGSCC.INI" section "TRIADS" key "SECONDARY" then [email protected] = -1 end if 8AF0: not [email protected] = get_int_from_ini_file "CLEO\GANGSCC.INI" section "AZTECAS" key "PRIMARY" then [email protected] = -1 end if 8AF0: not [email protected] = get_int_from_ini_file "CLEO\GANGSCC.INI" section "AZTECAS" key "SECONDARY" then [email protected] = -1 end if 8AF0: not [email protected] = get_int_from_ini_file "CLEO\GANGSCC.INI" section "RUSSIANMAFIA" key "PRIMARY" then [email protected] = -1 end if 8AF0: not [email protected] = get_int_from_ini_file "CLEO\GANGSCC.INI" section "RUSSIANMAFIA" key "SECONDARY" then [email protected] = -1 end if 8AF0: not [email protected] = get_int_from_ini_file "CLEO\GANGSCC.INI" section "BIKERS" key "PRIMARY" then [email protected] = -1 end if 8AF0: not [email protected] = get_int_from_ini_file "CLEO\GANGSCC.INI" section "BIKERS" key "SECONDARY" then [email protected] = -1 end { A loop that passes through all cars (on the street) structures and check if their Driver's Pedtype is one of the gangs' then execute the car color change, once ! 0xB74494 - Contains a pointer to main struct [email protected] : Car [email protected] : Driver [email protected] : pedtype } while true wait 0 0A8D: [email protected] = read_memory 0xB74494 size 4 virtual_protect 0 [email protected] += 0x4 0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 for [email protected] = 0 to 27904 step 0x100 0A8D: [email protected] = read_memory [email protected] size 1 virtual_protect 0 000A: [email protected] += 0x1 if and 0029: [email protected] >= 0x00 001B: 0x80 > [email protected] then 005A: [email protected] += [email protected] 046C: [email protected] = car [email protected] driver 03F3: get_car [email protected] primary_color_to [email protected] secondary_color_to [email protected] 056D: actor [email protected] defined jf continue 089F: get_actor [email protected] pedtype_to [email protected] if and [email protected] > 6 17 > [email protected] jf continue [email protected] -= 7 [email protected] = Car.Model([email protected]) if 0AB1: call_scm_func @Check_VehModel_Belong_to_GangCarGrp{__VehicleModel__,,__GangID__} 2 [email protected] [email protected] jf continue [email protected] += 7 if [email protected] == 7 then if or 803B: not [email protected] == [email protected] 803B: not [email protected] == [email protected] then 0229: set_car [email protected] primary_color_to [email protected] secondary_color_to [email protected] end end if [email protected] == 8 then if or 803B: not [email protected] == [email protected] 803B: not [email protected] == [email protected] then 0229: set_car [email protected] primary_color_to [email protected] secondary_color_to [email protected] end end if [email protected] == 9 then if or 803B: not [email protected] == [email protected] 803B: not [email protected] == [email protected] then 0229: set_car [email protected] primary_color_to [email protected] secondary_color_to [email protected] end end if [email protected] == 10 then if or 803B: not [email protected] == [email protected] 803B:not [email protected] == [email protected] then 0229: set_car [email protected] primary_color_to [email protected] secondary_color_to [email protected] end end if [email protected] == 11 then if or 803B:not [email protected] == [email protected] 803B:not [email protected] == [email protected] then 0229: set_car [email protected] primary_color_to [email protected] secondary_color_to [email protected] end end if [email protected] == 12 then if or 803B: not [email protected] == [email protected] 803B: not [email protected] == [email protected] then 0229: set_car [email protected] primary_color_to [email protected] secondary_color_to [email protected] end end if [email protected] == 13 then if or 803B: not [email protected] == [email protected] 803B: not [email protected] == [email protected] then 0229: set_car [email protected] primary_color_to [email protected] secondary_color_to [email protected] end end if [email protected] == 14 then if or 803B: not [email protected] == [email protected] 803B: not [email protected] == [email protected] then 0229: set_car [email protected] primary_color_to [email protected] secondary_color_to [email protected] end end if [email protected] == 15 then if or 803B: not [email protected] == [email protected] 803B: not [email protected] == [email protected] then 0229: set_car [email protected] primary_color_to [email protected] secondary_color_to [email protected] end end if [email protected] == 16 then if or 803B: not [email protected] == [email protected] 803B: not [email protected] == [email protected] then 0229: set_car [email protected] primary_color_to [email protected] secondary_color_to [email protected] end end end end end :Check_VehModel_Belong_to_GangCarGrp{__VehicleModel__,,__GangID__} 0A8D: [email protected] = read_memory 0x40ACE4 size 4 virtual_protect 0 [email protected] *= 46 005A: [email protected] += [email protected] for [email protected] = 0 to 22 0A8D: [email protected] = read_memory [email protected] size 2 virtual_protect 0 if [email protected] <> 2000 // 2000 means no more vehicles in this Car group jf break if 003B: [email protected] == [email protected] then 0AB2: ret 0 // return true end [email protected] += 2 end 059A: return_false 0AB2: ret 0 // return false Download Link : GangsCC Customizer.7z Edited September 11, 2017 by Crspy OGs4life, iiCriminnaaL, Igor Bogdanoff and 12 others 15 Link to comment Share on other sites More sharing options...
Priest14/88 Posted July 9, 2017 Share Posted July 9, 2017 <3 Crspy 1 Link to comment Share on other sites More sharing options...
Crspy Posted July 9, 2017 Author Share Posted July 9, 2017 (edited) Mod updated : 1.made some optimizations ( less loops ) 2. fixed the bug that prevented Russian mafia & bikers car colors from being changed by script. ( thanks to kane49 for reporting this ) Edited July 9, 2017 by Crspy iiCriminnaaL 1 Link to comment Share on other sites More sharing options...
iiCriminnaaL Posted July 9, 2017 Share Posted July 9, 2017 (edited) This can be a replacement of the need of adding unique cars for the gangs (like Cholo Sabre, Mafia Sentinel, etc) for SA gangs, in proper way that fits with the game's atmosphere. Great! Good job Btw, the only gang vehicle colors which was bugged were the bikers', Russian Mafia's car colors worked already Edited July 9, 2017 by Kane49 Crspy 1 Link to comment Share on other sites More sharing options...
iiCriminnaaL Posted August 1, 2017 Share Posted August 1, 2017 Is it only in my game or it doesn't work with Da Nang Boys? Their vehicles are always black, regardless of which color I set their vehicles to. Link to comment Share on other sites More sharing options...
Crspy Posted August 1, 2017 Author Share Posted August 1, 2017 (edited) Ops it was a small mistake " getting float number instead of integer " Link updated Also , i recreated the script in a high syntax language and less loops so it should be more optimized , source available at the first post. Edited August 1, 2017 by Crspy Link to comment Share on other sites More sharing options...
iiCriminnaaL Posted August 2, 2017 Share Posted August 2, 2017 (edited) Btw, found another issue. It's caused due to the way mod works on, but I'll state it in case it can be fixed. The mod is set like: Vehicle that's driven by a gang member its color will be the gang car color, that causes when a gang member steals a vehicle, whatever its colors are, its colors will turn to the gang's car colors like it's set in the ini file, no matter if it's a gang car or a normal car. Happened with me when a Balla drove my quad bike, and also when he drove some other pedestrian's car. Edited August 2, 2017 by Kane49 Link to comment Share on other sites More sharing options...
Crspy Posted August 2, 2017 Author Share Posted August 2, 2017 (edited) oh it's not actually a bug but there's no way ( i know ) to execute the script on created cars only and not existant ones ...... the script loops through all cars that exist on the street. i can live with that though since gangs rarely steal vehicles. Link updated , Made more optimization to the script , previously it would change the cars color no matter if it was already changed or not ... now it will check if the car was already changed or not before doing that... which results in the script very light weight Edited August 2, 2017 by Crspy iiCriminnaaL and H-G 2 Link to comment Share on other sites More sharing options...