SisRob Posted January 15, 2015 Share Posted January 15, 2015 (edited) Hello. My favorite thing to do in San Andreas is setting up a "civil war" and try to survive as long as I can. You can achieve this settings with bunch of cheats: AJLOJYQY - peds attack each other BAGOWPG - bounty on your head YLTEICZ - crazy drivers STATEOFEMERGENCY - riot mode (AEZAKMI - no police) This type of gameplay is awesome, but it has one major flaw - peds get rocket launchers and they ruin all the fun with it. Is there a way to disable rocket launchers for peds? (or for player too, if necessary). I suspect it can be done with opcode 01B9, but I don't know how to set it for all pedestrians in my vicinity.. Thank you! Edited January 15, 2015 by SisRob Link to comment https://gtaforums.com/topic/761650-disable-rocket-launchers-for-pedestrians/ Share on other sites More sharing options...
SisRob Posted January 15, 2015 Author Share Posted January 15, 2015 (edited) After some cleo tutorials I came up with this: It might not be perfect (my first script), but it works: :LAUNCHERS // remove rocket launchers from near actors0001: wait 000A0: store_actor $PLAYER_ACTOR position_to 1@ 2@ 3@08E5: get_actor_in_sphere 1@ 2@ 3@ radius 100.0 handle_as 0@if 056D: does_char_exist 0@004D: jump_if_false @LAUNCHERS_ENDif and 803C: not $PLAYER_ACTOR == 0@ 02D8: is_char_holding_weapon 0@ weapon 35 // RPG004D: jump_if_false @LAUNCHERS_END01B9: set_current_char_weapon 0@ to 0:LAUNCHERS_END01C2: remove_references_to_actor 0@0051: return Sometimes a newly spawned pedestrian manages to fire before it's removed, but it's much better... You need to keep both ifs there. 'if and' fails, because even if the actor isn't defined the second opcode (02d8) gets called anyway (on non defined actor). Feel free to suggest any improvements! (like radius - isn't it small/big?) Edited January 15, 2015 by SisRob Link to comment https://gtaforums.com/topic/761650-disable-rocket-launchers-for-pedestrians/#findComment-1066830777 Share on other sites More sharing options...
DK22Pac Posted January 15, 2015 Share Posted January 15, 2015 (edited) {$CLEO .cs}0A8C: write_memory 0x6127CD size 4 value 32 virtual_protect 1 // replace rocket launcher with smg0A93: Edited January 15, 2015 by DK22Pac Link to comment https://gtaforums.com/topic/761650-disable-rocket-launchers-for-pedestrians/#findComment-1066830969 Share on other sites More sharing options...
SisRob Posted January 15, 2015 Author Share Posted January 15, 2015 {$CLEO .cs}0A8C: write_memory 0x6127CD size 4 value 32 virtual_protect 1 // replace rocket launcher with smg0A93: Awesome. That simplifies things quite a bit. Thanks! Link to comment https://gtaforums.com/topic/761650-disable-rocket-launchers-for-pedestrians/#findComment-1066831209 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