gtasearcher Posted April 10, 2009 Share Posted April 10, 2009 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 More sharing options...
cj360 Posted April 10, 2009 Share Posted April 10, 2009 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 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