Quantcast

Jump to content

» «
Photo

Cleo scripting help

8 replies to this topic
Hairue
  • Hairue

    Deal with it.

  • Members
  • Joined: 18 Dec 2013

#1

Posted 23 December 2013 - 07:10 AM

I need help coding a script to spawn a car in front of CJ's house at grove street (like Sweet's Greenwood). I've read the coding tutorials and I can't understand crap about them. I don't need to understand anything I\and everything I code. Help would be appreciated.


Danikov
  • Danikov

    The Fake Russian

  • Members
  • Joined: 27 Aug 2009
  • Israel

#2

Posted 23 December 2013 - 08:20 AM

It is one of the simplest things to do with CLEO.
Use Opcode 014B to initialize a car generator.
Then right after it you have to use opcode 014C which defines how many times the generator will make the car spawn.

Usage of the opcodes and further info about them can be found at GTAG's Opcode Database.

014B : http://gtag.gtagamin...ka_close_button

014C :http://gtag.gtagamin...se/opcode/014C/

Sorry for not giving any further details here,I am using my phone now,kind of giving me a hard time to reply.

Hairue
  • Hairue

    Deal with it.

  • Members
  • Joined: 18 Dec 2013

#3

Posted 23 December 2013 - 09:04 AM

It is one of the simplest things to do with CLEO.
Use Opcode 014B to initialize a car generator.
Then right after it you have to use opcode 014C which defines how many times the generator will make the car spawn.

Usage of the opcodes and further info about them can be found at GTAG's Opcode Database.

014B : http://gtag.gtagamin...ka_close_button

014C :http://gtag.gtagamin...se/opcode/014C/

Sorry for not giving any further details here,I am using my phone now,kind of giving me a hard time to reply.

Thanks, it actually helped me. I can actually spawn a car now. Another question is how do I make the license plates say whatever I want it to say?


Danikov
  • Danikov

    The Fake Russian

  • Members
  • Joined: 27 Aug 2009
  • Israel

#4

Posted 23 December 2013 - 09:47 AM

With opcode 09E2 you can do so.
http://gtag.gtagamin...se/opcode/09E2/

Hairue
  • Hairue

    Deal with it.

  • Members
  • Joined: 18 Dec 2013

#5

Posted 23 December 2013 - 10:17 AM Edited by Hairue, 23 December 2013 - 10:23 AM.

With opcode 09E2 you can do so.
http://gtag.gtagamin...se/opcode/09E2/

It crashes my game. what are the proper values to use?


Danikov
  • Danikov

    The Fake Russian

  • Members
  • Joined: 27 Aug 2009
  • Israel

#6

Posted 23 December 2013 - 02:51 PM

Post here the line of what you did with Opcode 09E2.


Hairue
  • Hairue

    Deal with it.

  • Members
  • Joined: 18 Dec 2013

#7

Posted 24 December 2013 - 01:15 AM Edited by Hairue, 24 December 2013 - 06:32 AM.

Post here the line of what you did with Opcode 09E2.

//-------------MAIN---------------
thread "PACR" 
wait 1000 
0A95: enable_thread_saving 
09E2: create_car_generator_with_plate 2492.124 -1682.862 13.29138 angle 90.0 model #SUPERGT color 6 0 always_spawn 1 alarm 0 door_lock 0 min_delay 0 max_delay 10000 plate "_HAIRUE_" store_to $PARKED_CJHOUSE [0]
014C: switch_car_generator $PARKED_CJHOUSE num_generations 101
0A93: end_custom_thread 

this is based off of another script.


Danikov
  • Danikov

    The Fake Russian

  • Members
  • Joined: 27 Aug 2009
  • Israel

#8

Posted 24 December 2013 - 03:16 PM Edited by Danikov, 24 December 2013 - 03:19 PM.

Apparently GTAG's Opcode 09E2 example made me crash,Its either me or something wrong with that example,this is the first time I tried making a car generate with a license plate,anyways,I took a look in main.scm and copied Ryder's car generator,which the format there for that opcode is kinda different.

This is how it should be done,It should work(Tested) :

{$CLEO .cs}
    
0000:
09E2: 1@ = parked_car_generator_w_numberplate #SUPERGT 6 0 1 alarm 0 door_lock 0 0 10000 plate "_HAIRUE_" at 2492.124 -1682.862 13.29138 angle 90.0
0A17: set_parked_car_generator 1@ flag 1 
014C: set_parked_car_generator 1@ cars_to_generate_to 101   
0A93: end_custom_thread

I also made the car supposedly yours...entering the car won't trigger your wanted level.


Hairue
  • Hairue

    Deal with it.

  • Members
  • Joined: 18 Dec 2013

#9

Posted 25 December 2013 - 06:48 AM

Apparently GTAG's Opcode 09E2 example made me crash,Its either me or something wrong with that example,this is the first time I tried making a car generate with a license plate,anyways,I took a look in main.scm and copied Ryder's car generator,which the format there for that opcode is kinda different.

This is how it should be done,It should work(Tested) :

{$CLEO .cs}
    
0000:
09E2: 1@ = parked_car_generator_w_numberplate #SUPERGT 6 0 1 alarm 0 door_lock 0 0 10000 plate "_HAIRUE_" at 2492.124 -1682.862 13.29138 angle 90.0
0A17: set_parked_car_generator 1@ flag 1 
014C: set_parked_car_generator 1@ cars_to_generate_to 101   
0A93: end_custom_thread

I also made the car supposedly yours...entering the car won't trigger your wanted level.

I really appreciate you doing the bare script for me. Thanks and hope you have a Merry Christmas and Happy New Year :)

  • Danikov likes this




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users