Peppo_o'Paccio Posted March 15, 2010 Share Posted March 15, 2010 I want to create a script that: 1 - Spawns a Stretch (limousine) 2 - The Stretch goes in Ganton and after 15 seconds you will get in it 3 - appears the phrase from my gxt file 4 - if I press S, the Stretch carrys me to Unity Station 5 - if I press A, the Stretch carrys me to the Atrium 6 - if I'm not near the Stretch, it will disappear. The 1, 2, 3, 4 and 6 work, but I can't select a different destination that isn't the station. This is the code {$CLEO .cs}:DRIVE03A4: name_thread 'DRIVE':Models0001: wait 0 msif0256: player $PLAYER_CHAR defined004D: jump_if_false @Modelsif00FF: actor $PLAYER_ACTOR sphere 1 in_sphere 2478.239 -1650.1418 13.4687 radius 2.0 2.0 2.0 on_foot004D: jump_if_false @Models0247: load_model #STRETCH0247: load_model #WMYCH:Drive10001: wait 0 msif and0256: player $PLAYER_CHAR defined0248: model #STRETCH available0248: model #WMYCH available004D: jump_if_false @Drive100A5: [email protected] = create_car #STRETCH at 2408.8706 -1661.5342 13.38280175: set_car [email protected] Z_angle_to 270.38580229: set_car [email protected] primary_color_to 0 secondary_color_to 0 0129: [email protected] = create_actor_pedtype 8 model #WMYCH in_car [email protected] driverseat0186: [email protected] = create_marker_above_car [email protected]: set_marker [email protected] type_to 10249: release_model #STRETCH0249: release_model #WMYCH00A7: car [email protected] drive_to 2476.5244 -1672.5198 13.337500AD: set_car [email protected] max_speed_to 20.000AE: set_car [email protected] traffic_behaviour_to 2 0001: wait 15000 ms0430: put_actor $PLAYER_ACTOR into_car [email protected] passenger_seat 1if0256: player $PLAYER_CHAR defined004D: jump_if_false @Drive10164: disable_marker [email protected]: show_text_styled GXT 'DRIVE1' time 1000 style 2 // Press S to go to Unity Station, or press A to go to the Atrium:letter_S0001: wait 0 msif and0256: player $PLAYER_CHAR defined00DB: actor $PLAYER_ACTOR in_car [email protected]: jump_if_false @letter_Sif0AB0: key_pressed 83 // --- S004D: jump_if_false @letter_S00A7: car [email protected] drive_to 1777.3982 -1930.2979 13.387400AD: set_car [email protected] max_speed_to 20.000AE: set_car [email protected] traffic_behaviour_to 2:letter_Aif and0256: player $PLAYER_CHAR defined00DB: actor $PLAYER_ACTOR in_car [email protected]: jump_if_false @letter_Aif0AB0: key_pressed 65 // --- A004D: jump_if_false @letter_A00A7: car [email protected] drive_to 1692.399 -1693.2944 13.382800AD: set_car [email protected] max_speed_to 20.0 00AE: set_car [email protected] traffic_behaviour_to 2:Drive20001: wait 0 msif0256: player $PLAYER_CHAR defined004D: jump_if_false @Drive2if or0119: car [email protected] wrecked01F4: car [email protected] flipped8202: not actor $PLAYER_ACTOR near_car [email protected] radius 1000.0 1000.0 flag 0 004D: jump_if_false @Drive200A6: destroy_car [email protected] 009B: destroy_actor [email protected] 0002: jump @Models0A93: end_custom_thread Probably the :letter_a label doesn't work because if i don't press S, it returns to :letter_a. But I can't find the exact way. Wich is it? Link to comment Share on other sites More sharing options...
james227uk Posted March 15, 2010 Share Posted March 15, 2010 From a very quick observation, I think :Letter_S should jf to :Letter_A, then :Letter_A should jf to :Letter_S Link to comment Share on other sites More sharing options...
ZAZ Posted March 15, 2010 Share Posted March 15, 2010 {$CLEO .cs}:DRIVE03A4: name_thread 'DRIVE':Models0001: wait 0 msif0256: player $PLAYER_CHAR defined004D: jump_if_false @Modelsif00FF: actor $PLAYER_ACTOR sphere 1 in_sphere 2478.239 -1650.1418 13.4687 radius 2.0 2.0 2.0 on_foot004D: jump_if_false @Models0247: load_model #STRETCH0247: load_model #WMYCH:Drive10001: wait 0 msif and0256: player $PLAYER_CHAR defined0248: model #STRETCH available0248: model #WMYCH available004D: jump_if_false @Drive100A5: [email protected] = create_car #STRETCH at 2408.8706 -1661.5342 13.38280175: set_car [email protected] Z_angle_to 270.38580229: set_car [email protected] primary_color_to 0 secondary_color_to 00129: [email protected] = create_actor_pedtype 8 model #WMYCH in_car [email protected] driverseat0186: [email protected] = create_marker_above_car [email protected]: set_marker [email protected] type_to 10249: release_model #STRETCH0249: release_model #WMYCH00A7: car [email protected] drive_to 2476.5244 -1672.5198 13.337500AD: set_car [email protected] max_speed_to 20.000AE: set_car [email protected] traffic_behaviour_to 20001: wait 15000 msif and0256: player $PLAYER_CHAR defined8119: not car [email protected] wrecked004D: jump_if_false @Drive30430: put_actor $PLAYER_ACTOR into_car [email protected] passenger_seat 10164: disable_marker [email protected]: show_text_styled GXT 'DRIVE1' time 1000 style 2 // Press S to go to Unity Station, or press A to go to the Atrium:letter_S0001: wait 0 msif0256: player $PLAYER_CHAR defined004D: jump_if_false @Drive2if and8119: not car [email protected] wrecked81F4: not car [email protected] flipped0202: actor $PLAYER_ACTOR near_car [email protected] radius 1000.0 1000.0 flag 0004D: jump_if_false @Drive2if00DB: actor $PLAYER_ACTOR in_car [email protected]: jump_if_false @letter_Sif0AB0: key_pressed 83 // --- S004D: jump_if_false @letter_A00A7: car [email protected] drive_to 1777.3982 -1930.2979 13.387400AD: set_car [email protected] max_speed_to 20.000AE: set_car [email protected] traffic_behaviour_to 20002: jump @letter_S:letter_Aif0AB0: key_pressed 65 // --- A004D: jump_if_false @letter_S00A7: car [email protected] drive_to 1692.399 -1693.2944 13.382800AD: set_car [email protected] max_speed_to 20.000AE: set_car [email protected] traffic_behaviour_to 20002: jump @letter_S:Drive201C3: remove_references_to_car [email protected] // Like turning a car into any random car01C2: remove_references_to_actor [email protected] // Like turning an actor into a random pedestrian0002: jump @Models:Drive30164: disable_marker [email protected]: remove_references_to_car [email protected] // Like turning a car into any random car01C2: remove_references_to_actor [email protected] // Like turning an actor into a random pedestrian0002: jump @Models CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
Peppo_o'Paccio Posted March 15, 2010 Author Share Posted March 15, 2010 Thank you ZAZ and james227uk! . Now it works! And... if the destination are 3? I think I must insert: :letter_S0001: wait 0 msif0256: player $PLAYER_CHAR defined004D: jump_if_false @Drive2if and8119: not car [email protected] wrecked81F4: not car [email protected] flipped0202: actor $PLAYER_ACTOR near_car [email protected] radius 1000.0 1000.0 flag 0004D: jump_if_false @Drive2if00DB: actor $PLAYER_ACTOR in_car [email protected]: jump_if_false @letter_Sif0AB0: key_pressed 83 // --- S004D: jump_if_false @letter_B00A7: car [email protected] drive_to 1777.3982 -1930.2979 13.387400AD: set_car [email protected] max_speed_to 20.000AE: set_car [email protected] traffic_behaviour_to 20002: jump @letter_S:letter_Bif0AB0: key_pressed 66 // --- B004D: jump_if_false @letter_A00A7: car [email protected] drive_to 1692.399 -1693.2944 13.382800AD: set_car [email protected] max_speed_to 20.000AE: set_car [email protected] traffic_behaviour_to 20002: jump @letter_S:letter_Aif0AB0: key_pressed 65 // --- A004D: jump_if_false @letter_S00A7: car [email protected] drive_to 1692.399 -1693.2944 13.382800AD: set_car [email protected] max_speed_to 20.000AE: set_car [email protected] traffic_behaviour_to 20002: jump @letter_S Or something like it. Right? Link to comment Share on other sites More sharing options...
ZAZ Posted March 15, 2010 Share Posted March 15, 2010 Thank you ZAZ and james227uk! . Now it works! And... if the destination are 3? I think I must insert: :letter_S0001: wait 0 msif0256: player $PLAYER_CHAR defined004D: jump_if_false @Drive2if and8119: not car [email protected] wrecked81F4: not car [email protected] flipped0202: actor $PLAYER_ACTOR near_car [email protected] radius 1000.0 1000.0 flag 0004D: jump_if_false @Drive2if00DB: actor $PLAYER_ACTOR in_car [email protected]: jump_if_false @letter_Sif0AB0: key_pressed 83 // --- S004D: jump_if_false @letter_B00A7: car [email protected] drive_to 1777.3982 -1930.2979 13.387400AD: set_car [email protected] max_speed_to 20.000AE: set_car [email protected] traffic_behaviour_to 20002: jump @letter_S:letter_Bif0AB0: key_pressed 66 // --- B004D: jump_if_false @letter_A00A7: car [email protected] drive_to 1692.399 -1693.2944 13.382800AD: set_car [email protected] max_speed_to 20.000AE: set_car [email protected] traffic_behaviour_to 20002: jump @letter_S:letter_Aif0AB0: key_pressed 65 // --- A004D: jump_if_false @letter_S00A7: car [email protected] drive_to 1692.399 -1693.2944 13.382800AD: set_car [email protected] max_speed_to 20.000AE: set_car [email protected] traffic_behaviour_to 20002: jump @letter_S Or something like it. Right? Bingo CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
Peppo_o'Paccio Posted March 15, 2010 Author Share Posted March 15, 2010 Ok, now I don't need help anymore about this. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now