Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. The Contract
      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

[Cleo] Tire spikes.


JT_Mix
 Share

Recommended Posts

 

Is it possible for you to deploy tire spikes with cleo?

if so has anyone got the code?

 

thanks

you mean TEMP_STINGER2 of mission Puncture Wounds ?

I believe its not done as cleo. Its a bit of work.

Needs to place the object TEMP_STINGER2 on street and check if a car is at same coord

then deflate its tire

 

04FE: deflate_tire 1 on_car [email protected]

 

Link to comment
Share on other sites

Some years ago I created such a mod for Vice City (Stinger Drop Mod), demonj0e converted it to San Andreas. It's not a cleo script though, and that might be a bit hard as it makes extensive use of small threads and I don't think CLEO-scripts allow that.

Edited by PatrickW
bS8xA.png
Link to comment
Share on other sites

2pacproducer2

no, the script is pretty short, and using not so complicated speech. I think that could be writen as CLEO.

Link to comment
Share on other sites

I'm not an expert in the limitations of CLEO-scripts, but I was under the impression that you couldn't start new threads from within them.

Not based on experience, but on this text from the sannybuiulder CLEO helppages:

 

One file – one thread. Each CLEO-script must be made as a single thread compiled in a single file. If you need more threads for your script, use the opcodes 004F or 0A92, depending of where is that additional thread located - in the main.scm or in a separate cs-file.

 

 

But maybe an option would be to have the small "stringer-thread" in a seperate CLEO-file, and start that from the sniffer-thread with opcode 0A92. Certainly worth a try.

bS8xA.png
Link to comment
Share on other sites

Stinger Drop Mod for San Andreas (CLEO3 version)

Thanx to demonj0e for making the SA conversion of the original Stinger Drop Mod.

 

stinger_drop.txt

 

{$CLEO .cs}:stinger_sniff_thread03A4: name thread "ST_SNIF":stinger_sniff_loop0001: wait  100 ms00D6: if 00256:   player $PLAYER_CHAR defined004D: jump_if_false @stinger_sniff_loop  00D6: if 100E1:   key pressed  0  17  00DF:   actor $PLAYER_ACTOR driving004D: jump_if_false @stinger_sniff_loop    03C0: [email protected] = actor $PLAYER_ACTOR car0407: create coordinate [email protected] [email protected] [email protected] from car [email protected] offset  0.0 -2.5  1.00174: [email protected] = car [email protected] z_angle0009: [email protected] +=  90.0;; floating-point values02CE: [email protected] = ground z [email protected] [email protected] [email protected]: [email protected] += 0.10A92: create_custom_thread "stinger.s" [email protected] [email protected] [email protected] [email protected]: wait  500 ms0002: jump @stinger_sniff_loop

 

 

 

stinger.txt

 

{$CLEO .s}:Stinger_thread                              0004: [email protected] = 0  029B: [email protected] = init_object 2899 at [email protected] [email protected] [email protected]: set object [email protected] z angle to  [email protected]: remove_object_from_mission_cleanup_list  [email protected]: [email protected] = [email protected]: [email protected] -= 3.0000B: [email protected] += 3.00007: [email protected] = [email protected]: [email protected] -= 3.0000B: [email protected] += 3.0  repeat    0001: wait  250 ms 0007: [email protected] = -1 053E: [email protected] = get_random_car_with_model -1 in_rectangle_cornerA [email protected] [email protected] cornerB [email protected] [email protected] if NOT   [email protected] ==  -1;; integer values then   04FE: deflate_tire  0 on_car [email protected]   04FE: deflate_tire  1 on_car [email protected]   04FE: deflate_tire  2 on_car [email protected]   04FE: deflate_tire  3 on_car [email protected] enduntil [email protected] > 100000108: destroy object [email protected]: end_custom_thread

 

 

 

Compile both files in your CLEO directory.

Start a new game, and drop stingers with "FIRE" in any vehicle.

Edited by PatrickW
bS8xA.png
Link to comment
Share on other sites

 

You can make sperate threads in cleo bc7 did it in his mod Where would I find the ID for#TEMP_STINGER2? I don't remember

The ID of the stinger can be found in the large table at the top of a standard main.scm.

I guess not, afterall smile.gif

 

 

@JT_Mix: Did you try it with a default SA main.scm or with a modded one ?

Edited by PatrickW
bS8xA.png
Link to comment
Share on other sites

I stand corrected. That is indeed the correct value. Edited it in my post above..

 

ZAZ: cookie.gif

bS8xA.png
Link to comment
Share on other sites

CLEO scripts only use global IDs of models. Use the Ctrl+Alt+H feature to convert a model name to ID and vice versa.

 

Like this:

user posted image

 

Edited by Seemann
Link to comment
Share on other sites

Thanx for the tip, seeman smile.gif

 

Wouldn't it be possible to also support this "translation" for CLEO-scripts during compilation ?

So that you can simply use the symbolic name "#TEMP_STINGER2" in CLEO-scripts also ?

bS8xA.png
Link to comment
Share on other sites

Yea, that would be useful, however I'm a supporter of that a scripter should know how the things work and why the code is compiled in a certain way. Anyway, added on the todo list. wink.gif

Link to comment
Share on other sites

 

Yea, that would be useful, however I'm a supporter of that a scripter should know how the things work and why the code is compiled in a certain way. Anyway, added on the todo list. wink.gif

todo list. wink.gif ?? you will release a new version ?? smile.gif

and for gta4, is there anything in work or will it stay by lua? or maybe a lua editer ?

Link to comment
Share on other sites

Sanny Builder and CLEO are far from completion. I still have in mind a lot of features to add for both. So, yea, new version will eventually come. As for GTA 4... let it be surprise! cool.gif

Link to comment
Share on other sites

Sanny Builder and CLEO are far from completion. I still have in mind a lot of features to add for both. So, yea, new version will eventually come. As for GTA 4... let it be surprise! cool.gif

Oh.. im impatient to see teh new stuff tounge.gif

Yl8KS.jpg
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.