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.

Adding an .ini for a CLEO script


Danikov
 Share

Recommended Posts

As the title says,I want to know how would it be possible to create an .ini file for my script,been looking at some sites how to do so but couldn't understand how this works.

 

I need local variables 7 to 16 have the float values from the .ini file .

 

How do I do it?

0208: [email protected] = random_float_in_ranges [email protected] [email protected]: [email protected] = random_float_in_ranges [email protected] [email protected]: [email protected] = random_float_in_ranges [email protected] [email protected]: [email protected] = random_float_in_ranges [email protected] [email protected]: [email protected] = random_float_in_ranges [email protected] [email protected]
Link to comment
Share on other sites

aStiffSausage

Opcodes 0AF0-0AF5 are CLEO 4 opcodes used to write/read from ini-file, with data-types being integer, float and string. In your case, use 0AF2, like this:

0AF2: [email protected] = get_float_from_ini_file "cleo\config.ini" section "SectionName" key "floatKey"

And your ini-file should look like this:

[sectionName]floatKey=0.0

"SectionName" refers to, simply, section from where to read the value from, and "floatKey" is the value which to read.

Link to comment
Share on other sites

That's what I saw previousley,and as I stated,I couldn't understand it,any chance that you explain furherly more about this?

Link to comment
Share on other sites

aStiffSausage

Okay, so, here's a file, which is named "configuration.ini", and we want to read values from it.

[section1]FloatValue_1 = 50.0FloatValue_2 = 100.0[section2]FloatValue_1 = 1.0FloatValue_2 = 2.0

So we use 0AF2 to get float values from ini-file.

0AF2: [email protected] = get_float_from_ini_file "cleo\config.ini" section "SectionName" key "floatKey"

[email protected] is variable where we will store result

-"cleo\config.ini" is path and filename of file we want to read.
-"SectionName" is name of the section, under each section, we will have different values.
-"floatKey" is the value we want to read.

So, to read all the values from the example I made above, we would need to use 0AF2 four times, once for each value we want to read.

0AF2: [email protected] = get_float_from_ini_file "cleo\configuration.ini" section "Section1" key "FloatValue_1"0AF2: [email protected] = get_float_from_ini_file "cleo\configuration.ini" section "Section1" key "FloatValue_2"0AF2: [email protected] = get_float_from_ini_file "cleo\configuration.ini" section "Section2" key "FloatValue_1"0AF2: [email protected] = get_float_from_ini_file "cleo\configuration.ini" section "Section2" key "FloatValue_2"

Now, [email protected] will store value of FloatValue_1, which is located in file "configuration.ini", under section "Section1".

 

I don't know if I can explain this any better, just try to use this and if you face any problems, then show the script and content of .ini-file and we can have better understanding of what's happening. :)

Link to comment
Share on other sites

If I want to change 'FloatValue_1' into 'XForceMin' in the .ini file for example,so I'll have to change in the opcode "floatKey" into "XForceMin" accordingly?

Link to comment
Share on other sites

Yes.

 

Alright,I'll test it when I get home.

 

Also,I wanted to ask another thing,instead of creating another topic.

 

When I am using the particle "heli_dust" in Opcode 064B,it creates the water variant of this particle,while I want it to be the actual dust variant.

I tried all kinds of flag numbers for the particle in the opcode,but no success.

How can I use the actual 'dust' particle instead of the water particle?

Edited by Danikov
Link to comment
Share on other sites

aStiffSausage

I don't have much experience with particles, but since you got it to play, you at least know how to use them. :p

And each effect is defined in effects.fxp, with label "NAME: *EffectNameHere*", so you might need to look through them all to find what you are looking for. As far as I know, only way to preview effects is to try them in-game with a script.

And didn't try this in-game, and I don't know if these are Overdose Effects v1.5 only, but maybe try effects "dust" and "bigdust"?

Link to comment
Share on other sites

I don't have much experience with particles, but since you got it to play, you at least know how to use them. :p

 

And each effect is defined in effects.fxp, with label "NAME: *EffectNameHere*", so you might need to look through them all to find what you are looking for. As far as I know, only way to preview effects is to try them in-game with a script.

 

And didn't try this in-game, and I don't know if these are Overdose Effects v1.5 only, but maybe try effects "dust" and "bigdust"?

This particle is generated underneath aircraft that are powered by vertical thrust.

Its that vortex of either dust or water you see when flying very close to the surface.

Link to comment
Share on other sites

aStiffSausage

I know what effect you mean, but well, I have no idea what effect it is. Best way would be, as I mentioned above, to go through the most obvious effects, which sound like they would be related to dirt, helicopter or similar.

Link to comment
Share on other sites

I know what effect you mean, but well, I have no idea what effect it is. Best way would be, as I mentioned above, to go through the most obvious effects, which sound like they would be related to dirt, helicopter or similar.

Well,nevermind,I think I would not consider to use it for now.

 

 

I want to attach a particle to a car using the opcode 064B,but I am facing a problem,sometimes cars that are not destroyed,which would return false in my script...have this particle attached to them.

 

Secondly,when the particle is supposed to attach,there's sometimes a few seconds delay,while this attachment shouldn't take even a second...

 

Could it be the particle I am using?

help?

Edited by Danikov
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.