Jul 27 2014, 01:47 AM Post #1 | |
The New Guy! Posts: 1 Joined: 27-July 14 | i'm making a simple mod, this mod 'll spawn a towtruck and a mechanic and then go to the player car and the machanic 'll exit the car and fix the player car, but, is crashing, i don't know why. so, please be patient with me 'cos i'm begginer and sorry for my bad english. script: {$CLEO .cs} 0000: NOP //begin //0@ = car //7@ = mechanic :Start wait 0 if and 0ADC: test_cheat "guincho" 00DF: actor $PLAYER_ACTOR driving jf @Start 0247: load_model #TOWTRUCK //guicho 0247: load_model #WMYMECH //mecânico :Loop wait 0 if and 0248: model #TOWTRUCK available 0248: model #WMYMECH available jf @Loop 03C0: 0@ = actor $PLAYER_ACTOR car var 1@:Float = 0.0 2@:Float = 0.0 3@:Float = 0.0 4@:Float = 0.0 5@:Float = 0.0 6@:Float = 0.0 9@:Float = 0.0 10@:Float = 0.0 11@:Float = 0.0 14@:Float = 0.0 15@:Float = 0.0 16@:Float = 0.0 17@:Float = 0.0 end 0174: 17@ = car 0@ Z_angle 00AA: store_car 0@ position_to 1@ 2@ 3@ 0208: 9@ = random_float_in_ranges -10.0 10.0 0208: 10@ = random_float_in_ranges -10.0 10.0 9@ += 1@ 10@ += 2@ 11@ = 3@ 02C1: store_to 4@ 5@ 6@ car_path_coords_closest_to 9@ 10@ 11@ 00A5: 7@ = create_car #TOWTRUCK at 4@ 5@ 6@ 02A8: add_sprite_blip_for_coord 4@ 5@ 6@ sprite 56 store_to 12@ 0129: 8@ = create_actor_pedtype 50 model #WMYMECH in_car 7@ driverseat 05D1: AS_actor 8@ drive_car 7@ to 1@ 2@ 3@ speed 15.0 0 model #NULL 0 :Mark wait 0 //00AA: store_car 7@ position_to 9@ 10@ 11@ /*if and 9@ == 1@ 10@ == 2@ 11@ == 3@*/ if 00F4: actor 8@ near_actor $PLAYER_ACTOR radius 5.0 5.0 sphere 0 in_car jf @Mark 0175: set_car 7@ Z_angle_to 17@ 05CF: AS_actor 8@ exit_car 0@ in_direction 1@ 2@ 3@ :Roof //wait 0 04ED: request_animation "IDLE_taxi" 04ED: request_animation "SHP_Tray_Out" /*if and 04EE: animation "IDLE_taxi" loaded 04EE: animation "SHP_Tray_Out" loaded jf @Roof*/ //open roof wait 1000 :Open_Roof if not 14@ >= 0.87 jf @co 0605: actor 8@ perform_animation "IDLE_taxi" IFP "ped" rate 4.0 loop 0 lockX 0 lockY 0 lockF 0 time -1 0614: set_actor 8@ player_actor animation "IDLE_taxi" progress_to 14@ 0612: set_actor 8@ animation "IDLE_taxi" paused 0 15@ = 14@ 15@ += 13 08A6: set_car 0@ door 4 rotation_to 15@ 08A6: set_car 0@ door 5 rotation_to 15@ 14@ += 0.5 wait 0 jump @Open_Roof :co wait 0 if not 16@ >= 0.67 jf @Get_Out //get out 0612: set_actor 8@ animation "IDLE_taxi" paused 1 0605: actor 8@ perform_animation "SHP_Tray_Out" IFP "FOOD" rate 4.0 loop 0 lockX 0 lockY 0 lockF 0 time -1 0614: set_actor 8@ player_actor animation "SHP_Tray_Out" progress_to 16@ 0612: set_actor 8@ animation "SHP_Tray_Out" paused 0 if 16@ == 0 then wait 1000 end 16@ -= 0.5 wait 0 jump @co :Get_Out wait 0 0612: set_actor 8@ animation "SHP_Tray_Out" paused 1 0A30: fix_car 0@ 0AD0: show_formatted_text_lowpriority "Carro Consertado" time 2000 05CB: task_enter_car_as_driver 8@ car 7@ time 10000 ms wait 1000 05D1: AS_actor 8@ drive_car 7@ to 4@ 5@ 6@ speed 15.0 0 model #NULL 0 wait 2000 0249: release_model #TOWTRUCK 0249: release_model #WMYMECH 00A6: destroy_car 7@ 009B: destroy_actor 8@ 0164: remove_blip 13@ jump @Start This post has been edited by Deji: Jul 27 2014, 01:08 PM Reason for edit: De-massacred BB code. |
Jul 27 2014, 01:51 PM Post #2 | |
Coding like a Rockstar! Posts: 1,468 From: ??? Joined: 28-May 09 | What is crashing? How does it even compile when you're using invalid block comments? (You're supposedly commenting out the animation load checks, so using unloaded anims might be the problem). -------------------- | CLEO 4.3.22 | A?i?a?o?3D | UI SDK | Black Market Mod 1.0.1 | GInput 0.3 | Cheat Keyboard | Tactile Cheat Activation | Stream Ini Extender 0.7 | SuperVars | ScrDebug | Vigilante Justice: San Andreas | |