Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. The Criminal Enterprises
      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

*DO NOT* SHARE MEDIA OR LINKS TO LEAKED COPYRIGHTED MATERIAL. Discussion is allowed.

A question about file management


gtasearcher
 Share

Recommended Posts

gtasearcher

 

0A9A: $hFILE = openfile "settings.ini" mode 0x72  // IF and SET

Right?

Well, I know 0x6272 and 0x6277 are for binary files.

And also 0x72 and 0x77 are for text files.

Now wait a second.

Does it mean you can write something in a file and the engine will read it, and will also be able to write something else a human could understand by opening the file?!?

Incredible.

Or does it mean something else?

Please answer!

Link to comment
Share on other sites

See if this helps I found a code that goes with MF's new nrg500 the cleo puts a bike helmet on the player if he is on one of the vehicles defined in the ini which is further down below the code:

 

{$CLEO .cs}thread 'HELM' gosub @HELM_473 [email protected] = 0 0209: [email protected] = random_int_in_ranges 0 100 :HELM_34wait 0 if   Player.Defined($PLAYER_CHAR)else_jump @HELM_34 if or  Actor.DrivingVehicleType($PLAYER_ACTOR, [email protected])  Actor.DrivingVehicleType($PLAYER_ACTOR, [email protected])  Actor.DrivingVehicleType($PLAYER_ACTOR, [email protected])  Actor.DrivingVehicleType($PLAYER_ACTOR, [email protected])  Actor.DrivingVehicleType($PLAYER_ACTOR, [email protected])  Actor.DrivingVehicleType($PLAYER_ACTOR, [email protected])  Actor.DrivingVehicleType($PLAYER_ACTOR, [email protected])  Actor.DrivingVehicleType($PLAYER_ACTOR, [email protected])else_jump @HELM_136 jump @HELM_300 :HELM_136if or  Actor.DrivingVehicleType($PLAYER_ACTOR, [email protected])  Actor.DrivingVehicleType($PLAYER_ACTOR, [email protected])  Actor.DrivingVehicleType($PLAYER_ACTOR, [email protected])  Actor.DrivingVehicleType($PLAYER_ACTOR, [email protected])  Actor.DrivingVehicleType($PLAYER_ACTOR, [email protected])  Actor.DrivingVehicleType($PLAYER_ACTOR, [email protected])  Actor.DrivingVehicleType($PLAYER_ACTOR, [email protected])  Actor.DrivingVehicleType($PLAYER_ACTOR, [email protected])else_jump @HELM_218 jump @HELM_300 :HELM_218if or  Actor.DrivingVehicleType($PLAYER_ACTOR, [email protected])  Actor.DrivingVehicleType($PLAYER_ACTOR, [email protected])  Actor.DrivingVehicleType($PLAYER_ACTOR, [email protected])  Actor.DrivingVehicleType($PLAYER_ACTOR, [email protected])  Actor.DrivingVehicleType($PLAYER_ACTOR, [email protected])  Actor.DrivingVehicleType($PLAYER_ACTOR, [email protected])  Actor.DrivingVehicleType($PLAYER_ACTOR, [email protected])  Actor.DrivingVehicleType($PLAYER_ACTOR, [email protected])else_jump @HELM_423 jump @HELM_300 :HELM_300if  [email protected] == 0 else_jump @HELM_34 jump @HELM_325 :HELM_3250793: save_player_clothes if  [email protected] > 50 else_jump @HELM_371 Player.SetClothes($PLAYER_CHAR, "MOTO", "MOTO", 16)jump @HELM_404 :HELM_371Player.SetClothes($PLAYER_CHAR, "BIKERHELMET", "BIKERHELMET", 16):HELM_404Player.Build($PLAYER_CHAR)[email protected] = 1 jump @HELM_34 :HELM_423if  [email protected] == 1 else_jump @HELM_34 0794: restore_player_clothes Player.Build($PLAYER_CHAR)[email protected] = 0 0209: [email protected] = random_int_in_ranges 0 100 jump @HELM_34 end_thread :[email protected] = 4 [email protected] = 0 [email protected] = 0 [email protected] = 0 [email protected] = 0 [email protected] = 0 [email protected] = 0 [email protected] = 0 [email protected] = 0 [email protected] = 0 [email protected] = 0 [email protected] = 0 [email protected] = 0 [email protected] = 0 [email protected] = 0 [email protected] = 0 [email protected] = 0 [email protected] = 0 [email protected] = 0 [email protected] = 0 [email protected] = 0 [email protected] = 0 [email protected] = 0 [email protected] = 0 [email protected] = 0 [email protected] = 0 [email protected] = 0 0A9A: [email protected] = openfile ".\CLEO\HELME.INI" mode 25202 // IF and SET wait 0 :HELM_692if  28 > [email protected] else_jump @HELM_2160 wait 0 0A9D: readfile [email protected] size 1 to [email protected] if  [email protected] == 34 else_jump @HELM_692 gosub @HELM_2045 :HELM_749if  [email protected] == 4 else_jump @HELM_803 [email protected] *= 10 005A: [email protected] += [email protected] // (int) [email protected] -= 48 gosub @HELM_2045 jump @HELM_749 :HELM_803if  [email protected] == 5 else_jump @HELM_857 [email protected] *= 10 005A: [email protected] += [email protected] // (int) [email protected] -= 48 gosub @HELM_2045 jump @HELM_803 :HELM_857if  [email protected] == 6 else_jump @HELM_911 [email protected] *= 10 005A: [email protected] += [email protected] // (int) [email protected] -= 48 gosub @HELM_2045 jump @HELM_857 :HELM_911if  [email protected] == 7 else_jump @HELM_965 [email protected] *= 10 005A: [email protected] += [email protected] // (int) [email protected] -= 48 gosub @HELM_2045 jump @HELM_911 :HELM_965if  [email protected] == 8 else_jump @HELM_1019 [email protected] *= 10 005A: [email protected] += [email protected] // (int) [email protected] -= 48 gosub @HELM_2045 jump @HELM_965 :HELM_1019if  [email protected] == 9 else_jump @HELM_1073 [email protected] *= 10 005A: [email protected] += [email protected] // (int) [email protected] -= 48 gosub @HELM_2045 jump @HELM_1019 :HELM_1073if  [email protected] == 10 else_jump @HELM_1127 [email protected] *= 10 005A: [email protected] += [email protected] // (int) [email protected] -= 48 gosub @HELM_2045 jump @HELM_1073 :HELM_1127if  [email protected] == 11 else_jump @HELM_1181 [email protected] *= 10 005A: [email protected] += [email protected] // (int) [email protected] -= 48 gosub @HELM_2045 jump @HELM_1127 :HELM_1181if  [email protected] == 12 else_jump @HELM_1235 [email protected] *= 10 005A: [email protected] += [email protected] // (int) [email protected] -= 48 gosub @HELM_2045 jump @HELM_1181 :HELM_1235if  [email protected] == 13 else_jump @HELM_1289 [email protected] *= 10 005A: [email protected] += [email protected] // (int) [email protected] -= 48 gosub @HELM_2045 jump @HELM_1235 :HELM_1289if  [email protected] == 14 else_jump @HELM_1343 [email protected] *= 10 005A: [email protected] += [email protected] // (int) [email protected] -= 48 gosub @HELM_2045 jump @HELM_1289 :HELM_1343if  [email protected] == 15 else_jump @HELM_1397 [email protected] *= 10 005A: [email protected] += [email protected] // (int) [email protected] -= 48 gosub @HELM_2045 jump @HELM_1343 :HELM_1397if  [email protected] == 16 else_jump @HELM_1451 [email protected] *= 10 005A: [email protected] += [email protected] // (int) [email protected] -= 48 gosub @HELM_2045 jump @HELM_1397 :HELM_1451if  [email protected] == 17 else_jump @HELM_1505 [email protected] *= 10 005A: [email protected] += [email protected] // (int) [email protected] -= 48 gosub @HELM_2045 jump @HELM_1451 :HELM_1505if  [email protected] == 18 else_jump @HELM_1559 [email protected] *= 10 005A: [email protected] += [email protected] // (int) [email protected] -= 48 gosub @HELM_2045 jump @HELM_1505 :HELM_1559if  [email protected] == 19 else_jump @HELM_1613 [email protected] *= 10 005A: [email protected] += [email protected] // (int) [email protected] -= 48 gosub @HELM_2045 jump @HELM_1559 :HELM_1613if  [email protected] == 20 else_jump @HELM_1667 [email protected] *= 10 005A: [email protected] += [email protected] // (int) [email protected] -= 48 gosub @HELM_2045 jump @HELM_1613 :HELM_1667if  [email protected] == 21 else_jump @HELM_1721 [email protected] *= 10 005A: [email protected] += [email protected] // (int) [email protected] -= 48 gosub @HELM_2045 jump @HELM_1667 :HELM_1721if  [email protected] == 22 else_jump @HELM_1775 [email protected] *= 10 005A: [email protected] += [email protected] // (int) [email protected] -= 48 gosub @HELM_2045 jump @HELM_1721 :HELM_1775if  [email protected] == 23 else_jump @HELM_1829 [email protected] *= 10 005A: [email protected] += [email protected] // (int) [email protected] -= 48 gosub @HELM_2045 jump @HELM_1775 :HELM_1829if  [email protected] == 24 else_jump @HELM_1883 [email protected] *= 10 005A: [email protected] += [email protected] // (int) [email protected] -= 48 gosub @HELM_2045 jump @HELM_1829 :HELM_1883if  [email protected] == 25 else_jump @HELM_1937 [email protected] *= 10 005A: [email protected] += [email protected] // (int) [email protected] -= 48 gosub @HELM_2045 jump @HELM_1883 :HELM_1937if  [email protected] == 26 else_jump @HELM_1991 [email protected] *= 10 005A: [email protected] += [email protected] // (int) [email protected] -= 48 gosub @HELM_2045 jump @HELM_1937 :HELM_1991if  [email protected] == 27 else_jump @HELM_2160 [email protected] *= 10 005A: [email protected] += [email protected] // (int) [email protected] -= 48 gosub @HELM_2045 jump @HELM_1991 :HELM_20450A9D: readfile [email protected] size 1 to [email protected] if   not [email protected] == 34 else_jump @HELM_2100 if and [email protected] > 47  58 > [email protected] else_jump @HELM_2045 :HELM_2098return :[email protected] += 1 if  28 > [email protected] else_jump @HELM_2098 :HELM_21250A9D: readfile [email protected] size 1 to [email protected] if  [email protected] == 34 else_jump @HELM_2125 jump @HELM_2045 :HELM_21600A9B: closefile [email protected] return

 

 

The .ini:

 

you can assign helmets in vehicles to up to 24 specified vehicles.Use only vehicle-IDs 400-611 (see vehicle.ide for the IDs)!If you don't use all 24 possible slots, fill the remaining ones with '0'By default it's configured to use helmets only on motorbikes.ID #1 : "581" bf400ID #2 : "462" faggioID #3 : "521" fcr900ID #4 : "463" freewayID #5 : "522" nrg500ID #6 : "461" pcj600ID #7 : "448" pizzaboyID #8 : "468" sanchezID #9 : "586" wayfarerID #10: "523" copbikeID #11: "471" quadID #12: "0" ID #13: "0" ID #14: "0" ID #15: "0" ID #16: "0" ID #17: "0" ID #18: "0" ID #19: "0" ID #20: "0" ID #21: "0" ID #22: "0" ID #23: "0" ID #24: "0"

 

That's an example don't expect me to explain it. Cuz its kinda confusing.

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.