Huckleberry Pie Posted October 12, 2008 Share Posted October 12, 2008 OK, so I experimented a car spawn CLEO script from GTAF, since I don't feel like altering the original SCM files. The syntax goes like this, much like the vehicle spawn script in the MAIN.SCM files: {$CLEO .cs} // GTA SAN ANDREAS CAR SPAWNER 014B: 1@ = init_parked_car_generator #STAFFORD color -1 -1 1 alarm 0 door_lock 0 0 10000 at 2491.173 -1681.651 13.33686 angle 88.6415 014C: set_parked_car_generator 1@ cars_to_generate_to 101 0A95: enable_thread_saving 0A93: end_custom_thread The problem is that when I try to add a license plate string (one of which taken from Deji's custom SCMs), the game crashes. Is there a proper way of spawning a car with a number plate in CLEO? Link to comment Share on other sites More sharing options...
Huckleberry Pie Posted October 13, 2008 Author Share Posted October 13, 2008 Sorry, but anyone? Link to comment Share on other sites More sharing options...
JAB HacksouL Posted October 14, 2008 Share Posted October 14, 2008 This is from the main scm file. 09E2: $2764 = parked_car_generator_w_numberplate #PICADOR 84 84 0 alarm 0 door_lock 0 0 10000 plate "_SHERM__" at $142 $143 $144 angle $145 0A17: set_parked_car_generator $2764 flag 1 014C: set_parked_car_generator $2764 cars_to_generate_to 101 As you can see the personalized plate is generated with the model on one line. I haven't worked on Cleo but it should be just about the same thing. JAB Link to comment Share on other sites More sharing options...
Deji Posted October 14, 2008 Share Posted October 14, 2008 (edited) one of which taken from Deji's custom SCMs My coding may have been a bit dodgy there... But I'm sure it should work. But I think the problem is the .cs format. I am not sure that you can spawn cars in a cs script. Something to do with models and stuff. 09E2: $2764 = parked_car_generator_w_numberplate #PICADOR 84 84 0 alarm 0 door_lock 0 0 10000 plate "_SHERM__" at $142 $143 $144 angle $145 0A17: set_parked_car_generator $2764 flag 1 014C: set_parked_car_generator $2764 cars_to_generate_to 101 Right, but wrong... SHERM is ryders car and that is a bad car to base it on if I remember right. I usually base things on my good friend "_CHUNKY_" The 0A17 opcode is not needed while making custom cars. I dont know what the flag represents but I think it's something to do with the fact the car changes it's spawning routine alot. That's why it's not such a good car to base a script on... 09E2: $5185 = parked_car_generator_w_numberplate #BULLET 24 40 1 alarm 0 door_lock 0 0 10000 plate "_CHUNKY_" at -2354.6 983.0 49.3 angle 189.4 014C: set_parked_car_generator $5185 cars_to_generate_to 0 This bullet is a good one to base a script on because it is always there throughout the game. Just edit the values accordingly... 014B: 1@ = init_parked_car_generator #STAFFORD color -1 -1 1 alarm 0 door_lock 0 0 10000 at 2491.173 -1681.651 13.33686 angle 88.6415014C: set_parked_car_generator 1@ cars_to_generate_to 101 014B cannot have a licence bit. Because it is not the correct opcode. 014C is and btw... Is the 0A95: enable_thread_saving0A93: end_custom_thread bit made for the cars? Because I believe that is not needed for them to spawn either. Just comment them out and try what I said and see if it works.Oh and I just remembered that the endthread should not be used... To quote Sanny: 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. Never use the opcode 004E in the CLEO-threads. They work separately from the common threads, so the using of this opcode will cause an error. Use the opcode 0A93, if you need to stop a CLEO-thread. Conversely, never use the opcode 0A93 in the CLEO-missions, but instead use the 004E to cancel a mission. That is just missions, but it shouldn't matter all that much. If you just wanted a car then just jump back to the start of the thread if that works or after the car is spawned, trap the game engiene in a loop Edited October 14, 2008 by Deji Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now