Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. Los Santos Drug Wars
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

      1. Guides & Strategies
      2. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    4. Featured Mods

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Movies & TV
      5. Music
      6. Sports
      7. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Announcements

    2. Support

    3. Suggestions

Script not working


aojis
 Share

Recommended Posts

{$CLEO .cs}

 

0000:

 

while true

wait 0

if 0256: 0

jf continue

if and

0AB0: 71

0AB0: 89

jf continue

04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0

073F: get_actor_in_sphere [email protected] [email protected] [email protected] radius 6.0 with_pedtype_civilian 0 gang 1 criminal/prostitute 0 handle_as [email protected]

if 056D: [email protected]

jf continue

if 0457: player $PLAYER_CHAR aiming_at_actor [email protected]

jf continue

if or

02F2: actor [email protected] model == #FAM1

02F2: actor [email protected] model == #FAM2

02F2: actor [email protected] model == #FAM3

jf continue

0630: put_actor $PLAYER_ACTOR in_group $PLAYER_GROUP as_leader

0631: put_actor [email protected] in_group $PLAYER_GROUP

wait 1000

end

 

 

 

 

mod by Fabio

Edited by aojis
Link to comment
Share on other sites

I guess this is just a part of the script? You don't have a lable where you can jump to (:continue)?

 

Very unreadable script. It isn't wrong to only write the parameters. However, it doesn't make the code very clear.

 

 

Link to comment
Share on other sites

 

I guess this is just a part of the script? You don't have a lable where you can jump to (:continue)?

 

Very unreadable script. It isn't wrong to only write the parameters. However, it doesn't make the code very clear.

continue isn't the 'break'

 

'continue' statement transfers script execution to the beginning of a loop.

'break' statement transfers script execution to the place past the end of a loop.

 

That script assumes that a player is playing, presses keys 71 and 89, there is gang member in radius 6.0 near the player, player aims at that actor and model IDs are:

 

 02F2: actor [email protected] model == #FAM1 02F2: actor [email protected] model == #FAM2 02F2: actor [email protected] model == #FAM3 

 

If conditions succeeded:

 

 0630: put_actor $PLAYER_ACTOR in_group $PLAYER_GROUP as_leader 0631: put_actor [email protected] in_group $PLAYER_GROUP

 

Link to comment
Share on other sites

Omg... I was sleeping there... mercie_blink.gif Used this structure in my own codes a lot. Made a code a few days ago with :continue, that's why I was confused suicidal.gif Next time, I'll look better at the structure, didn't even see that it was a while true loop.

 

However, I don't see the error in this code.

 

Link to comment
Share on other sites

What about the mixing of low level and high level code? I'm no expert but that sounds like a bad idea.

It is ugly, but not something that will break your code.

But that's not the case of the above code.

 

jf sounds kinda low-level, but Sanny can't optimize code, so sometimes it is the best thing to do.

 

Link to comment
Share on other sites

TheGodfather.

Just a note lendoff....Spam posted like u are meant as spam in GTA Forums..So take such kind of attitude outt of the Modding section..wink.gif

Link to comment
Share on other sites

Or he had posted something which he later thought wasn't post worthy, and then ninja edited the post?

 

EDIT:

@below me, if you edit a post within about a minute, the "edited by" is optional. And you don't have to derail this thread much further by posting that either.

Edited by Bad.boy!
Link to comment
Share on other sites

TheGodfather.

Well then there must have been written something like this :

 

This post has been edited by Zee on Sunday, Apr 28 2013, 07:22

Link to comment
Share on other sites

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
 Share

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

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