Very nice tutorial! Great job, but i have an question.
I want to make an elevator, and i've tried with 2 codes, both don't work, any help?
| CODE |
{$CLEO .cs}
:LIFTS_1 03A4: name_thread 'LIFT'
:LIFTS_2 0001: wait 0 ms 00D6: if 0 0256: player $PLAYER_CHAR defined 004D: jump_if_false @LIFTS_2 00D6: if 0 00FE: actor $PLAYER_ACTOR sphere 0 in_sphere -545.9601 2594.1699 53.5156 radius 200.0 200.0 200.0 004D: jump_if_false @LIFTS_2 0247: request_model 16795 0247: request_model 16797 038B: load_requested_models
:LIFTS_3 0001: wait 0 ms if and 0248: model 16795 available 0248: model 16797 available 004D: jump_if_false @LIFTS_3 0107: 1@ = create_object 16795 at -534.84 2632.83 52.5 0177: set_object 1@ Z_angle_to 268.0 0392: make_object 1@ moveable 1 0107: 2@ = create_object 16797 at -532.875 2657.53 33.13 0177: set_object 2@ Z_angle_to -2.34 0392: make_object 2@ moveable 1 0006: 3@ = 0
:LIFTS_4 0001: wait 0 ms 00D6: if 0 0256: player $PLAYER_CHAR defined 004D: jump_if_false @LIFTS_13 01BB: store_object 1@ position_to 11@ 12@ 13@ 00D6: if 0 00FE: actor $PLAYER_ACTOR sphere 0 in_sphere -545.9601 2594.1699 53.5156 radius 210.0 210.0 210.0 004D: jump_if_false @LIFTS_13 if 0039: 3@ == 0 004D: jump_if_false @LIFTS_5 if or 00FE: actor $PLAYER_ACTOR sphere 0 in_sphere -534.84 2632.83 52.5 radius 3.0 3.0 3.0 00FE: actor $PLAYER_ACTOR sphere 0 in_sphere -534.48 2640.05 46.39 radius 8.0 8.0 3.0 004D: jump_if_false @LIFTS_5 0006: 3@ = 1
:LIFTS_5 if 0039: 3@ == 1 004D: jump_if_false @LIFTS_7 if 0021: 13@ > 46.0 // floating-point values 004D: jump_if_false @LIFTS_6 034E: move_object 1@ to -534.84 2632.83 45.0 speed 0.0 0.0 0.04 flag 0 0002: jump @LIFTS_4
:LIFTS_6 0006: 3@ = 2 0001: wait 2000 ms 0002: jump @LIFTS_4
:LIFTS_7 if 0039: 3@ == 2 004D: jump_if_false @LIFTS_4 if 0023: 52.5 > 13@ // floating-point values 004D: jump_if_false @LIFTS_8 034E: move_object 1@ to -534.84 2632.83 53.5 speed 0.0 0.0 0.04 flag 0 0002: jump @LIFTS_4
:LIFTS_8 0006: 3@ = 0 0001: wait 2000 ms 0002: jump @LIFTS_4
:LIFTS_13 0108: destroy_object 1@ 0108: destroy_object 2@ 0002: jump @LIFTS_2 |
Its ZAZ code, but when i come near elevator my gta crashes.
| CODE |
{$CLEO .cs} :ONEDOOR_1 03A4: name_thread 'ONEDOOR'
:ONEDOOR_3 0001: wait 0 ms if 0256: player $PLAYER_CHAR defined 004D: jump_if_false @ONEDOOR_3 if 00FE: actor $PLAYER_ACTOR 0 (in-sphere)near_point -2288.26 582.877 33.706 radius 80.5 80.5 80.5 004D: jump_if_false @ONEDOOR_3 0107: 5@ = create_object 3095 at -2288.26 582.877 33.706
0007: 7@ = -2288.26 // default X (closed) 0007: 8@ = 582.877 //default Y (closed) 0007: 9@ = 33.706 //default Z (closed) 0007: 11@ = -2288.26 // destination X (open) 0007: 12@ = 582.877 // destination Y (open) 0007: 13@ = 50.906 // destination Z (open) 0006: 14@ = 0 0006: 15@ = 0 0002: jump @ONEDOOR_12
:ONEDOOR_12 0001: wait 0 ms if 0256: player $PLAYER_CHAR defined 004D: jump_if_false @ONEDOOR_75 if 80FE: not actor $PLAYER_ACTOR 0 (in-sphere)near_point 7@ 8@ 9@ radius 95.5 95.5 95.5 004D: jump_if_false @ONEDOOR_13 0002: jump @ONEDOOR_75
:ONEDOOR_13 if 0039: 15@ == 0 // integer values 004D: jump_if_false @ONEDOOR_15 if 00FE: actor $PLAYER_ACTOR 0 (in-sphere)near_point 7@ 8@ 9@ radius 20.5 20.5 20.5 0AB0: key_pressed 76//------------------key = L 004D: jump_if_false @ONEDOOR_15 0006: 15@ = 1 000A: 14@ += 1 // integer values 0002: jump @ONEDOOR_15
:ONEDOOR_15 if 0039: 15@ == 1 // integer values 004D: jump_if_false @ONEDOOR_18
:ONEDOOR_16 if 0039: 14@ == 1 // integer values 004D: jump_if_false @ONEDOOR_17 034E: move_object 5@ to 11@ 12@ 13@ speed 0.0 0.0 0.9 flag 0 if 04E5: object 5@ near_point 11@ 12@ 13@ radius 1.0 1.0 flag 0 004D: jump_if_false @ONEDOOR_17 0006: 14@ = 2 0006: 15@ = 1 0001: wait 500 ms 0002: jump @ONEDOOR_29
:ONEDOOR_17 if 0039: 14@ == 3 // integer values 004D: jump_if_false @ONEDOOR_18 034E: move_object 5@ to 7@ 8@ 9@ speed 0.0 0.0 0.9 flag 0 if 04E5: object 5@ near_point 7@ 8@ 9@ radius 0.1 0.1 flag 0 004D: jump_if_false @ONEDOOR_18 0006: 15@ = 0 0006: 14@ = 0
:ONEDOOR_18 if and 0039: 14@ == 2 // integer values 80FE: not actor $PLAYER_ACTOR 0 (in-sphere)near_point 7@ 8@ 9@ radius 19.0 19.0 15.0 004D: jump_if_false @ONEDOOR_19 0006: 15@ = 1 0006: 14@ = 3 0002: jump @ONEDOOR_12
:ONEDOOR_19 if and 0039: 14@ == 2 // integer values 80FE: not actor $PLAYER_ACTOR 0 (in-sphere)near_point 7@ 8@ 9@ radius 3.0 3.0 5.0 0AB0: key_pressed 76 004D: jump_if_false @ONEDOOR_29 0006: 15@ = 1 0006: 14@ = 3 0002: jump @ONEDOOR_12
:ONEDOOR_29 0002: jump @ONEDOOR_12
:ONEDOOR_75 01C4: remove_references_to_object 5@ // This object will now disappear when the player looks away 03F0: text_draw_toggle 0 0001: wait 1000 ms 0006: 14@ = 0 0006: 15@ = 0 0002: jump @ONEDOOR_3 |
still ZAZ script, but it opens gates, i changed values but object doesnt move. ;/