Place a permanent vehicle on the map


Tools: Sanny Builder
Tutorial author: FunGt

This tutorial explains how to place a permanent vehicle in any part of San Andreas. Before following this tutorial, install Sanny Builder with cleo library.

First of all download Sanny Builder and install it. During the installation install also cleo library when asked. If you have already installed Sunny Builder but you don't have cleo library, run only cleo library setup. After the installation you should have a folder called CLEO into San Andreas folder.

Run Sanny Builder and click File>New. Copy and paste this code:
{$CLEO .cs}

014B: $vehicle_doherty = init_parked_car_generator #CHEETAH color -1 -1 1 alarm 0 door_lock 0 0 10000 at -2026.6 144.3 29.0 angle -90.0
014C: set_parked_car_generator $vehicle_doherty cars_to_generate_to 101
0A95: enable_thread_saving
0A93: end_custom_thread
This code allows you to place a Cheetah on the specified coordinates. Lets analize this code:

{$CLEO .cs} This line must be in any cleo file you create.

014B: $vehicle_doherty = init_parked_car_generator #CHEETAH color -1 -1 1 alarm 0 door_lock 0 0 10000 at -2026.6 144.3 29.0 angle -90.0 This line contains the vehicle informations and the coordinates:

  • $vehicle_doherty = this is the name I've given to the vehicle. You can choose any name without spaces and that is not already used in main.scm! So choose an unique name, for example vehiclename_location. Never give a easy name such as car or just the vehicle name.
  • #CHEETAH = this is the actual vehicle to place. Of course you can edit this with any vehicle name. If you delete this and write only # Sanny Builder will show you the complete vehicle list!
  • color -1 -1 1 = these values define the colors of the car and its owner. -1 and -1 on colours gives to the car random colors, but you can choose colors ID from carcols.dat. For example if you spawn a Banshee and set 1 0 on colors the Banshee will be white with black line. The third value define the car owner. If set on 1 the police won't follow you when you get into the car.
  • alarm 0 = if you set it to 100 the car will always have anti-theft alarm.
  • door_lock 0 0 = these values should define if the car doors are locked.
  • 10000 = car value in money (used when explodes).
  • at -2026.6 144.3 29.0 = XYZ coordinates. To place the car where you want you must run the game while Sanny Builder is opened. With CJ go where you want the car and go back to desktop using Alt+TAB. Now in Sanny Builder window click Tools>IDE Tools>Coords Manager (Ctrl+Alt+1). This command is available only while the game is running! Now in the small window click Read to read the coordinates from the game. Use these coordinates in your code. Increase a bit the Z coordinate because it defines the height from the ground. (for example it reads 28.0, edit to 29.0).
  • angle -90.0 = it defines the vehicle rotation, North 0, South 180, East 90, West -90.
014C: set_parked_car_generator $vehicle_doherty cars_to_generate_to 101 This line must be added below the previous code part. If you changed $vehicle_doherty above, change it here too.

0A95: enable_thread_saving
0A93: end_custom_thread
The first line is needed to save the thread, the last one to close it.

Ok now, once you chose the coordinates and the car to spawn, you can compile the file. To do it click Compile (F6). Save the file into CLEO folder! Now you should have a txt file and a .cs file into CLEO folder. If you copied my code without changing anything, you should see a Cheetah near Doherty savehouse at San Fierro.

Advertisements