technomusicrocks Posted December 23, 2007 Share Posted December 23, 2007 I am tired of the gang members you can recruit in san andreas having only pistols and sometimes tec9s, how do i modify it so i can give them stuff like flamthrowers, rocket launcehrs, ak-47s and shotguns? Link to comment Share on other sites More sharing options...
Wesser Posted December 23, 2007 Share Posted December 23, 2007 (edited) Use the opcode 0237 and follow this help. 0 = Ballas1 = Groove2 = Los Santos Vagos3 = San Fiero Rifa4 = Da Nang Boys5 = LV Mafia6 = Triads7 = Varrio Los Aztecas Change the first parameter to choose the gang and others to change the weapons to the homies. 0237=4,set_gang %1d% weapons_pool_to %2d% %3d% %4d% Edited December 23, 2007 by Wesser 012 345 678 9A BCD EFG HIJK LMN OPQR STUV WX YZ Link to comment Share on other sites More sharing options...
technomusicrocks Posted December 23, 2007 Author Share Posted December 23, 2007 which file do i modify, which folder is it in? and do i need any programs (aside from notepad) to help me with this? Link to comment Share on other sites More sharing options...
creative madman Posted December 23, 2007 Share Posted December 23, 2007 this is an SCM modification youre gonna need a mission decompiler Link to comment Share on other sites More sharing options...
technomusicrocks Posted December 24, 2007 Author Share Posted December 24, 2007 wheres the scm file in the san andreas folder Link to comment Share on other sites More sharing options...
Wesser Posted December 24, 2007 Share Posted December 24, 2007 The file main.scm is located in data\script. 012 345 678 9A BCD EFG HIJK LMN OPQR STUV WX YZ Link to comment Share on other sites More sharing options...
WordsBG Posted December 24, 2007 Share Posted December 24, 2007 Just to let you know: Changing SCM Code means you need to start a new game, so you would probably want to use CLEO or, which would be my fav' way to change the weapons: Hacking the Save-File: As you can see here: here I just made this out of an old tool I coded a few weeks ago: http://npshare.de/files/36/7581/gtasave.exe Version : 1.00 UnmodifiedLabel : You've had your ChipsChecksum : 19068956 [CORRECT]=========================================Times Wasted/Busted : 0Money : $604048Gang Weapons:1: A:Pistol B:Micro Uzi (Mac 10) C:Unarmed2: A:Desert Eagle B:MP5 C:Knife3: A:Pistol B:Unarmed C:Unarmed4: A:Unarmed B:Unarmed C:Unarmed5: A:Pistol B:Micro Uzi (Mac 10) C:Unarmed6: A:Desert Eagle B:Unarmed C:Unarmed7: A:Pistol B:AK47 C:Unarmed8: A:Pistol B:Micro Uzi (Mac 10) C:Unarmed9: A:Unarmed B:Unarmed C:Unarmed10: A:Unarmed B:Unarmed C:Unarmed Link to comment Share on other sites More sharing options...
computergeek Posted December 27, 2007 Share Posted December 27, 2007 (edited) Just to let you know: Changing SCM Code means you need to start a new game, Wow, i forgot about that part! Anyways, i, like technomusicrocks, would like to make a couple of modifications to the game. And, since i'm completely crap at doing anything with the SCM Code (never touched it), i'll be needing all the assistance i can get. In other words, the assistance so kindly provided by members like Wesser and WordsBG is about a mile over my head. Heres what i intend to change... somehow: GSF: >9mm >Nightstick >Shotgun? Reason being, i've replaced their models with some i downloaded (which are police models) Other changes i would like to make are: Firefighters: >Fire-extinguishers (not sure if this is possible. Would be nice though.) SWAT >SMG (instead of the micro SMG) FBI >9mm (instead of the SMG) So, if somebody would be nice enough to educated me in the ways of SCM modding, it'd be much appreciated. EDIT: Figured the gang part out. Thanks Wesser! Edited January 4, 2008 by computergeek Link to comment Share on other sites More sharing options...
aleksa Posted July 9, 2011 Share Posted July 9, 2011 (edited) Use the opcode 0237 and follow this help. 0 = Ballas1 = Groove2 = Los Santos Vagos3 = San Fiero Rifa4 = Da Nang Boys5 = LV Mafia6 = Triads7 = Varrio Los Aztecas Change the first parameter to choose the gang and others to change the weapons to the homies. 0237=4,set_gang %1d% weapons_pool_to %2d% %3d% %4d% what to do there in main.scm? Edited July 9, 2011 by aleksa Link to comment Share on other sites More sharing options...
StrangeStrike Posted July 19, 2017 Share Posted July 19, 2017 I need help I saw these posts and I want to change my gang members weapons, cop weapons, swat weapons, FBI weapons...... But I can't do it because my main.scm file is full of symbols and can i change these symbols into characters Link to comment Share on other sites More sharing options...
OrionSR Posted July 19, 2017 Share Posted July 19, 2017 The Savegame Editor linked below has a Gang Weapons tool that can adjust your weapons. It only works on gangs though, not police. GTA SA Savegame Editor v3.0 by Paul Breeuwsma: http://www.paulinternet.nl/sa Link to comment Share on other sites More sharing options...
deltaCJ Posted July 22, 2017 Share Posted July 22, 2017 But I can't do it because my main.scm file is full of symbols and can i change these symbols into characters Sounds like you're opening it with Notepad.... Download Sanny Builder and open your SCM with sanny builder. Link to comment Share on other sites More sharing options...
StrangeStrike Posted July 27, 2017 Share Posted July 27, 2017 But I can't do it because my main.scm file is full of symbols and can i change these symbols into characters Sounds like you're opening it with Notepad.... Download Sanny Builder and open your SCM with sanny builder. Ok, but what do I type to find to change weapons for swat, fbi, army, gangs. Link to comment Share on other sites More sharing options...
kosticn101 Posted July 27, 2017 Share Posted July 27, 2017 (edited) The Savegame Editor linked below has a Gang Weapons tool that can adjust your weapons. It only works on gangs though, not police. GTA SA Savegame Editor v3.0 by Paul Breeuwsma: http://www.paulinternet.nl/sa You can use this for gangs. To change weapons for non-gang members you can use CLEO script that I wrote. There were some problems with this script, but all is FIXED now. It was same problem as here: http://gtaforums.com/topic/893365-sais-actor-in-group Policemen may decide to not use weapon that you've assigned to them if you have only one star, but that's expected behaviour. {$CLEO}0000:const RADIUS = 10.0 AMMO = 60 //dummy valueendwhile true wait 0 if 0256: player $PLAYER_CHAR defined jf continue 04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0 if 0AE1: [email protected] = random_actor_near_point [email protected] [email protected] [email protected] in_radius RADIUS find_next 1 pass_deads 1 then 0665: get_actor [email protected] model_to [email protected] //***********************************// //** HERE YOU CONFIGURE THE SCRIPT **// //***********************************// //List of all allowed values for [email protected] can be found here: // https://gtagmodding.com/sanandreas/peds/ //List of all allowed values for [email protected] can be found in: // Sanny Builder help > SCM Documentation > GTA SA > Weapon numbers, "number" column if [email protected] == #LAPD1 then [email protected] = 30 jump @loopEnd end if [email protected] == #SFPD1 then [email protected] = 24 jump @loopEnd end if [email protected] == #LVPD1 then [email protected] = 22 jump @loopEnd end if [email protected] == #CSHER then [email protected] = 25 jump @loopEnd end if [email protected] == #LAPDM1 then [email protected] = 26 jump @loopEnd end if [email protected] == #SWAT then [email protected] = 28 jump @loopEnd end if [email protected] == #DSHER then [email protected] = 37 jump @loopEnd end if [email protected] == #FBI then [email protected] = 38 jump @loopEnd end //******************************************// //** YOU CAN ADD MORE CONFIGURATIONS HERE **// //******************************************// continue :loopEnd if 8491: not actor [email protected] has_weapon [email protected] then 0781: get_weapon_with_ID [email protected] model_to [email protected] repeat wait 0 0247: load_model [email protected] until 0248: model [email protected] available 01B2: give_actor [email protected] weapon [email protected] ammo AMMO 0249: release_model [email protected] end 01B9: set_actor [email protected] armed_weapon_to [email protected] endend 0A93: end_custom_thread Edited August 3, 2017 by kosticn101 Sanmodder 1 Link to comment Share on other sites More sharing options...
kosticn101 Posted July 28, 2017 Share Posted July 28, 2017 (edited) Ok, I've updated the script but there are some issues. If you give a weapon to someone, he has unlimited ammo. It's probably happening because of the logic of my script. Does he have a weapon? No? Then give it to him.I've put textbox inside the test if 8491: not actor ACTOR has_weapon WNUMBER and it's always showing up if I'm next to a cop, so looks like the test is always returning true and I'm constantly giving him a weapon. Anyone knows what's happening here? Fixed. Edited August 3, 2017 by kosticn101 Link to comment Share on other sites More sharing options...
Jack Posted July 28, 2017 Share Posted July 28, 2017 (edited) Ok, but what do I type to find to change weapons for swat, fbi, army, gangs. ; enum eWeaponTypeWEAPON_UNARMED = 0WEAPON_BRASSKNUCKLE = 1WEAPON_GOLFCLUB = 2WEAPON_NIGHTSTICK = 3WEAPON_KNIFE = 4WEAPON_BASEBALLBAT = 5WEAPON_SHOVEL = 6WEAPON_POOLCUE = 7WEAPON_KATANA = 8WEAPON_CHAINSAW = 9WEAPON_DILDO1 = 10WEAPON_DILDO2 = 11WEAPON_VIBE1 = 12WEAPON_VIBE2 = 13WEAPON_FLOWERS = 14WEAPON_CANE = 15WEAPON_GRENADE = 16WEAPON_TEARGAS = 17WEAPON_MOLOTOV = 18WEAPON_ROCKET = 19WEAPON_ROCKET_HS = 20WEAPON_FREEFALL_BOMB = 21WEAPON_PISTOL = 22WEAPON_PISTOL_SILENCED = 23WEAPON_DESERT_EAGLE = 24WEAPON_SHOTGUN = 25WEAPON_SAWNOFF = 26WEAPON_SPAS12 = 27WEAPON_MICRO_UZI = 28WEAPON_MP5 = 29WEAPON_AK47 = 30WEAPON_M4 = 31WEAPON_TEC9 = 32WEAPON_COUNTRYRIFLE = 33WEAPON_SNIPERRIFLE = 34WEAPON_RLAUNCHER = 35WEAPON_RLAUNCHER_HS = 36WEAPON_FTHROWER = 37WEAPON_MINIGUN = 38WEAPON_SATCHEL_CHARGE = 39WEAPON_DETONATOR = 40WEAPON_SPRAYCAN = 41WEAPON_EXTINGUISHER = 42WEAPON_CAMERA = 43WEAPON_NIGHTVISION = 44WEAPON_INFRARED = 45WEAPON_PARACHUTE = 46WEAPON_UNUSED = 47WEAPON_ARMOUR = 48WEAPON_FLARE = 49 Wanted Level Editor can do it (not for the gangs though). EDIT: I've put textbox inside the test if 8491: not actor ACTOR has_weapon WNUMBER and it's always showing up if I'm next to a cop, so looks like the test is always returning true and I'm constantly giving him a weapon. Anyone knows what's happening here? You shoud put this: 01B9: set_actor ACTOR armed_weapon_to WNUMBER under the conditional check. Edited July 28, 2017 by Jack deltaCJ and kosticn101 2 Tank Fire [SA] New Police Helicopter [VC & III] My YouTube Channel Link to comment Share on other sites More sharing options...
ZAZ Posted July 28, 2017 Share Posted July 28, 2017 put a marker above actor to see what happens {$CLEO .cs}:RandomPed_ModelIDthread 'PEDMODL'while truewait 0 if 0256: player $PLAYER_CHAR defined then if 044B: actor $PLAYER_ACTOR on_foot then 04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0.0 2.0 0.0 if 0AE1: [email protected] = random_actor_near_point [email protected] [email protected] [email protected] in_radius 8.0 find_next 0 pass_deads 1 // CLEO 4 opcode then if 8118: not actor [email protected] dead then 0187: [email protected] = create_marker_above_actor [email protected] 0665: get_actor [email protected] model_to [email protected] if or [email protected] == 280 [email protected] == 281 [email protected] == 282 [email protected] == 283 [email protected] == 284 [email protected] == 285 [email protected] == 286 then 00BA: show_text_styled GXT 'fem_ok' time 1000 style 4 end wait 1000 0164: disable_marker [email protected] 01C2: remove_references_to_actor [email protected] // Like turning an actor into a random pedestrian end end end endend CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
solidwatersnake Posted November 8, 2017 Share Posted November 8, 2017 The Savegame Editor linked below has a Gang Weapons tool that can adjust your weapons. It only works on gangs though, not police. GTA SA Savegame Editor v3.0 by Paul Breeuwsma: http://www.paulinternet.nl/sa You can use this for gangs. To change weapons for non-gang members you can use CLEO script that I wrote. There were some problems with this script, but all is FIXED now. It was same problem as here: http://gtaforums.com/topic/893365-sais-actor-in-group Policemen may decide to not use weapon that you've assigned to them if you have only one star, but that's expected behaviour. {$CLEO}0000:const RADIUS = 10.0 AMMO = 60 //dummy valueendwhile true wait 0 if 0256: player $PLAYER_CHAR defined jf continue 04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0 if 0AE1: [email protected] = random_actor_near_point [email protected] [email protected] [email protected] in_radius RADIUS find_next 1 pass_deads 1 then 0665: get_actor [email protected] model_to [email protected] //***********************************// //** HERE YOU CONFIGURE THE SCRIPT **// //***********************************// //List of all allowed values for [email protected] can be found here: // https://gtagmodding.com/sanandreas/peds/ //List of all allowed values for [email protected] can be found in: // Sanny Builder help > SCM Documentation > GTA SA > Weapon numbers, "number" column if [email protected] == #LAPD1 then [email protected] = 30 jump @loopEnd end if [email protected] == #SFPD1 then [email protected] = 24 jump @loopEnd end if [email protected] == #LVPD1 then [email protected] = 22 jump @loopEnd end if [email protected] == #CSHER then [email protected] = 25 jump @loopEnd end if [email protected] == #LAPDM1 then [email protected] = 26 jump @loopEnd end if [email protected] == #SWAT then [email protected] = 28 jump @loopEnd end if [email protected] == #DSHER then [email protected] = 37 jump @loopEnd end if [email protected] == #FBI then [email protected] = 38 jump @loopEnd end //******************************************// //** YOU CAN ADD MORE CONFIGURATIONS HERE **// //******************************************// continue :loopEnd if 8491: not actor [email protected] has_weapon [email protected] then 0781: get_weapon_with_ID [email protected] model_to [email protected] repeat wait 0 0247: load_model [email protected] until 0248: model [email protected] available 01B2: give_actor [email protected] weapon [email protected] ammo AMMO 0249: release_model [email protected] end 01B9: set_actor [email protected] armed_weapon_to [email protected] endend 0A93: end_custom_thread <script src="/cdn-cgi/scripts/78d64697/cloudflare-static/email-decode.min.js"></script> Hello, I tried your cleo script. It really worked! However, how can I assign different weapons on passengers? Example: SWAT1 will have MP5, SWAT2 will have Combat Shotgun, SWAT3 will have M4. I tried to blend your code to police weapons change cleos through minor coding there but it messes up my game and sometimes it doesn't appear through the game. Link to comment Share on other sites More sharing options...
Jack Posted November 8, 2017 Share Posted November 8, 2017 <script src="/cdn-cgi/scripts/78d64697/cloudflare-static/email-decode.min.js"></script> Hello, I tried your cleo script. It really worked! However, how can I assign different weapons on passengers? Example: SWAT1 will have MP5, SWAT2 will have Combat Shotgun, SWAT3 will have M4. I tried to blend your code to police weapons change cleos through minor coding there but it messes up my game and sometimes it doesn't appear through the game. Police Weapons And how does it look as sdk plugin script: #include "plugin.h"#include <game_sa\common.h>#include <game_sa\CPools.h>#include <game_sa\CVehicle.h>#include <game_sa\CPed.h>#include <game_sa\CCopPed.h>#include <game_sa\CStreaming.h>#include <game_sa\CEntity.h>#include <game_sa\CWanted.h>using namespace plugin;class PoliceWeapons {public: PoliceWeapons() { Events::gameProcessEvent += [] { CPed *ped = FindPlayerPed(); CPed *playa = FindPlayerPed(); CVehicle *veh = FindPlayerVehicle(-1, true); CWanted *Wanted = playa->m_pPlayerData->m_pWanted; if (ped) { for (int i = 0; i < CPools::ms_pPedPool->m_nSize; i++) { if (!CPools::ms_pPedPool->IsFreeSlotAtIndex(i)) { ped = &CPools::ms_pPedPool->m_pObjects[i]; if (ped != FindPlayerPed(0)) { if (ped->m_nPedType == PED_TYPE_COP) { if (ped && ped->m_pVehicle) { if (Wanted->m_nWantedLevel == 4 && ped->m_wModelIndex == MODEL_SWAT) { if (ped == ped->m_pVehicle->m_apPassengers[0] && ped->m_pVehicle->m_apPassengers[0] != 0) { if (ped->m_dwWeaponModelId != MODEL_MP5LNG) { if (CStreaming::ms_aInfoForModel[MODEL_MP5LNG].m_loadState == LOADSTATE_LOADED) { ped->ClearWeapons(); ped->GiveWeapon(WEAPON_MP5, 9999, true); ped->SetCurrentWeapon(WEAPON_MP5); CStreaming::SetModelIsDeletable(MODEL_MP5LNG); } else { CStreaming::RequestModel(MODEL_MP5LNG, true); CStreaming::LoadRequestedModels(); } } } if (ped == ped->m_pVehicle->m_apPassengers[1] && ped->m_pVehicle->m_apPassengers[1] != 0) { if (ped->m_dwWeaponModelId != MODEL_SHOTGSPA) { if (CStreaming::ms_aInfoForModel[MODEL_SHOTGSPA].m_loadState == LOADSTATE_LOADED) { ped->ClearWeapons(); ped->GiveWeapon(WEAPON_SPAS12, 9999, true); ped->SetCurrentWeapon(WEAPON_SPAS12); CStreaming::SetModelIsDeletable(MODEL_SHOTGSPA); } else { CStreaming::RequestModel(MODEL_SHOTGSPA, true); CStreaming::LoadRequestedModels(); } } } if (ped == ped->m_pVehicle->m_apPassengers[2] && ped->m_pVehicle->m_apPassengers[2] != 0) { if (ped->m_dwWeaponModelId != MODEL_M4) { if (CStreaming::ms_aInfoForModel[MODEL_M4].m_loadState == LOADSTATE_LOADED) { ped->ClearWeapons(); ped->GiveWeapon(WEAPON_M4, 9999, true); ped->SetCurrentWeapon(WEAPON_M4); CStreaming::SetModelIsDeletable(WEAPON_MP5); } else { CStreaming::RequestModel(MODEL_M4, true); CStreaming::LoadRequestedModels(); } } } } } } } } } } }; }} PoliceWeapons; DK22Pac 1 Tank Fire [SA] New Police Helicopter [VC & III] My YouTube Channel Link to comment Share on other sites More sharing options...
DK22Pac Posted November 8, 2017 Share Posted November 8, 2017 (edited) That's nice!Some corrections to your 'script'. #include "plugin.h"#include "common.h"#include "CVehicle.h"#include "CCopPed.h"#include "CStreaming.h"class PoliceWeapons {public: PoliceWeapons() { static std::pair<int, eWeaponType> weaps[] = {{ MODEL_MP5LNG, WEAPON_MP5 },{ MODEL_SHOTGSPA, WEAPON_SPAS12 },{ MODEL_M4, WEAPON_M4 }}; static auto GiveWeaponToPed = [](CPed *ped, int weapModelId, eWeaponType weaponType) { // create a helper function if (ped->m_dwWeaponModelId != weapModelId) { CStreaming::RequestModel(weapModelId, true); CStreaming::LoadRequestedModels(); if (CStreaming::ms_aInfoForModel[weapModelId].m_loadState == LOADSTATE_LOADED) { ped->ClearWeapons(); ped->GiveWeapon(weaponType, 9999, true); ped->SetCurrentWeapon(weaponType); CStreaming::SetModelIsDeletable(weapModelId); } } }; plugin::Events::gameProcessEvent += [] { CPed *playa = FindPlayerPed(); if (playa) { for (int i = 0; i < CPools::ms_pPedPool->m_nSize; i++) { CPed *ped = CPools::ms_pPedPool->GetAt(i); // get ped at pool index if (ped && ped != playa && ped->m_nPedType == PED_TYPE_COP && ped->m_pVehicle && ped == ped->m_pVehicle->m_pDriver) { if (playa->m_pPlayerData->m_pWanted->m_nWantedLevel == 4 && ped->m_wModelIndex == MODEL_SWAT) { for (int p = 0; p < 3; p++) { if (ped->m_pVehicle->m_apPassengers[p]) GiveWeaponToPed(ped->m_pVehicle->m_apPassengers[p], weaps[p].first, weaps[p].second); } } } } } }; }} policeWeapons; Note1: Use latest sdk version to be able to include files without "game_sa" prefix (useful if you targetting multiple games). Note2: Naming class and class instance with same name is not really a good idea. Please use Project Wizard to create plugins, so you'll get all these names automatically. Edited November 8, 2017 by DK22Pac Jack 1 Link to comment Share on other sites More sharing options...
Jack Posted November 8, 2017 Share Posted November 8, 2017 That's nice! Some corrections to your 'script'. Note1: Use latest sdk version to be able to include files without "game_sa" prefix (useful if you targetting multiple games). Note2: Naming class and class instance with same name is not really a good idea. Please use Project Wizard to create plugins, so you'll get all these names automatically. Thanks. And your sdk plugin is beyond incredible! Tank Fire [SA] New Police Helicopter [VC & III] My YouTube Channel 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