Dr. John Posted January 14, 2012 Share Posted January 14, 2012 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. Link to comment Share on other sites More sharing options...
Dr. John Posted January 15, 2012 Author Share Posted January 15, 2012 Bump! Anyone? Link to comment Share on other sites More sharing options...
Node Posted January 15, 2012 Share Posted January 15, 2012 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 More sharing options...
Deji Posted January 15, 2012 Share Posted January 15, 2012 (edited) 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 January 15, 2012 by Deji Link to comment Share on other sites More sharing options...
Dr. John Posted January 15, 2012 Author Share Posted January 15, 2012 Ok, does it works for both CLEO 3 and 4? From whic code I must start off? Link to comment Share on other sites More sharing options...
Dr. John Posted January 21, 2012 Author Share Posted January 21, 2012 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 More sharing options...
Node Posted January 21, 2012 Share Posted January 21, 2012 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 Regards, The_Sorrow Link to comment Share on other sites More sharing options...
Dr. John Posted January 21, 2012 Author Share Posted January 21, 2012 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. I will find others too. Thanks to Deji and The_Sorrow, you have my respect. Link to comment Share on other sites More sharing options...
Node Posted January 21, 2012 Share Posted January 21, 2012 Thankyou and im glad i could help Link to comment Share on other sites More sharing options...
Dr. John Posted January 22, 2012 Author Share Posted January 22, 2012 (edited) 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 January 22, 2012 by Dr. John13 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