Hands-on: Spawning a Vehicle
We will break down the script into smaller parts and explain each part in detail. The final script will look like this:
{$CLEO .cs}nop
while not is_key_pressed 116 // wait for F5 press wait 0end
while is_key_pressed 116 // wait for F5 release wait 0end
request_model 415 // cheetah
while not has_model_loaded 415 wait 0end
Car cheetah = create_car 415 at 2488.6963 -1660.1608 13.3359
mark_model_as_no_longer_needed 415
terminate_this_scriptThe result in game will look like this: