Jump to content

Multiple cleo mods in 1 cleo


alexcjw

Recommended Posts

hey, how do i put multiple cleo mods in 1 cleo? ive tried and only the top cleo mod works...

Link to comment
Share on other sites

why would you want to do that?

Link to comment
Share on other sites

aStiffSausage

No more hundreds of cleo mods in Cleo-folder wink.gif

 

But I would recommend keeping them separate, combining 4-5 scripts can already make lagg, for example if some of those scripts require keypress, it might take few seconds before keypress is getting recognized.

Link to comment
Share on other sites

I did it in some famous cleo mods like pimpmycar and gfxxx

as well as in this nice example of multiple threads: SMGshootRockets mod

Opcode 0A92: create_custom_thread with parameter can start another thread inside the same cleo script with *.cs extension

The method:

 

// this script must become this name: MultiThread.cs{$CLEO .cs}:MultiThreadif0@ == 0jf @MultiThread_2003A4: name_thread 'MULTHRD'0A92: create_custom_thread "MultiThread.cs" 1  :MultiThread_11wait 0jump @MultiThread_11:MultiThread_2003A4: name_thread 'SECONDT':MultiThread_50wait 0jump @MultiThread_50

 

 

The example below starts a second thread by keypress Backspace

and displays the values of 1@, 2@, 3@, 4@

 

// this script must become this name: MultiThread.cs{$CLEO .cs}:MultiThread//-- 0@ = 0 by defaultif0@ == 0jf @MultiThread_2003A4: name_thread 'MULTHRD'  :MultiThread_10wait 003F0: enable_text_draw 1  045A: draw_text_1number 200.0 40.0 GXT 'NUMBER' number 0@  // ~1~  if 0AB0:   key_pressed 8//---------------------- Backspace 004D: jump_if_false @MultiThread_10 0A92: create_custom_thread "MultiThread.cs" 1 2 3 4 //The started(second)thread assignes now the first param of 0A92: to 0@, the second param to 1@ and so on// the second thread beginns also with//:MultiThread//-- but 0@ = 1 because of the  first param of 0A92://if//0@ == 0//jf @MultiThread_20:MultiThread_11wait 003F0: enable_text_draw 1  045A: draw_text_1number 200.0 40.0 GXT 'NUMBER' number 0@  // ~1~  jump @MultiThread_11 /////////////////////////////////////////////////////////////// second thread:MultiThread_20if0@ == 1jf @MultiThread_5003A4: name_thread 'SECONDT':MultiThread_21wait 003F0: enable_text_draw 1  045A: draw_text_1number 200.0 60.0 GXT 'NUMBER' number 0@  // ~1~ 045A: draw_text_1number 240.0 60.0 GXT 'NUMBER' number 1@  // ~1~ 045A: draw_text_1number 260.0 60.0 GXT 'NUMBER' number 2@  // ~1~ 045A: draw_text_1number 280.0 60.0 GXT 'NUMBER' number 3@  // ~1~ jump @MultiThread_21:MultiThread_500A93: end_custom_thread

 

Link to comment
Share on other sites

spaceeinstein

Or let someone else do it and post in the request topic instead.

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
  • 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.