Jump to content

Disable rocket launchers for pedestrians


Recommended Posts

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 by SisRob
Link to comment
https://gtaforums.com/topic/761650-disable-rocket-launchers-for-pedestrians/
Share on other sites

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 by SisRob
{$CLEO .cs}
0A8C: write_memory 0x6127CD size 4 value 32 virtual_protect 1 // replace rocket launcher with smg
0A93:

Edited by DK22Pac

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 0 User Currently Viewing
    0 members, 0 Anonymous, 0 Guests

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.