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

Running Shoes


Dr. John
 Share

Recommended Posts

I am making a mod. RUNNING SHOES

 

I want the infinite run and speed increase code.

 

The bar from Sweet's Girl Mission in which the bar decrease.

 

And the format.

 

Thanks. happy.gif

Link to comment
Share on other sites

Infinite run:

 

 

0330: set_player $PLAYER_CHAR infinite_run 0 

 

 

Speed, do you mean walk speed?

 

 

07A1: set_walk_speed 4 

 

Link to comment
Share on other sites

07A1 does not set the movement speed of the player.

 

 

This opcode sets how the character chooses to go to it's destination in the next task set by opcodes [opcode]05CA[/opcode], [opcode]05CB[/opcode] and [opcode]06A8[/opcode]. The value is set to it's default when these opcodes are parsed.

 

Modes

0 - None.

1 - Stays still.

2 - Turns left.

3 - Turns right.

4 - Walks to destination.

5 - Faces destination.

6 - Runs to destination.

7 - Sprints to destination.

 

Default value: 6

Edited by Deji
Link to comment
Share on other sites

Ok, does it works for both CLEO 3 and 4?

 

From whic code I must start off?

Link to comment
Share on other sites

Sorry for double post but the file isn't opening and the game crashes...

 

Here's the codes. (I also need the bar from Sweet's Girls. I tried to find it but in vain...)

 

 

0001 0330: set_player $PLAYER_CHAR infinite_run 60002 05CA: set_walk_speed 4

 

 

That's it! Do I need to add more?

 

 

Link to comment
Share on other sites

Hm. Start fresh, read some tutorials.

 

Firstly, when making a CLEO script (If you weren't i suggest you do) you open Sanny Builder and click new, Make sure your sanny builder settings are set to "GTA SA" and the correct directory is chosen.

 

Now, for CLEO always add:

 

 

{$CLEO}0000:

 

 

To the top of your script, this defines it as a CLEO script

 

Okay, next you need to add some labels (Labels are like containers, They hold all your bits of code)

 

So, im going to add 2 for the sake of it (NOTE: You do not need to name your labels 1 and 2, you can choose the name):

 

 

1:2:

 

 

Labels are wrote like this:

 

 

labelname <<-- this can be anything : <<-- Colon comes after your labelnameLike so:labelname:

 

 

Now its time to add your code and make your script do something:

 

 

1: wait 0 <-- is ALWAYS necessary in if checks to stop the game from crashingif0256:   player $PLAYER_CHAR defined <<-- Check if the player(CJ) is definedjf @1 <-- This is a "Jump if false" opcode and jumps if the above opcode returns false

 

 

If the "Player defined" opcode returns true then the code skips past the "Jump if false" opcode and carries on down the script, reaching the label "2:"

 

 

2:0330: set_player $PLAYER_CHAR infinite_run 1 <-- This opcode sets the "Infinite run" Condition to true, You can only use 0 and 1, 1 being true, 0 being false, Why you had 6 there I will never know.

 

 

In the "2:" label above there wasn't an "If" statement meaning we didn't have to put a wait in there.

The wait code can be used in all different kinds of ways and isn't just for "If" checks, keep this in mind.

 

Now the full code looks like this:

 

 

1: wait 0if0256:   player $PLAYER_CHAR definedjf @12:0330: set_player $PLAYER_CHAR infinite_run 1end_thread <-- i didnt put this in the above code because i wanted to explain the use of "Infinite Run", All "End thread" does is well, ends the thread. Stops the script in its tracks, To load your script after using an end thread code, you will have to start a new game or load a save, or restart your game

 

 

Now, this code I created sets the infinite run attribute to true (CJ now has infinite run) at the start of the game and ends the script, A very simple execution, There is alot more to learn and you have alot of options, You could use key presses to set CJ's attributes, In those scripts you don't have to use "End_thread" meaning you can keep pressing a key over and over to execute code or make the player only able to press the key once before ending the script.

 

Hope this small tutorial helped, Good luck icon14.gif

 

Regards, The_Sorrow

 

Link to comment
Share on other sites

Wow! You can be next ZAZ soon. Not flattering.

 

Thanks for the codes and yeah, I just read that help file in Sanny Builder folder. tounge.gif

 

I will find others too. Thanks to Deji and The_Sorrow, you have my respect. smile.gif

Link to comment
Share on other sites

Ok, i found the Bar code. Thanks to PatrickW and Dutchy3010 for the codes.

 

Here's the pic.

 

http://imgur.com/3NdaR

 

Here's the code.

 

 

// This file was decompiled using sascm.ini published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007{$VERSION 3.1.0027}{$CLEO .cs}//-------------MAIN---------------0000: NOP :NONAME_20001: wait 0 ms 00D6: if 00E1:   player 0 pressed_key 16 0256:   player $PLAYER_CHAR defined 004D: jump_if_false @NONAME_2 0001: wait 0 ms 00D6: if 0330: set_player $PLAYER_CHAR infinite_run 1 0084: $HEALTH2 = $HEALTH // (int) 00D6: if 0018:   $HEALTH2 > 250 004D: jump_if_false @NONAME_78 000C: $HEALTH2 -= 250 :NONAME_780014: $HEALTH2 /= 12 0151: remove_status_text $HEALTH2 03C4: set_status_text $HEALTH2 type 1 GXT 'SWE4_08' // global_variable  // CAR HEALTH004E: end_thread

 

 

Now, I want the bar to increase everytime I press button 16. If I don't press it then it must decrease.

When it get's full, this script turns off leaving this bar. When it reaches down, the script turns on.

 

What all statements should I use? Sanny's Search function was good but I didn't get the correct one.

 

EDIT: I have released the mod. Link:http://www.gtaforums.com/index.php?showtopic=499304

 

But still you can help me out.

Edited by Dr. John13
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.